From CDOT Wiki
Jump to: navigation, search

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.


Editing Java elements

Tung's Tutorial

Creating a Java class

Tung's Tutorial

Renaming Java elements

Tung's Tutorial project

Moving and copying Java elements

Move Element

Copy Element

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


- Right click on a java class -> Copy


- Select destination package of the file.


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


- The file has been moved.


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


Navigate to a Java element's declaration

Tung's Tutorial

Viewing the type Hierarchy

Tung's Tutorial

Searching the workbench

Tung's Tutorial project

Running your programs

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


- The application should run.


Debugging your programs

Tung's Tutorial

Evaluating snippets and expressions

Tung's Tutorial project

Using the Java browsing perspective

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


- Select the Java Browsing Perspective.


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


Writing and running JUnit tests

Tung's Tutorial