Knowledgebase

Search:     Advanced search

Surround SCM NetBeans Integration

Article ID: 753  |  Last updated: 23 Dec, 2014

Surround SCM supports integration with NetBeans. See Surround SCM Third-Party Integrations for supported platforms and versions.

This article includes information about installing and adding the integration plug-in, adding and connecting to a project, performing Surround SCM actions, configuring Surround SCM settings, license usage, and troubleshooting.

Note: The following steps were tested using NetBeans 6.9 and Surround SCM 2011.0 on Windows.

Installing and adding the plug-in

The NetBeans plug-in is automatically installed during the Surround SCM Client installation. To add the plug-in:

  1. In NetBeans, choose Tools > Plugins.
  2. Click the Downloaded tab.
  3. Click Add Plugins.
  4. Browse to the Surround SCM installation directory.
  5. Select the plug-in in the NetBeans subdirectory.
    netbeansplugins2.png
  6. Click Install.
  7. Follow the prompts to install the plug-in.
  8. Restart NetBeans.

Adding and connecting to a project

The steps for adding a project to Surround SCM or connecting to an existing Surround SCM branch and repository are basically the same. If the files are already in Surround SCM, get the files to your computer and open them in NetBeans.

  1. Open the NetBeans project. Make sure the Project window is active.
  2. Right-click the project and choose Surround SCM > Enable Surround SCM. You are prompted to establish a Surround SCM association.
    Note: You may not be prompted to establish the association if the project already exists in Surround SCM, you performed a get, and you opened the project from the working directory.
  3. Click Fix. The Surround SCM Repository Browser opens.
    netbeansrepobrowser.png
  4. Select the branch and repository to add the files to.
  5. Click Create Repository to create a repository for the NetBeans project. Surround SCM automatically uses the project name for the repository name, but you can change it. The project folder is used as the working directory and cannot be changed.
    netbeanscreaterepo.png
  6. Click OK to create the repository.

Performing Surround SCM actions

Choose an action from the Surround SCM menu or right-click a file and choose an action from the Surround SCM shortcut menu.

Actions are also available on the Surround SCM toolbar. If the toolbar is not displayed, choose View > Toolbars > Surround SCM to display it. Choose View > Toolbars > Customize to customize the Surround SCM toolbar.

Synchronizing projects

Project files are not automatically added to Surround SCM. Use the synchronize project feature to add all files to Surround SCM. This only adds files that are recommended to be controlled. Compiled binaries are excluded. Adding files and packages to source control Depending on the settings, when you add a new file to a NetBeans project, you may not be prompted to automatically add it to Surround SCM. You can manually add files to Surround SCM.

  • To add one or multiple files, right-click the files and choose Surround SCM > Add Files.
  • To add an entire package (all contents), right-click the package and choose Surround SCM > Add Folders.

Getting files and packages

Get files when you want to view a file but do not need to make any changes. You can get individual files or packages.

  1. Select the files or package you want to get.
  2. Right-click and choose Surround SCM > Get Files to get the files or Get Folders to get the entire package. The Get Files dialog box opens.
  3. Select any options and then click OK to get the files or package.

Checking out files and packages

Check out files when you need to modify them. You can check out one file, a group of files, or a package.

  1. Select the files or package you want to check out.
  2. Right-click and choose Surround SCM > Check Out Files or Check Out Folders. The Check Out dialog box opens.
  3. Select any options and click OK to check out the files or package.

Checking in files and packages

Check in updates files with changes, removes the lock on files, makes changes available to other users, and increments the version number by one.

  1. Select the files or package you want to check in.
  2. Right-click and choose Surround SCM > Check In Files or Check In Folders. The Check In Files dialog box opens.
  3. Select any options and click OK to check in the files or package.

Undoing check out

If you check out and modify a file and then decide you do not want to save the changes, you can undo the check out. This discards any changes made to the file and checks it back in to the server.

  1. Select the files or package you want to undo the check out for.
  2. Right-click and choose Surround SCM > Undo Check Out Files or Undo Check Out Folders. The Undo Check Out Files dialog box opens.
  3. Select a local file option.
  4. Click OK. The file is no longer checked out.

