Table of Contents

1      Visual Studio Plug In. 1

1.1       Adding projects to the source control system. 1

1.2       Opening existing projects under source control 2

1.3       Operations 4

1.4       Additional source control operations 5

1.5       Working disconnected. 6

2      JDeveloper plugin. 7

2.1       Adding projects to the source control system. 7

2.2       Operations 9

2.3       Decorators 10

3      Eclipse Plug In. 12

3.1       Adding projects to the source control system. 12

3.2       Opening existing projects under source control 15

3.3       Operations 15

3.4       Refactor support 17

3.5       Preferences 18

3.6       Decorators 18

3.7       The Plastic SCM perspective. 19

3.7.1      Console view. 20

3.7.2      Workspace explorer view. 20

3.7.3      Pending checkouts view. 22

4      IntelliJ 5 Plug in. 23

4.1       Setup the Plug in. 23

4.2       Checkout from Version Control 25

4.3       Item status overview. 27

4.4       Opening existing projects under source control 28

4.5       Basic operations 28

4.6       Refactoring support 32

5      IntelliJ 8 Plug in. 34

5.1       Setup the Plug in. 34

5.2       Checkout from Version Control 36

5.3       Item status overview. 37

5.4       Opening existing projects under source control 38

5.5       Basic operations 38

5.6       Refactoring support 44

5.7       Work offline mode. 44

 


Figures

Figure 1: Adding to the version control from Visual Studio. 2

Figure 2: Change source control from Visual Studio. 2

Figure 3: Linking projects 3

Figure 4: Operations on a checked in file. 4

Figure 5: Operations on a checked out file. 4

Figure 6: Additional SCM operations in Visual Studio. 5

Figure 7: Change source control 6

Figure 8: Checked out without connection. 6

Figure 9: Protection when regaining connection. 6

Figure 10: Select Plastic SCM as version system. 8

Figure 11: Plastic SCM location. 8

Figure 12: Preference empty. 9

Figure 13: Refresh status 9

Figure 14: Plastic SCM operations from JDeveloper 10

Figure 15: Error when changing without checking out 10

Figure 16: Share project option. 13

Figure 17: Choosing your version control: Plastic SCM. 13

Figure 18: Plastic SCM settings 14

Figure 19: Adding items to Plastic SCM. 14

Figure 20: Checked out items 14

Figure 21: Check in recursively. 15

Figure 22: Eclipse plug in operations 16

Figure 23: Plastic SCM toolbar in Eclipse. 17

Figure 24: Plastic SCM preferences 18

Figure 25: Plastic SCM decorators in Eclipse. 19

Figure 26: List of perspectives available in Eclipse. 19

Figure 27: Console view of the Plastic SCM perspective. 20

Figure 28: Workspace explorer view of the Plastic SCM perspective. 20

Figure 29: Merge dialog of the Plastic SCM perspective. 21

Figure 30: Properties dialog of the Plastic SCM perspective. 21

Figure 31: Pending checkouts view of the Plastic SCM perspective. 22

Figure 32: Settings window of IntelliJ5.1. 24

Figure 33: Version Control dialog of IntelliJ5.1. 24

Figure 34: Plastic SCM plugin configuration window. 24

Figure 35: Test Connection message. 25

Figure 36: IntelliJ5.1 main window, Check out from Version Control remarked. 25

Figure 37: Dialog to select repository, branch and label 26

Figure 38: Dialog to select workspace. 27

Figure 39: Dialog to create a new workspace. 27

Figure 40: Example of the color scheme. 27

Figure 41: Plastic SCM operations for an item. 28

Figure 42: Plastic SCM checkin dialog. 29

Figure 43: Plastic SCM checkin dialog for directories 29

Figure 44: IntelliJ5.1 Clear Read-only status dialog. 30

Figure 45: Example of the command ‘Annotate’ 30

Figure 46: Plastic SCM history view for an item. 30

Figure 47: Version Control menu, showing more PlasticSCM options 31

Figure 48: Plastic update project dialog. 32

Figure 49: Plastic SCM merge dialog. 32

Figure 50: Settings window of IntelliJ 8. 34

Figure 51: Version Control selector of IntelliJ 8. 35

Figure 52: Plastic SCM plug in configuration window. 35

Figure 53: Test Connection message. 35

Figure 54: IntelliJ 8 main window, check out from Version Control remarked. 36

