Using Subclipse with Carbide.c++
This article describes how to use Subclipse with Carbide.c++ IDE. Subclipse is an Eclipse plug-in providing support for the Subversion version control system within the Eclipse IDE. Since Carbide.c++ is based on the Eclipse IDE, Subclipse can be used with it as well.
Installing Subclipse is easiest when using Carbide.c++'s built-in software updating functionality. The following steps apply to Carbide.c++ 2.0.0 and Subclipse 1.6.x.
- Start Carbide.c++.
- Select Help > Software Updates > Find and Install.
- Select "Search for new features to install". Click Next.
- Add a new update site by clicking on "New Remote Site".
- Type "Subclipse" in the name field and the location of the Subclipse update site (e.g., "http://subclipse.tigris.org/update_1.6.x/") to the URL field. The URL can be checked from the Download and Install section of the Subclipse Web site.
- Click Finish. The Updater shows the features that are available to install.
- Uncheck "Subclipse Integration for Mylyn 3.x (Optional)", because it requires a plug-in that is not installed in Carbide.c++ by default. Click Next.
- The Updater asks you to accept the licence agreements. Accept them and click Next.
- The Updater asks you to review the features that will be installed. If the install location is correct, click Finish. Downloading begins.
- The features to be installed have not been digitally signed, so you may have to dismiss some warnings during the installation.
- When the downloading and installation have been completed, restart Carbide.c++, and you're done.
Checking out the sources
To check out a source tree, follow these instructions:
- In Carbide.c++, select Window > Open Perspective > Other.
- Select SVN Repository Exploring. The perspective is opened.
- Right-click on the SVN Repositories view and select New > Repository Location.
- Type the location of the repository in the URL field and click Finish. The repository appears in the SVN Repositories view.
- Right-click on the repository location that you want to check out and select Checkout.
- Select the method of checking out the folder and the revision to check out. Click Finish.
- The repository is checked out, so you can return to the default perspective: Window > Open Perspective > Other > Carbide C/C++.
Creating a patch
Let's assume you have modified an application and want to describe the modifications as a patch file (see Using Diffs for general information about diffs and patching). One concrete use case for this is that you have modified a stub application and want to create a code snippet from the modifications. This use case is used as an example here.
Note that Subclipse depends on Subversion, so patches cannot be created with it unless the application from which the patch is created has been checked out from an SVN repository. If this is not the case, use the method described in Using Diffs for creating a patch. Here, the application has been checked out from an SVN repository.
The steps for creating a patch are:
- (Check out the sources. See above.)
- (Modify the sources.)
- Right-click on the project and select Team > Create Patch.
- Select "Save in File System" and enter a name for the patch file. Click Next.
- Select the patch root (most likely the "Project" scope). Click Finish. The patch is created into the location you specified.
Applying a patch
Let's assume you have created an application that you want to patch (see Using Diffs for general information about patching). One concrete use case for this is that you have an unmodified stub application and a code snippet that you would like to incorporate into the stub. This use case is used as an example here:
- (Download the stub application.)
- (Import the stub into Carbide.c++.)
- In Carbide.c++, right-click on the project and select Team > Apply Patch.
- Select "File" and browse to the location where the (code snippet) patch can be found. Click Next.
- Select "Apply the patch to the selected file, folder or project" and select the (stub) project. Click Next.
- In the "Apply Patch" dialog, you can double-click on the file to examine the changes.
- Click Finish and the patch is applied to the project.