The ClearTeam Explorer plugin for Eclipse allows developers to work in a ClearCase controlled environment. ClearCase/UCM affords an activity-based way of tracking changes in a code base that allows you to keep track of work. Each artifact version created is added to the current activity change set. The ClearTeam Explorer offers a few ways to visualize your activities with their change sets. These visualizations are a very useful aid in keeping work organized.
I will assume that the ClearCase environment is one that is using ClearCase UCM activities via the CMI task integration, and that the development tool is Eclipse with the ClearTeam Explorer IDE plugins installed. I will also assume that you have some experience working with Eclipse/CTE plugin/ClearCase usage, in that you have performed some of the basic operations in UCM using the Eclipse/CTE IDE.
UCM Particulars – Setting Activities/Tasks
UCM workflow in a multi-stream environment can be thought of in simple terms: Set an activity -> work on artifacts (checkout/modify/check in) -> rebase upon completion to pick up other team changes -> deliver your changes to the integration stream. Frequent rebasing (even outside this workflow) is a very good habit to get into as it minimizes eventual merge conflicts.
When working within the confines of Eclipse with the CTE plugin, I recommend setting an activity prior to doing any work related to a task. The activity is set by acquiring view context first. You do this in Eclipse by switching to the ClearCase perspective, opening up the views tree root, and selecting a view. If you already have projects in your Eclipse project explorer workspace, view context is obtained by selecting any project root or file in the project explorer.
Setting an activity using the ClearTeam Explorer in the ClearCase Perspective
When you use the former method (by selecting a project or artifact) you use the same pull down menu to preemptively set an activity. The icon next to the pulldown, fires the create activity wizard which you would use if you do not have any activities for that stream yet. With the task integration enabled, the wizard works a bit differently asking you to search for a task or work item title or to create a new task/workitem. Once your activity/task is set, any checkouts will add that version to your change set. You can work on different activities/tasks prior to delivering any but you will need to keep a more careful track of which one is currently set.
The Change Set View
In the case where you have been working on a specific activity using the Eclipse/CTE ide, you will have already modified several artifacts in their Eclipse project. This is accomplished by setting a task or activity and performing one or more checkouts of artifacts, subsequently modifying them and then when completed, checking the artifacts in. This results in one or more artifacts to be added to a change set under the specific task/activity. At this point, if all the artifacts have been checked into your branch, all that remains is to review and deliver the changes to the integration stream. To see a complete list of artifacts modified while working on an activity, you can switch to the ClearCase perspective in Eclipse which brings you to the ClearTeam explorer. You can expand the views node, right click on the view you're using and bring up the change set for the current activity. The resulting view appears thusly in the ClearTeam explorer:
In this screenshot, I’ve filtered out all but the latest version of the artifacts that have been modified for the associated activity. The icons in the upper right are buttons that allow this view to be used to show change sets for any view the CTE knows about and for any of each views activities. By selecting a line item, and right clicking, various actions such as comparison between versions can be performed. If the current artifacts in the change set are checked-out they will show as such as shown by one of the entries. You can check the artifact in from the context menu that will appear on a right click of the checked out artifact. You need not go to the CC perspective to bring up the change set view… it is available from the team menu so long as you can establish view context (eg. clicking on a ClearCase-controlled project in Eclipse’s project explorer).
The Pending Changes view
The CTE pending changes view affords some of the same information as the change set view in that the changes will be organized by activities. Below is a screen shot of the CTE pending changes view for outgoing changes:
Note that the icons in the upper right allow you to see all changes, incoming changes (from the integration stream) and outgoing changes (from your development stream). In this case the outgoing changes are shown. Note that the last two items are showing as checked out. In this case it was deemed additional changes were needed. These artifacts must be checked in prior to delivery or only the prior version will be delivered. An artifact has also been hijacked to illustrate how pending changes handles the case when one is using the so-called web or snapshot views in ClearCase, and have hijacked a file. To deliver that change (if need be) the hijack must be converted to a checkout.
The pending changes view affords you the ability to know a bit more and to control the flow of changes into and out of the dev/integration streams. For example, any artifact in the list can be right-clicked and compared to the change it represents. In the case of outgoing changes, the diff will be between the version current on the integration stream and the developer’s development stream. If there are conflicting changes, they will show as a double headed red arrow annotation on the artifact and the comparison will be available to view. Upon delivery (for outgoing changes) you will need to resolve any conflicts.