Figure 55: Dialog to select repository, branch and label 36

Figure 56: Dialog to select workspace. 37

Figure 57: Dialog to create a new workspace. 37

Figure 58: Example of the color scheme. 38

Figure 59: SCM operations for an item. 39

Figure 60: Check in dialog. 39

Figure 61: IntelliJ 8 Clear Read-only status dialog. 40

Figure 62: Example of the command ‘Annotate’ 40

Figure 63: Plastic SCM history view for an item. 41

Figure 64: Version Control menu, showing more Plastic SCM options 41

Figure 65: Update project dialog. 42

Figure 66: Create branch dialog. 42

Figure 67: Merge dialog. 43

Figure 68: Create workspace dialog. 43

Figure 69: Work offline option, in the Plastic SCM menu. 44

 


About this guide

This guide describes Plastic SCM’s regular use. It will introduce the features and techniques used to get the most out of the tool.

Audience

This guide is targeted to the average developer, assuming familiarity with operating system concepts, programming languages and integrated development environments (IDEs) like Microsoft Visual Studio or Eclipse.

Online documentation

Besides this document and the rest of the guides, Plastic SCM provides online reference throughout its different client frontends.

On the command line interface, both Windows and Linux, this reference can be obtained with the command:

cm help

For extended information on a specific command, type:

cm help command 

The graphical interface provides online reference through the Help menu.

Documentation errors

If you find any problem in this guide or any other part of the online reference, please report it using the following email address:

 

support@codicesoftware.com

 


1     Visual Studio Plug In

Visual Studio Plug In allows users to work with Plastic SCM from any development environment compatible with API SCC. The Plug In is fully compatible with Visual Studio 6, 2003, 2005, 2008 and 2010.

The main operations needed to easily work with the system from Visual Studio will be described.

1.1    Adding projects to the source control system

This will be done when the project on which the user wants to work is already on disc but not under Plastic SCM control.

Requirements:

 

Steps to follow:

Figure 1: Adding to the version control from Visual Studio

1.2    Opening existing projects under source control

This operation is done whenever the solution has already been added to Plastic SCM. The developer would have to let Plastic know where the solution is located

The following steps should be taken:

Figure 2: Change source control from Visual Studio

 

 

Figure 3: Linking projects

 


1.3    Operations

On each Visual Studio file menu, there is a list of basic operations related with source control. See Figure 4 and Figure 5.

 

 

 

Figure 4: Operations on a checked in file

 

Figure 5: Operations on a checked out file

 

·         Check out: It checks out the selected items. If the selected item is a solution or a project, it will check out every folder belonging to that solution or project.

·         Obtaining the latest revision: It updates the selected item.

·         Comparing revisios: It shows the differences between the workspace revision and the server revision.

·         Check in: It checks in the selected items.

·         Show check outs: It shows every checked out item.

·         Undo checkout: It undoes the selected items´ check out, leaving them going back to the state before being checked out.

1.4    Additional source control operations

Additional source control operations can be found on menu File / Source control, as shown on Figure 6.

Figure 6: Additional SCM operations in Visual Studio

1.5    Working disconnected

When no network connection to the server is available and changes must be done, users can choose the work disconnected option. The following steps must be followed.

First of all you would access to File / Source control / Change source control, as shown on figure 85. Press disconnect.

Figure 7: Change source control

The system is able to memorize the check outs done by the user selecting  check out (without connection). Then a dialog as shown on Figure 8 will appear.

Figure 8: Checked out without connection

When the connection is back, the check outs done without connection will be sent to the server, showing a box as in Figure 9.

Figure 9: Protection when regaining connection

 

2        JDeveloper plugin

JDeveloper plugin allows users to work with Plastic SCM 1.5 or higher editions from JDeveloper 10 or higher.

The main operations needed to easily work with the system from JDeveloper will be described.

Before starting to use the tool, users must know where is the Plastic SCM repository on which the JDeveloper projects will be located.

2.1    Adding projects to the source control system

This operation will be done whenever the project on which the user wants to work exists on his machine but is not yet under Plastic SCM control. Files created in JDeveloper before using Plastic SCM must be imported into Plastic SCM repository and checked out.

 

Requirements:

·         All project files including source code must be located under an existing workspace on the user’s hard disk.

Steps to follow:

Figure 10: Select Plastic SCM as version system

Figure 11: Plastic SCM location

