Difference between revisions of "User:Cgomes7/Basics"

From CDOT Wiki
Jump to: navigation, search
Line 9: Line 9:
  
 
== Preparing Eclipse ==
 
== Preparing Eclipse ==
 +
[https://zenit.senecac.on.ca/%7Eecl500_111a11/labs/lab1%20-%20Basic/1%20-%20Preparing%20Eclipse  Tung's Tutorial]
  
 
== Creating your first Java project==
 
== Creating your first Java project==
[https://zenit.senecac.on.ca/~ecl500_111a11/lab_tutorial_Tung/lab1/2.%20Creating%20your%20first%20Java%20project/index.html Tung tutorial]
+
[https://zenit.senecac.on.ca/%7Eecl500_111a11/labs/lab1%20-%20Basic/2%20-%20Creating%20your%20first%20Java%20project Tung's Tutorial]
 
[https://zenit.senecac.on.ca/svn/ecl500_111rep5/trunk%2078/tung-lab1/src/cs/ecl/basics/lab/tut1/ project]
 
[https://zenit.senecac.on.ca/svn/ecl500_111rep5/trunk%2078/tung-lab1/src/cs/ecl/basics/lab/tut1/ project]
 
== Browsing Java elements using the package explorer ==
 
== Browsing Java elements using the package explorer ==

Revision as of 09:27, 4 February 2011

DPS914 - Basic Lab

Basic Lab

Team 5 logo1.gif

Install Eclipse Subversive plug-in

Tung's Tutorial

Preparing Eclipse

Tung's Tutorial

Creating your first Java project

Tung's Tutorial project

Browsing Java elements using the package explorer

- To browse java elements using package explorer, expand the java package to show all the java classes.

- Expand a java class, all the java elements are now visible.

JavaElements.jpg

Editing Java elements

Creating a Java class

Renaming Java elements

Tung tutorial project

Moving and copying Java elements

Move Element

Copy Element

- Right click on a java class -> Refactor -> Move

Move.jpg

- Right click on a java class -> Copy

Copy.jpg

- Select destination package of the file.

Packages.jpg

- Right click package where the file will be placed. -> Paste

Paste.jpg

- The file has been moved.

NewLocation.jpg

- If a file of the type and name exist, you will be asked to rename the file.

Rename.jpg

Navigate to a Java element's declaration

Viewing the type Hierarchy

Searching the workbench

Tung tutorial project

Running your programs

- Right click on the java class containing the main funtion. -> Run As -> Java Application

Run.jpg

- The application should run.

Run11.jpg

Debugging your programs

Evaluating expressions

Evaluating snippets

Tung tutorial project

Using the Java browsing perspective

- Select the Perspective menu in the corner of the screen and select "other".

Other.jpg

- Select the Java Browsing Perspective.

Jbpers1.jpg

- The Java Browsing Perspective shows the same information as the Project Explorer Perspective but it organizes it in a tree view.

Jbpers.jpg

Writing and running JUnit tests