Eclipse for existing code

Does anyone know how I can use Eclipse to edit an existing checkout, for instance to use it with my jhbuild checkouts? The best I can do so far is use Eclipse’s File/Import…/”Checkout Projects From CVS…” feature, but that puts a new copy of the code in ~/workspaces/. Eclipse’s File/Import…/”Filesystem” also seems to copy the code into ~/workspaces/ instead of just letting me edit the code.

Anjuta and KDevelop can do this, but I’d really like to use something more sane. I’m a bit afraid of Eclipse’s apparent complexity and odd new jargon, but I’d like to give it a chance, if I can get started.

6 thoughts on “Eclipse for existing code

  1. Creating a new project and select the “Create from existing source” option.

  2. You can add a source folder to the build path by editing the project properties. From the “Advanced…” submenu you can choose to link to an existing folder.

  3. Jens, I don’t see a “Create from existing source” option in my version but I see that you can unclick “Use default” in the “Project contents” frame, and then specify an existing directory. It then uses the existing source files and seems to be what I want. Thanks.

  4. And after that, if you right-click on your project and select Team->Share Project…, it should recognize your existing CVS directories. Then you can use eclipse’s cvs feature if you want to.

  5. On startup of Eclipse, you can choose between different workspaces (as long as you don’t have disabled this… you can reenable it via Window->Preferences->General->”Startup and shutdown”->”Prompt for workspace…”)

    I’d recommend to select your jhbuild directory as workspace. Then, choose New->Project->C->”Standard Make C Project”. Type in your projects root folder as name for the project. Click Next, select referenced projects and other settings to taste and then click Finish.
    The folder contents won’t be overwritten, but the two files .cdtproject and .project will be created in the projects root folder. If a makefile is present, Eclipse starts to build.

Comments are closed.