In the case that Plastic SCM location has not been indicated on the Tool´s Preferences, JDeveloper will show the error shown on Figure 12.

Figure 12: Preference empty

Figure 13: Refresh status

2.2    Operations

On each JDeveloper file menu there is a set of basic operations related to the source control:

 

Figure 14: Plastic SCM operations from JDeveloper

 

·         Add to Plastic SCM: It adds the selected items.  

·         Add to Plastic SCM recursively: It adds the selected items and if they are folders, it also adds their content.

·         Check in: It checks in the selected items.

·         Check out: It checks out the selected items.

·         Undo checkout: It undoes the selected items check out, going back to the state before being checked out.

·         Update: It updates the selected item.

·         Diff with previous: It shows the differences between the workspace revision and the server revision.

·         Version tree: It obtains the version tree from which the differences between any two versions can be shown.

·         Remove from Plastic: It removes the project from the source code.

·         Refresh status: It refreshes the project status.

If the user tries to change a file but has not previously checked it out, the system will throw the error shown on Figure 15 so the user can check out the item.

Figure 15: Error when changing without checking out

 

2.3    Decorators

Decorators are small icons shown next to an item showing its state. They are activated by default when installing Plastic SCM Plugin.

JDeveloper decorators are the following ones:

 

 It indicates that the item is not inside a workspace or that it has not been recognized by Plastic SCM client.

 

 It indicates that the item is private.

 

 It indicates that the item is checked out.

 

 It indicates that the item is checked in.

 

3        Eclipse Plug In

Eclipse Plug In allows users to work with Plastic SCM from Eclipse integrated environment, providing the most common operations used by developers. Eclipse Plug In is compatible with Eclipse 3.1 and further editions.

3.1    Adding projects to the source control system

In order add an existing project to the source control system it is necessary to have an existing workspace on Plastic SCM containing the project on which you would be working. On the example, the workspace will be located in ‘c:\wks’, and the project structure will be the following:

C:\wks
C:\wks\project
C:\wks\project\src\...

The project will be opened in Eclipse as usual. In order to add the project to Plastic SCM for the first time, the project’s directory must be selected either from the package explorer or from the browser, right click, menu Team, option ‘Share Project’.

Figure 16: Share project option

Eclipse will ask which version control should be used.

Figure 17: Choosing your version control: Plastic SCM

By selecting Plastic SCM, the Plugin must be indicated where to find the executable

 ‘cm.exe’. It will usually be located on the folder ‘Program Folder\Plastic SCM\client’, unless another location was selected on installation.

Figure 18: Plastic SCM settings

The link between the project and Plastic SCM is therefore created. The following step would be adding the items recursively. Either the whole project or just a part of it can be added, although the usual procedure would be adding the entire project.  In order to do this, having selected the project, right click, menu Team, option ‘Add to Plastic SCM recursively’

Figure 19: Adding items to Plastic SCM

Once added, the items will be checked out, reflected on the grey tick next to each of them:

Figure 20: Checked out items

In order to complete the process, items must be checked in. Having selected the project’s folder, right click, menu Team, option ‘Check in recursively’ will protect them and the grey tick changes into a small orange cylinder, indicated that they are checked in.

Figure 21: Check in recursively

The project is now ready to be used by various developers.

3.2    Opening existing projects under source control

Whenever another developer is going to use a project which has been already added, he would have to create a workspace and do an update operation, which would make a copy of the project from the repository. This can be achieved from the graphic user interface or from the command line:

cm update .

Once this is done, the project should be opened from Eclipse and having selected the project’s folder on the package explorer or the browser, menu Team, option ‘Share Project’, as in the previous case. Once the link process is achieved, as in the previous section, the items will be ready to start working with.

3.3    Operations

Operations available from Eclipse are in the context menu Team when right clicking on a project’s item.

Figure 22: Eclipse plug in operations

The available operations are the following ones:

Some of these operations can be done from Plastic SCM toolbar, with the following appearance:

Figure 23: Plastic SCM toolbar in Eclipse

The buttons correspond to the following operations (from left to right):

3.4    Refactor support

Plastic SCM provides complete refactor operations support, especially effective when renaming and moving items from one folder to another.

Note for Eclipse 3.1: Due to an Eclipse 3.1 restriction, solved in Eclipse 3.2, refactor for renaming a package could show an error at the end, as the following:

 

