SourceForge.wpi.edu

All examples used in class can be retrieved by the accessing the sourceforge.wpi.edu repository. Sourceforge is an industrial-robust code version control system. While at first, there is a learning curve towards retrieving information from sourceforge, you will quickly come to realize just how powerful it is and how much easier our lives are because of it!

Accessing Code Examples From Within Eclipse

As an Integrated Development Environment (IDE), Eclipse is rapidly becoming accepted worldwide as the de facto standard for code development. Hey, you can even read you email from within Eclipse (but I'm not going to show you how to do that!). You should follow the instructions below to get access to the course examples.

Requesting a SourceForge Account

Visit sourceforge.wpi.edu to request an account for your time at WPI. This account will give you access for CS509 but you will find that over your time at WPI, there will be countless ways in which sourceforge can make your life easier.

When you visit sourceforge.wpi.edu, you will be presented with the above window where you should request a new account. There will be a delay, of up to 24 hours, so please secure this sourceforge account soon so you can access the course examples easily. You will be asked for information as shown below:

Please use your CCC account as your User Name, and you will need to use your CCC password too; make sure you use your CCC email address properly as well. This request will be processed by WPI personnel within 24 hours.

Requesting access to CS509

Each student must request access to the CS509 project from within sourceforge. To do so, click on the "Projects" menu item on the SourceFORGE menu bar. Select menu item "All Projects". You will be shown a full set of sourceforge projects. Find CS509 in the list, check the radio button to the left, and then click on the Request Membership button at the bottom right of the screen (you may have to scroll down to see the button).

Your request will be posted and each night I will make sure to authorize these requests until everyone in the course has access.

Once you have successfully created an account, logged in, and your CS509 request has been accepted, you will see the following upon login (note that CS509 should be within My Recent Projects).

Note that under "My Recent Projects" you will find an entry "CS509". Click on it to bring up the project home page:

At the top of the workspace is a button "Source Code". Click on it to find the Repository for the course. The important information is presented in the following screen:

The key information is that the Server is sourceforge.wpi.edu and the Repository path is /cvsroot/code509.

Accessing CVS from within Eclipse

Start Eclipse. I recommend that you create a new Eclipse workspace so you won't clutter your ongoing projects with the many examples that I will post.

Select the "File -> Switch Workspace..." menu item and enter the name for a directory that doesn't exist. Eclipse will go ahead and create a new workspace for you. You will be presented with the Eclipse splash Screen below: Click on "Enter the workbench".

You will now see the following screen:

Your task is to connect to the CVS server as hosted by sourceforge.wpi.edu. From the Window menu, select Open Perspective->Other...

This will bring up a dialog box from which you select CVS repository:

You now will be seeing the CVS Repository Exploring Perspective. One of the strengths of Eclipse is its ability to provide a single workspace within which any number of perspectives can be shown. Below is the CVS Repository Exploring perspective.

Within the blank tabbed panel labeled "CVS Repositories", press the Right Mouse button, select New and select Repository Location... You will be given a wizard that takes all input necessary to connect to the sourceforge.wpi.edu repository:

Enter in the information as shown above. For User, enter in your CCC user name. Make sure you change the "Connection type" to read extssh. I recommend that you leave the "save password" check box unchecked for security reasons. Once you click on Finish (assuming you have an Internet connection!) Eclipse will try to connect you to the sourceforge repository. You will be prompted several times with security messages, asking about machine certificates and the like. Simply say "OK" to each on in turn until you see the screen below:

This is the primary CVS repository for CS509 Examples. The good news is that once you have reached this step, you will not have to redo the steps above simply to access the repository. Eclipse will remember it for you. Now, click on the "+" box to expand the source files as maintained by this repository.and then click on the "+" box next to HEAD.

Under HEAD, there will always be an entry labeled CVSROOT which should always be ignored. Every other folder as shown under HEAD is a potential project that you can "check out" and download to your Eclipse workspace.

With your right mouse button, click on the "Jan-19" folder and select the Check Out menu item. To see the project that you have just downloaded, show the Java Perspective, which you can do by selecting Window -> Open Perspective -> Other...  and select Java (default). Select the Navigation tab and you will see the final result below:

To run the example, right click on "FirstExample.java" and select "Run As -> Java Application" and the Console output will appear as above.

Updating the Examples as needed

As new examples are created (daily, if not twice daily!) you should refresh your project set. Simply go back to the CVS Repository Exploring Perspective and refresh the HEAD to see if any new projects are available. If one is, repeat the steps above to check out the project into your repository.

If an existing project has changed (for example, if I announce there is a fix to an existing project example) you can simply delete that project from your workspace and once again check it back out into the workspace as above.

© 2006, George Heineman