Skip to content
Malte Brunnlieb edited this page May 11, 2016 · 22 revisions
Table of Contents

IDE Setup

We are using an own eclipse distribution as the oasp4j IDE does not cover eclipse plugin development features, we have to work with. To get started follow these steps:

  1. Download the latest IDE release from https://coconet.capgemini.com/sf/go/projects.apps2_devon/frs.cobigen_development_distribution

  2. Create a folder of your choice to store the IDE in. The folder should be located on the root of a drive to not run into "path too long" issues of Windows, which seemingly will never get fixed by Microsoft…​

    Note

    Alternatively, you could also take a folder of your choice and map a new virtual drive to this folder, e.g. by http://www.ntwind.com/software/utilities/visual-subst.html
    Using this solution, make sure, that you mount the folder of your choice permanently by selecting to mount the folder again on boot-time at the bottom of the dialog!

    Finally, copy the downloaded 7zip into the target folder and unzip with IMPORTANT! → "Extract Here":
    Extract with 7zip

    The result should look like this:
    Result of extracted 7zip

  3. Go to /workspaces/CobiGen and clone the repository. This tutorial utilizes TortoiseGit. However, you can also use any other tool like SourceTree or a simple GitBash to clone the CobiGen repository. Clone by triggering the explorer’s context menu:
    Context menu of TortoiseGit

    Clone CobiGen’s repository recursively:
    Clone Repo recursively (https)

  4. If cloning was successfull, run update-all-workspaces to start the automatic IDE setup:
    Run update-all-workspaces script

    The result should be something like this:
    Expected script output

    The folder structure generated until now should look like this:
    Resulting folder structure

    The final list of scripts should be the following:
    Resulting scripts
    Mainly, there are two important scripts for your daily work. First, the console.bat script enables you to start a command line with a preconfigured PATH variable such that you will have the same experiences as in the eclipse IDE itself. Second, the eclipse-CobiGen.bat script will be the script you have to start your eclipse with. It will set the PATH before starting eclipse analogously to what console.bat does.

Workbench Setup

After setting up the IDE, we finally can start importing all necessary projects. The following steps just show the necessary tasks to do to get the master branch of CobiGen compiled and locally deployed and started in an eclipse distribution. There might be additional tasks to do if compiling any development branch (e.g. mvn install on the root of the cloned repository)

  1. Start eclipse

  2. Import the cobigen-core, all plugins, and cobigen-maven maven modules by triggering the context menu within the package explorer window:
    Import eclipse menu

    Import eclipse wizard

  3. Click Browse and press OK directly without chosing any folder (the default selected folder will do the job).
    Browse folder

    Confirm dialog

  4. Select the modules to import
    Select maven modules to import

    The result should look like this: Resulting mvn import

    Note
    If you face any issue select all projects and press Alt+F5 and confirm the dialog to update all maven projects.
  5. Now we have to import the cobigen-eclipse project, which has to be done quite differently due to many incompatibilies of the eclipse ecosystem with mvn. Select again Import in the Package Explorer's context menu and import a general project:
    Import cobigen-eclipse

    Press again browse as well as confirm the browse dialog without selecting anything as already done before. Select the cobigen-eclipse project:
    Select cobigen-eclipse

  6. After confirmation, you will end up with a cobigen-eclipse project struggling with classpath issues.
    Classpath error

    This is due to a workaround enabling the use of maven for eclipse plugin development. Thus, we have to make one manual step, whenever we will change the cobigen-eclipse/pom.xml. Run the command line from the IDE by utilizing StartExplorer on the cobigen-eclipse project:
    Run a command line by StartExplorer

    You will end up in a command line at the location you run StartExplorer on via the context menu.

  7. Run mvn clean package. This should result in
    Result of mvn package

    and the cobigen-eclipse should build without any error.

That’s it! Finally, you can run the eclipse plugin by selecting the project and running it as an eclipse application. This will start a new eclipse application with the CobiGen eclipse plugin installed:
Run cobigen-eclipse

Clone this wiki locally