This behavior is due to the way in which Eclipse handles refactor and control version Plug in communication. You will only have to press ‘back’ and ‘next’ again, so the operation will be properly achieved.

3.5    Preferences

Changing the preferences related to Plastic SCM Plugin for Eclipse can be done from the menu Window, Preferences. On the option tree select Team / Plastic SCM, and the following dialog will be shown:

Figure 24: Plastic SCM preferences

The following options can be set:

3.6    Decorators

Decorators are small icons shown next to an item showing its state (checked out or checked in). They are activated by default when installing Plastic SCM Plugin, even though it is possible to activate or deactivate them from the menu Window, Preferences. Select from the option menu General / Appearance / Label Decorators. It will show a dialog as shown, allowing to activate or deactivate the decorators.

Figure 25: Plastic SCM decorators in Eclipse

3.7    The Plastic SCM perspective

This perspective includes a console showing the state of the operations performed in Plastic SCM; a view of the current workspace, including branches and labels, and finally a view showing the items that are currently checked out. In addition to this, the ‘Package Explorer view is included.

To open this view in Eclipse, click on ‘Open Perspective’ open_perspective; then click on ‘Other’ and select ‘Plastic SCM’ in the list provided.

Plastic SCM perspective appears highlighted.

open_perspective_dialog

Figure 26: List of perspectives available in Eclipse

Let’s see what can we do in each view:

3.7.1 Console view

console

Figure 27: Console view of the Plastic SCM perspective

In this console we can see the result of some operations performed in the Plastic SCM server, the state of the connection, whether the plug in is active or not, etc.

3.7.2 Workspace explorer view

wks-view

Figure 28: Workspace explorer view of the Plastic SCM perspective

This view includes information related with the workspace, branches and labels, and some operations involved. Let’s see each of these operations:

Right-clicking on the workspace, it is possible to:

Update: It allows updating the workspace with the last contents of the current branch.

Change workspace selector: Opens a text dialog where the user can type the new selector.

Right-clicking on a branch listed in the ‘Branches’ drop-down list:

Create child branch: Creates a new child branch of the selected branch.

Switch to this branch: It changes the workspace selector, pointing to the selected branch.

Merge from this branch: To merge from the selected branch to the current branch where the workspace is pointing right now. This process is quite similar with the same process in the graphical interface of Plastic.

merge-dialog

Figure 29: Merge dialog of the Plastic SCM perspective

Properties: Only available for child branches, it shows the properties of the selected branch, as it would be shown in the graphical interface of Plastic SCM.

properties

Figure 30: Properties dialog of the Plastic SCM perspective

Right-clicking on ‘Labels’:

Create new label: Use this option to create a new label.

If the ‘Labels’ drop-down list is opened, the following options are available:

Switch to this label: To switch the workspace selector to the selected label. It is important to remark that a label is a fix point and it is not possible to check out anything if the workspace selector points to it.

Apply label to workspace contents: It applies a label to the current revisions of the items loaded in the workspace in this moment. This operation will not finish successfully if any item is checked out.

Merge from this label: Opens the merge dialog, described before; this time the source of the merge is the selected label and not a branch as before. The destination of the operation is the branch to which the workspace is pointing right now.

3.7.3 Pending checkouts view

pending-co

Figure 31: Pending checkouts view of the Plastic SCM perspective

This view shows a list of checked out items. It is possible to check in them ci or undo the check out unco for all (clicking on select_all_co) or only for those selected (clicking on Ctrl+click).

Furthermore, when double-clicking on any item listed, the Diff tool of Plastic will be opened, showing the differences between the last version of the current work session and the last version in the repository.

 

4        IntelliJ 5 Plug in

The IntelliJ Plugin allows users to work with PlasticSCM from the IntelliJ environment, providing the most common operations. The plugin is compatible with IntelliJ 5.1.

4.1    Setup the Plug in

In order to work with the plugin, it needs to be correctly configured. To do so, click on the ‘File’ menu and then on ‘Settings’, or press ‘Ctrl+Alt+S’. The settings window is shown.

SettingsGeneral.PNG

Figure 32: Settings window of IntelliJ5.1

In the option list, click on ‘Version Control’. In the dialog opened, select ‘PlasticSCM’ from the list and click on ‘Configure’.

COfromVCSConfigurePlastic.PNG

Figure 33: Version Control dialog of IntelliJ5.1

 

