Thursday, June 21, 2007

Subverting Aptana

A persistent error in the integration of the Subclipse SVN client with Aptana IDE prevents the initial import of a project into an SVN repository. I don't think the problem lies with Subclipse, the client plugin, as much as a bug somewhere in the guts of the Eclipse IDE. I worked around the problem by using TortoiseSVN to perform the initial repository import, then carrying on with Subclipse in Aptana IDE.

To reproduce the problem, right-click on your project folder in the Navigator panel, then select the "Share Project..." wizard from the "Team" element of the project context menu. Aptana will display an error dialog:

aptana_svn_error1.PNG

The error message reads "org.eclipse.team.internal.ui.wizards.ConfigureProjectWizard cannot be cast to org.tigris.subversion.subclipse.ui.wizards.sharing.SharingWizard"

A couple of other Aptanans reported encountering the same error after I submitted it to the Aptana user forum, but the Aptana team hasn't come forth with a solution yet.

Here's how I worked around the problem:

  1. Download and install an SVN client, e.g. I use the TortoiseSVN Windows client on my Windows PC

  2. Create the new project in Aptana, e.g. "MyApp"

  3. Import the project to your SVN repository, e.g. "C:\rails\myapp" -> "svn://myhost.com/svn/rails/myapp/trunk"

  4. Now that the code is safely tucked up in your repository, delete the contents of the project folder, either in Windows or from Aptana.

  5. Back in Aptana, right-click in the Navigator pane then select "Import..." to open the project import dialog box. Follow the instructions to check out the contents of the trunk/ directory to a new Aptana project. [Note: modified this step to use Aptana instead of TortoiseSVN]

  6. You should now see Aptana's version of the SVN status hints overlaid on the project files and folders. As well, the project name will acquire the SVN repository path, e.g. [rails/myapp/trunk]

  7. That's it, you're good to go! Now you can use Aptana's SVN client to manage the project.

2 comments:

  1. We'll look into this and see if we can come up with a fix or at least a better/easier solution.

    Thanks.

    ReplyDelete
  2. We've narrowed it down to a bug in Subclipse. Here's where we're trac'ing it: http://www.aptana.com/trac/ticket/4250

    ReplyDelete

Note: Only a member of this blog may post a comment.