Java Tutorial - Java Script :
CVS Integration with IDE
Both NetBeans and Eclipse have integrated support for CVS built directly into the IDE. The following sections describe how CVS is integrated into Eclipse and NetBeans, respectively.
CVS and Eclipse
Eclipse provides one advantage over other CVS clients that we have seen to date: Eclipse supports a convenient repository browser. Most CVS clients focus on the client side and the files that have been checked out. Eclipse allows the user to browse the repository on the server. This is very useful when you are first starting to work on an existing project that already has a repository.
To use CVS from Eclipse choose Window ➪ Open Perspective ➪ CVS Repository Exploring, and then right-click in the CVS repositories panel and choose New Repository Location. Enter the information needed to access the
CVS server and repository. After you have clicked the Finish button, the repository will be represented as a tree in the left panel, as shown in Figure 4.10.
From here, you can expand the tree and explore the modules stored within the repository. Right-clicking on a module provides a menu item to check out the module as a new project.
New modules can be added to the repository by selecting a project node, right-clicking, and choosing Team ➪ Share project. The dialog box will prompt you to select a repository. After a project has been associated with a repository,
the team menu offers the ability to commit and update the project with the repository.
CVS and NetBeans
NetBeans takes a different approach to CVS integration. In NetBeans, you mount a CVS repository just as you would a local directory or a .jar file. ACVS repository can be mounted from the Explorer pane by right-clicking on the root node and choosing Mount, or by using the menus and selecting Versioning ➪ Mount Version Control ➪ CVS. This starts New Wizard - CVS. The wizard first prompts you for the working directory. This is the directory that will be used as the CVS sandbox on your local system. The next dialog box prompts you for the CVS connection information. The home directory screen only appears for Windows 98 and ME users. The CVS client dialog box allows you to choose between the built-in CVS client or an external CVS client, defaulting to the built-in client. The login dialog box allows you to enter a password and log into CVS. It also shows if you are already logged in. Finally, the initial checkout screen gives you an opportunity to check out the entire repository to your local system. In many situations, this is undesirable, so leave the box blank and select finish.
Modules can be checked out of CVS by choosing Versioning ➪CVS ➪Checkout. In the default configuration, this will give you a warning that the default values will be used unless you held the Control key down when you selected
the menu item. Unfortunately, the default seems to be to check out the entire repository. The way to fix this behavior is to choose Tools ➪ Options ➪ CVS Client Settings, and change the item labeled User Interface Mode to GUI Style. Now you will always be prompted for checkout arguments before the checkout begins. Once again, be aware that the default values in the dialog box will check out the entire repository. At this point, the you should replace the value in the module field with the name of the module that will be checked out.
Getting started in CVS with NetBeans can be a little awkward, primarily because the user interface provides little easy control of what is copied from the repository. If the modules have already been checked out of the repository
using another CVS client, NetBeans becomes a little easier to work with. If the directory is mounted as a CVS directory, then NetBeans will provide access to the CVS commands, maintaining the coordination of the directory with the repository. Unfortunately, NetBeans does not automatically recognize when a file system is already under configuration management control. This means that it is up to the user to manage the file system and its relationship with CVS by mounting the system as a CVS-controlled system.