The settings window of the plugin is opened, in which you have to type or select the path to ‘cm.exe’ (‘cm’ in linux). If this field is leaved in blank, the plugin will search a default path based on the default installation directory of PlasticSCM. If ‘cm.exe’ or ‘cm’ (linux) is typed, the plugin will search for the command in the default installation path, too.

SettingsSelectCm.PNG

Figure 34: Plastic SCM plugin configuration window

 

Once this information has been typed, click on ‘Test Connection’ in order to verify whether the given command path is correct and whether the command can be executed. The server has to be running in order for the operation to success.

SettingsTestConnectionOk.PNG

Figure 35: Test Connection message

 

4.2    Checkout from Version Control

This operation allows users to import a project allocated in a PlasticSCM repository; this way is possible to work with it from IntelliJ5.1 using PlasticSCM.

COfromVCS.PNG

Figure 36: IntelliJ5.1 main window, Check out from Version Control remarked

In order to do this is compulsory to have the plugin well configured (proceed as exposed in the previous section). The server used to the checkout from version control operation is the same server configured in the client command of PlasticSCM.

Now, click on this option from the main menu of IntelliJ5.1 and select PlasticSCM as version control.

COfromVCBranchesOverRepository

Figure 37: Dialog to select repository, branch and label

A wizard is shown, in which is necessary to select the desired repository to use and the branch or label to use. It is compulsory to specify a branch or a label so that the operation can finish correctly. To select one option or another, click on the list above a repository to use; then click on the desired option (branch or label) and then click on “…”, which will open a branch or label selector, depending on the case. Press ‘OK’ and then click on ‘Next’.

COfromVCSChooseWk.PNG

Figure 38: Dialog to select workspace

In the next window select the workspace where you want to bring the contents. It is possible to use an existing workspace from the list or create a new one. To do this, press ‘Create new’ and type the name of the new workspace and its path in the local disk.

COfromVCSCreatingNewWk.PNG

Figure 39: Dialog to create a new workspace

Select from the list the workspace to use and click on ‘Next’.

The last screen is shown, which shows the detailed information about the checkout operation. Verify that the information is ok and press ‘Finish’. The system will bring the contents of the selected branch or label, from the selected repository to the workspace specified. Now it is possible to open the project with IntelliJ5.1 as it would be done with any other project.

Notes: Every IDEA module controlled by PlasticSCM has to be allocated in one and only one local workspace. If that is not the case the plugin will be disabled. Nevertheless it is possible to have modules controlled by PlasticSCM and other modules controlled by another version control, or even modules that are not controlled by any version control at all.

4.3    Item status overview.

Any project controlled by PlasticSCM uses a color scheme in the names of the items to specify their state. This state can be verified in the ‘Project’ view.

If the color of the item is green it means that the item has been recently added to PlasticSCM. If it is blue then the item is in checkout state, ready to be edited. If the color is dark red the item is private, out of PlasticSCM. Finally, if the color is black, it means that the item is checked in.

Status.PNG

Figure 40: Example of the color scheme

4.4    Opening existing projects under source control

When a project is imported from PlasticSCM, open it in the ‘File’, ‘Open Project’ menu of IntelliJ5.1. Select the path of the project and click on ‘Open’.

If the project is controlled by PlasticSCM, the color scheme in the names of the items explained in the previous section will be used.

Once the project is opened, we can perform an update operation so that the last contents of the project are loaded in the workspace. Click on the root item and select ‘Update’ or ‘Update Directory’. Another possibility is click on the ‘Version Control’ menu of IntelliJ5.1 and select ‘Update Project’. To obtain more information about useful operations, please see the next section.

4.5    Basic operations

All the operations available are allocated in the context menu ‘PlasticSCM’ which appears when right-clicking on an item from the list or from the editor, or clicking on the IntelliJ5.1 ‘Version Control’ menu and then on ‘PlasticSCM’.

Manual de PlasticFileOptions.PNG

Figure 41: Plastic SCM operations for an item

These are the operations explained in detail:

CIFileDialog.PNG

Figure 42: Plastic SCM checkin dialog

CIDirectoryDialog.PNG

Figure 43: Plastic SCM checkin dialog for directories

Edit.bmp

Figure 44: IntelliJ5.1 Clear Read-only status dialog

Annotate

Figure 45: Example of the command ‘Annotate’

HistoryWithComments

