Eclipse

Using CVS From Eclipse

Remote Testing Plugin

Eclipse online resources

Eclipse books

 

Eclipse:

Using CVS From Eclipse:

  • CVS is a version control system that will allow you to work on your project from different machines as well as to collaborate with your partner on team projects. In order to use CVS, the first step is to create a repository. A repository is just a directory which contains many projects, and for each project it contains all the versions of all the files you have ever committed. Once your repository is set up, you can add projects to it, and for each project, you can commit and update any files in the project. Committing a file in the project will send that file to the repository as a new version. Updating a file will get from the repository the latest version of the file. What follows are some instructions to set up your repository, register your repository in eclipse, committing files into the repository, and checking out files from the repository into another machine.
  • Creating a repository in your instructional account
    1. Log in to your class account on an instructional unix machine (You can ssh to solar.cs.berkeley.edu).
    2. Enter the following command line and press Enter: > /home/ff/cs164/remote_testing/setup_cvs
    3. The script will prompt you for you initial class account password. Please enter your exact initial password, NOT your current password. At the end of the script, it will tell you the cvsroot path it has set up for you. Take note of it.
  • Registering your repository in Eclipse
    1. First, you need to open the "CVS Repository Browsing" perspective. Go to Window -> Open Perspective, and choose "CVS Repository Browsing" (if it does not appear in the list, go to "Other..." and choose it from there). You should see a view called "CVS Repositories" on the left side of the Eclipse window.
    2. Right-click in the "CVS Repositories" view and select New -> Repository Location. An "Add CVS Repository" dialog should appear. Fill in the following values in the dialog:

Host: solar.cs.berkeley.edu

Repository Path: the cvsroot path you got from the script

User: your instructional account user name

Password: your instructional account password

Connection type: extssh

    1. Leave "Use Default Port" and "Validate Connection on Finish" as is, and click the "Finish" button. If all goes well, the connection should be validated and your repository should show up in the CVS Repositories view
  • Adding a project to the repository
    1. Once you have your repository set up in Eclipse, you can add a project to the repository as follows. Right click on the project in the Package Explorer view, and go to "Team -> Share Project...". A "Share Project" dialog should appear. In the dialog, select "Use existing project location:", and choose the repository that you previously created, and then click Next. In the next screen, you can leave "Use project name as module name" checked, or choose a new name for the module if you'd like. Click Next and then Finish; Eclipse will connect to the repository and do some initial setup (it may take a minute).
    2. Now, you can right click on the project, click on “Team->Commit”, and commit all your files into the repository.
    3. See this page for screenshots of this process.
  • Checking out a project from the repository
    1. Once you've added your project to the repository, you (or your partner) may want to check out the project on a different computer. To do this, first set up the repository in the CVS Repository Browsing perspective as described above. Then, open the list under the repository in the CVS Repositories view, and then open the HEAD list. You should see your project listed. Right click on the project folder, and select "Check Out As Project." If you added the project as described above, then that should be it! You should now see the project in the Java perspective.
    2. NOTE: It is possible to run into a UNIX permissions problem at this step, preventing the checkout. If this occurs, the person whose account hosts the repository should log in and run the following commands (PROJNAME is the name of your project):

cd share/SECRET/cvsroot

chmod -R 770 PROJNAME

In general, you may have to do this whenever directories are added to the repository.

  • Using the repository
    1. See here for an example of committing a changed file to the repository. In general, when you want to synch up with the repository, right-click on your project in the Package Explorer, and go to "Team -> Synchronize with Repository...". This should pop up the Synchronize view, showing the differences with the repository. To get an update from the repository, right-click on a file and choose "Update," and to commit changes to a file, right-click on it and choose "Commit." You can use the up and down arrows in the view to graphically view the differences between the local file and the repository.

Remote Testing Plugin 1.1.0:

Eclipse online resources:

  • When overwhelmed by Eclipse menus and buttons, go through a simple tutorial and things will start making sense. A good introduction on how to develop Java programs in Eclipse is in Eclipse Help (go to Help / Welcome / Overview / Java Development).
  • To exploit what Eclipse has to offer, and to save time before the deadline, check out Tips and Tricks (go to Help / Tips and Tricks / Eclipse platform, and Help / Tips and Tricks / Eclipse Java Development Tools).

Eclipse books:

Most questions you'll have about Eclipse will be answered somewhere in Eclipse Help. If this fails, you can try the following books: