CSE 70, Spring 2010
Software Engineering
Lab Instructions
Using Subclipse and Handling Conflicts.
PART I: Eclipse and Subclipse
-
Start Eclipse. (In a terminal, run
eclipse.)
-
Select an appropriate place to put your workspace.
All your project files will be saved under this directory.
The default is probably fine.
-
Download your project from the repository using the Subclipse plugin:
-
From the Window menu,
select Show View -> Other...,
then select SVN -> SVN Repositories
and press OK.
-
In the SVN Repositories tab at the bottom-right,
press Add SVN Repository,
enter your team's SVN repository URL
(like
http://cse70.ucsd.edu/svn/teamN),
then press Finish.
You'll need to enter the username and password we provided you.
-
You should now see an item in the SVN Repositories tab.
Expand it, then right-click on
trunk
and select Checkout...
-
In the Checkout from SVN dialog,
select Check out as a project configured using the New Project Wizard
and press Finish.
-
In the New Project dialog,
select Java -> Java Project and press Next.
- In the New Java Project dialog, enter a project name (anything you like) and press Finish.
- In the Open Associated Perspective? dialog, press Yes.
- In the Confirm Overwrite dialog, press OK.
- Now you'll need to do some post-checkout configuration:
- You should now be in the Java perspective and see an item in the Package tab on the left. Expand it.
- In the Package tab, find your
tests directory. Right-click on it and select Build Path -> Use as Source Folder. The icon should change to look like the one for the src directory.
- In the Package tab, expand the
lib and lib/jmock directories. Select all the jar files, then right-click and select Build Path -> Add to Build Path. The jars should appear under Referenced Libraries.
-
To run the program, right-click on the source folder
src and select Run As-> Java Application. Eclipse will automatically locate your main and begin your IRC Client.
-
To run all the tests, right-click on the source folder
tests and select Run As-> JUnit Tests. You should see a nice window displaying all tests that were run and whether or not they passed.
PART II: Editing files, Team Synchronizing Perspective, and Checking In files
-
In your teams, get together and add a comment to
IRCClient.java above the constructor like so:/**Default Constructor**/
-
We will now use the Team Syncrhonizing perspective to view the changes
-
To get to the perspective,
select Window-> Open Perspective-> Other...
and choose the
Team Synchronizing perspective.
-
In the Synchronize, press the small button at the upper-right,
select SVN, press Next and then finish.
This will sync your current code with the repository you will see your code.
-
Double-click on
IRCClient.java to open the Java compare view.
The right side shows the version in the repository;
the left side shows your working copy.
Notice that the repository's version does not have your comment.
-
Were you to want to commit this change to the repository
you could right-click on the
IRCClient.java
and select commit... but DO NOT COMMIT.
-
To remove the changes you made,
right-click on
IRCClient.java and select Revert....
A dialog box will appear showing all files to revert.
Press OK to revert your changes.
Notice once you revert your changes,
the file looks identical to the one in the repository.
-
To return to your previous perspective,
select Window-> Open Perspective-> Other...
and select the
Java (default) perspective.