Figure 46: Plastic SCM history view for an item

It is possible to perform some actions on the revisions shown in the table, such as comparing two selected revisions, comparing a local version with one of the revisions selected in the table or view a concrete revision. Those options are listed as icons in the left corner of this view.

Notes: There is a well-known problem in the history view of IDEA, when the revision which is currently loaded should be marked in bold. To show the current revision it is necessary to reopen the history view.

Furthermore, in the ‘Version Control’, ‘PlasticSCM’ menu the following options are available:

CreateWK

Figure 47: Version Control menu, showing more PlasticSCM options

Notes: As explained, once the operation finishes it is shown a summary of items created, updated and deleted. In the list of modified items you can see items that were modified outside the version control. If you right click on that items and select the ‘Update Files’ option, the update files dialog will be opened, with the ‘Force update files’ selected by default.

Update.PNG

Figure 48: Plastic update project dialog

Select the option ‘Find Merges’ and, if any conflict is pending, click on ‘Start Merge’. The system will start resolving the merges. When the operation finishes, click on ‘Close’. The items are left in checkout state in order to verify if the merge was performed as desired. If that is not the case, it is possible to rollback the changes (see the Protect Directory operation above).

Merge.PNG

Figure 49: Plastic SCM merge dialog

4.6    Refactoring support

PlasticSCM provides full support to those refactoring operations related with renaming and moving items.

These operations are:

·         Move

·         Rename

·         Delete

When these operations are applied on an item, the item is modified on disk and those changes are automatically extended to PlasticSCM.

Notes: In case that you want to delete several files, it is possible to click on the context menu ‘Delete’; this will checkout the directory which contains the files and then the files will be deleted one by one.

Nevertheless we recommend a safe delete instead of a normal delete (context menu ‘Refactor’, ‘Safe Delete’); this way all the selected files will be deleted at the same time.

5        IntelliJ 8 Plug in

The IntelliJ IDEA 8 Plug in allows users to work with Plastic SCM from the IntelliJ IDEA environment, providing the most common operations. The plug in is compatible with IntelliJ IDEA 8.1.

5.1    Setup the Plug in

To configure the plug in, use the following steps:

  1. Click on the ‘File’ menu and then on ‘Settings’, or press ‘Ctrl+Alt+S’. The settings window will be shown.

settings

Figure 50: Settings window of IntelliJ 8

  1.  Click on ‘Version Control’ in the options list on the left. On the right, appears the <Project Root>.
  2.  In the VCS drop-down menu select Plastic SCM.
  3. Click on ‘Version Control’ in the list provided on the left, then on VCSs, and finally on ‘Plastic SCM’.

proyecto asociado a PlasticSCM

Figure 51: Version Control selector of IntelliJ 8

The settings panel of the plug in is opened, in which you have to type or select the path to ‘cm.exe’ (‘cm’ in linux). If this field is leaved in blank, the plug in will search a default path based on the default installation directory of Plastic SCM. If ‘cm.exe’ or ‘cm’ (linux) is typed, the plug in will search for the command in the default installation path, too.

config plugin

Figure 52: Plastic SCM plug in configuration window

Use the ‘Test Connection’ button in order to verify whether the given command path is correct and whether the command can be executed. The server has to be running and the cm client correctly configured (use the client wizard to verify this) in order for the operation to success.

SettingsTestConnectionOk.PNG

Figure 53: Test Connection message

 

5.2    Checkout from Version Control

This operation allows users to import a project allocated in a Plastic SCM repository.

cofromvc

Figure 54: IntelliJ 8 main window, check out from Version Control remarked

The plug in must be correctly configured before a check out can be performed. Select the Plastic SCM option from the ‘Check out from Version Control’ menu.

cofromvc-rep&br&lab

Figure 55: Dialog to select repository, branch and label

It is necessary to choose a repository to use and then to select what version of your code you want to work with, which can be either a branch such as ‘/main’ or a label such as ‘version 1.0.0’.

cofromvc-wks

Figure 56: Dialog to select workspace

In the next window select the workspace where you want to bring the contents. It is possible to use an existing workspace from the list or create a new one. To do this, press ‘Create new’ and type the name of the new workspace and its path in the local disk.

cofromvc-newwk

Figure 57: Dialog to create a new workspace

Select from the list the workspace to use and click on ‘Next’.