Removing files

You can remove a file from the project and source control, from the project only, or from source control only.

To remove a file from the project and source control:

  1. Select the files you want to remove.
  2. Right-click and choose Delete or Refactor > Safe Delete. NetBeans dialog boxes open and then the Surround SCM Remove Files dialog box opens.
  3. Click OK to remove the files. The files are removed from the project and source control.

To remove files from the project only:

  1. Select the files you want to remove.
  2. Right-click and choose Delete or Refactor > Safe Delete. NetBeans dialog boxes open and then the Surround SCM Remove Files dialog box opens.
  3. Click Cancel in the Surround SCM Remove Files dialog box. The files are removed from the project but are still under source control.

To remove files from source control only:

  1. Select the files you want to remove.
  2. Right-click and choose Surround SCM > Remove Files. The Remove Files dialog box opens.
  3. Click OK. The file is removed from source control but still exists in the project.

Viewing file differences

You can diff files to compare, accept, or reject differences between two files.

  1. Right-click the file you want to diff and choose Surround SCM > Differences. The Surround SCM Differences dialog box opens.
  2. Click Differences to start the diff utility and view the differences.

‚ÄčNote: The diff utility used is configured in the Surround SCM Client. The Differences dialog box only opens if the local file is different than the latest version on the Surround SCM Server. To view differences between the local file and another version, view the file history and then diff the files.

Viewing file history

You can view a source file's history and work with historical file versions.

  1. Right-click the file you want to view history for and choose Surround SCM > History. The History dialog box opens. You can view historic information and perform other actions.
  2. Click Close to close the History dialog box.

Viewing file properties

You can view Surround SCM file properties from NetBeans. View file properties to view the branch and repository a file/target is associated with.

  1. Right-click the file you want to view properties for and choose Properties. The Properties dialog box opens.
  2. Click the tabs to view file information.
  3. Click OK to close the Properties dialog box.

Refreshing file status

If you make changes to a file outside of NetBeans, you can refresh the file or packages to update the status. For example, if you check out a file from the Surround SCM Client, it is not displayed as checked out in NetBeans unless you refresh the file status or the automatic refresh occurs.

  1. Select the files or package and choose Surround SCM > Refresh Files or Refresh Folders. Choose Refresh All to refresh the status of the entire project.

Configuring Surround SCM settings

You can customize the Surround SCM plug-in settings, including enabling text and icon annotations. Keep in mind that using annotations in large projects can slow NetBeans performance.

  1. In NetBeans, hoose Tools > Options.
  2. Click Miscellaneous and then click the Surround SCM tab.

License usage

Surround SCM floating licenses may be released after a period of inactivity. Some Surround SCM actions do not require a license, such as viewing file properties, viewing history, or refreshing status. Actions that modify files, metadata, or other data on the Surround SCM Server require a license.

Troubleshooting

The NetBeans integration plug-in is not in the Surround SCM installation directory

The plug-in was not installed. Run the Surround SCM Client installer to install the plug-in.

Surround SCM files are not displayed correctly in NetBeans

You added files to Surround SCM, but actions on the Surround SCM menu are not enabled when viewing the files in NetBeans. Following are common causes and solutions.

  • The NetBeans project is configured incorrectly. Make sure the project points to a Surround SCM branch/repository on the Surround SCM Server you are connecting to. To check the information, select a file and choose Surround SCM > Properties.
  • The branch/repository points to an invalid working directory. Make sure the working directory for the repository associated with the project is the same folder that NetBeans opened the project from. You may experience issues if you set up the working directory to point to a different location.
  • The local .MySCMServerInfo file is out of sync and NetBeans may not be able to determine where Surround SCM files are located. In the directory where the Surround SCM files are located, open the .MySCMServerInfo file in Notepad. Make sure the correct branch/repository is listed. If not, delete the file and refresh it from NetBeans to regenerate it with the correct data.
Article ID: 753  |   Last updated: 23 Dec, 2014
Tags
NetBeans

Prev   Next
Limited Unicode Support with Visual Studio     Surround SCM Visual Studio Integration Failure