Tool Mentor: Using Workspaces in Method Composer
This tool mentor describes how to use workspaces in Method Composer, including how to create them, load them and update them.
Tool: Method Composer
Main Description

This tool mentor includes some recommended best practices for setting up and working with workspaces in Method Composer. For general information on setting up and using workspace libraries in Method Composer, see the Method Composer online help topic: Collaborating > Sharing method libraries and elements with version control systems > Workspace method libraries. The latest information on this topic is also available from the RMC Information Center.

General conventions

When using workspaces, you generally define three different physical directories:

  • External Baseline: Directory where the content you are using, but not developing, is located. These should be treated as read-only and should not be placed under version control since they are not being developed.
    Note: There can be more than one external baseline directory. For example, you may be dependent on content that exists in multiple different repositories.
       
  • Development Repository: Directory where you keep the projects that are under development. These should be placed under version control.
    Note: There can be more than one development repository directory. For example, you may be developing content that is controlled using multiple version control systems.
        
  • Personal Workspace.  Directory where each method author maintains a selected set of elements loaded from the External Baseline and the Development Repository. This is the method author's "development method library". 
    Name: mam_ws.<rmc version number> (e.g., mam_ws.75). You may define as many of these as you like. For example, you may want a workspace that contains everything and you may want a workspace that only includes a specific set of elements. The files in the the personal workspace directory should not be placed under source control, since the information kept in the workspace is specific to your particular instance of Method Composer.

Note: If you are not placing your elements under version control, a personal workspace could also serve as the development repository (though it is recommended that a version control system be used).

For specific information on creating, loading and synchronizing a workspace-based method library, see the sections below. 

   

Creating an external baseline

External baselines should be placed in a location with read only access.  You can also choose to lock the plug-ins to avoid inadvertent changes.  Note that configurations can not be locked.

If you are using the content that ships with Method Composer as an external baseline, then you can just use the directories in the Method Composer install directory that contains the content as the External Baseline directories, and there is no need to create new directories.

      

Creating a development repository

Now you need to create a place where you can place the files that are under development.  This is typically a directory structure within a version control system.

Loading content from CVS into a workspace

This section provides step-by-step instructions for loading from CVS. For general information on loading workspaces, see the Method Composer online help topic: Collaborating > Sharing method libraries and elements with version control systems > Workspace method libraries > Importing method plug-in projects or method configuration projects into a workspace method library. The latest information on this topic is also available from the RMC Information Center.

Perform the following steps to load an Method Composer workspace with content from CVS:

  1. Set the preferences for CVS (open source content that has been donated resides in CVS).
    Select Windows > Preferences.
    Click on Team > CVS > Watch/Edit and select the following options:
    Click OK.
    Note: These preferences must be set for each individual workspace!
  2. Indicate what CVS repository you want to load from.  In this example, we use the CVS repository that contains the content we have donated to the EPF project (the open source UMF content).
    • In RMC, open the "CVS Repository Exploring" perspective
    • Create a new repository location in the CVS Repositories view:
    • Enter the repository and your account information and review other settings

       Note: Non-committers use 'anonymous' for the user, leave the password empty, and select 'pserver' for the connection type. Committers use their Eclipse account user ID and password, and select extssh for the connection type.

      Click Finish.
    • Expand the HEAD branch of the tree.
    • Expand org.eclipse.epf, and find the library folders you are interested in importing.
  3. Select the content you want to load (you can shift-click and/or control-click to select multiple elements). 
    In this example, we will be importing content from libraries/EPF_Practices_Library (all core.gen and core.default folders).

  4. Right-click and select "Check Out As".  Don't worry, you are not really checking anything out ;-).
  5. On the next dialog box, select "Check out into the workspace as projects" option as shown below: 

    Click Next.
  6. On the next screen, select the project location. Check the "use default workspace location" option. Click Next. Click Finish.

Note: You can just ignore any errors that you get or see in the Problems view.  Re-opening the library should eliminate those errors.  If it does not, you may have not loaded a library element that is needed by another library element that you did load (i.e., you missed a needed plug-in), or the plug-in you are trying to import has improper references.  For more information on processing errors reported in the Problem View, see the Method Composer online help topic:Designing and managing process > Getting started with authoring > Working with Problems view. The latest information on this topic is also available from the RMC Information Center.

Now you have loaded the CVS content into your workspace. To see the result, go back to the RMC Authoring perspective and select File > Open Method Library (being sure to check the "open from workspace" option).  You should see the loaded content in your library.

Renaming plug-ins in a workspace that reside in a separate version control system 

When a plug-in is created in a workspace-based method library, three elements are created:

  1. A directory to contain all of the plug-in files (the directory name is the same as the plug-in name,
  2. A plug-in.xmi file the defines the structure of the plug-in (the plug-in name is specified in the file),
  3. A .project file that defines the associated project (the plug-in name is specified in the file as the project name).

Method Composer works fine if the name used for the plug-in and project are different, but it can get confusing, so it's best to keep them the same. Thus, when you change the name of a plug-in, you need to make sure you rename the associated plug-in directory and the project name in the .project file.

Perform the following steps to rename a version controlled plug-in:

1. Rename the plug-in in Method Composer. Right click the plug-in and select Rename. Enter the new name. Edit the plug-in description, adjusting the Presentation name and Brief description, as needed.

2. Remove the project associated with the plug-in from your workspace without deleting the source. 

  • Right click on plug-in name in the Library view. Select "Show in Resource Navigator".  The associated plug-in,xmi file will be highlighted in the Navigator view.
  • Right click the containing folder in the Navigator view and select Delete. Click the "Do Not Delete Contents" button. The plug-in will be removed from the workspace and method library, but not from the file system.     

3. Rename the plug-in project elements in your version control system:

  • Rename the folder
  • Check out and edit the .project file and change the <name> tag to the new plug-in name.
  • Check in the .project file

4. Reimport the plug-in project into your workspace. Be sure to import a reference and not "copy the projects" into your workspace. For more information, see the "import" section above. 

Moving elements from the workspace to another location

Perform the following steps to move elements in a workspace from the workspace to another location:

  1. Remove the project from your workspace without deleting the source. 
    • Right click on the element name in the Library view.  Select "Show in Resource Navigator". The element will be highlighted in the Navigator view.
    • Right click the element name in the Navigator view and select Delete. Click the "Do Not Delete Contents" button.  The element will be removed from the workspace and method library, but not from the file system.
           
  2. Manually move the element from the workspace directory to the new location.
  3. Reimport the elements from the new location. For more information, see the "import" section above.

Removing elements from the workspace

Perform the following steps to remove elements from a workspace:

  1. Right click on the element name in the Library view.  Select "Show in Resource Navigator". The element will be highlighted in the Navigator view. 
  2. Right click the element name in the Navigator view and select "Delete". 
    • If you want to remove the element from the file system too, click "Yes" button when asked if the source should be deleted. The element will be removed from the workspace, method library and file system.
    • If you want the element to remain on the file system, but want it to be removed from the workspace and hence the method library, click "do not delete contents". The element will be removed from the workspace and method library, but not the file system.