The last screen is shown, which shows the detailed information about the checkout operation. Verify that the information is correct and press ‘Finish’. The system will bring the contents of the selected branch or label, from the selected repository to the workspace specified.

Notes: Every IntelliJ module controlled by Plastic SCM has to be allocated in one and only one local workspace.

5.3    Item status overview.

Any project controlled by Plastic SCM uses a color scheme in the names of the items to specify their state. This state can be verified in the ‘Project’ view.

If the color of the item is green it means that the item has been recently added to Plastic SCM. If it is blue then the item is in checkout state, ready to be edited. If the color is dark red the item is private, out of Plastic SCM. Finally, if the color is black, it means that the item is checked in.

Status.PNG

Figure 58: Example of the color scheme

5.4    Opening existing projects under source control

When a project is imported from Plastic SCM, open it in the ‘File’, ‘Open Project’ menu of IntelliJ 8. Select the path of the project and click on ‘Open’.

If the project is controlled by Plastic SCM, the color scheme in the names of the items explained in the previous section will be used.

Once the project is opened, we can perform an update operation so that the last contents of the project are loaded in the workspace. Click on the root item and select ‘Update’ or ‘Update Directory’. Another option is click on the ‘Version Control’ menu of IntelliJ 8 and select ‘Update Project’. To obtain more information about useful operations, please see the next section.

5.5    Basic operations

The most basic operations available are allocated in the context menu ‘Plastic SCM’ which appears when right-clicking on an item from the list or from the editor, or

clicking on the IntelliJ 8

plasticSCMoptions

Figure 59: SCM operations for an item

 

Version Control’ menu and then on ‘Plastic SCM’.

These are the operations explained in detail:

ciFiledialog

Figure 60: Check in dialog

clear read only

Figure 61: IntelliJ 8 Clear Read-only status dialog

Annotate

Figure 62: Example of the command ‘Annotate’

HistoryWithComments

Figure 63: Plastic SCM history view for an item

It is possible to perform some actions on the revisions shown in the table, such as comparing two selected revisions, comparing a local version with one of the revisions selected in the table or view a concrete revision. Those options are listed as icons in the left corner of this view.

Furthermore, in the ‘Version Control’, ‘Plastic SCM’ menu the following options are available:

vc-menu

Figure 64: Version Control menu, showing more Plastic SCM options

update dialog

Figure 65: Update project dialog

Furthermore, you can create new branches by clicking on ‘New...’. In the dialog opened, it is necessary to type the name, comments, starting point and parent of the branch to be created.

create branch dialog

Figure 66: Create branch dialog

 

Notes: As it has been explained, once the operation finishes it is shown a summary of items created, updated and deleted. In the list of modified items you can see items that were modified outside the version control.

Select the option ‘Find Merges’ and, if any conflict is pending, click on ‘Start Merge’. The system will start resolving the merges. When the operation finishes, click on ‘Close’. The items are left in checkout state in order to verify if the merge was performed as desired. If that is not the case, it is possible to rollback the changes (see Check in dialog explained above).

merge dialog

Figure 67: Merge dialog

create wks dialog

Figure 68: Create workspace dialog

5.6    Refactoring support

Plastic SCM provides full support to those refactoring operations related with renaming and moving items.

These operations are:

·         Move

·         Rename

·         Delete

When these operations are applied on an item, the item is modified on disk and those changes are automatically extended to Plastic SCM.

Notes: In case of deleting files, IntelliJ 8 performs always a ‘Safe Delete’, no matter whether the user clicks on ‘Delete’ or on ‘Refactor’ -> ‘Safe Delete’.

5.7    Work offline mode

The Plastic SCM plugin for IntelliJ 8 makes a working-mode without connection to the Plastic SCM server possible; this allows a user to perform Plastic actions such as ‘add’, ‘check in’, ‘check out’, and some refactors.

workOffline

Figure 69: Work offline option, in the Plastic SCM menu

 

In order to work offline, click on the ‘Work Offline’ option, which appears in the Plastic SCM menu, explained above.

Afterwards, once the connection with the server has been restored, the actions performed offline will be executed in the Plastic SCM server. To return to the Online working mode, click on the ‘Work Offline’ option again.

Notes: Rename and move actions cannot be performed while in offline working mode.

 

Notes: It is important to remark that not all the Plastic SCM options are available in offline working mode; mainly those that require a connection with the server, such as ‘update’.