Setting up the EMF-IncQuery Development Environment

Outdated page

This page is now maintained in the Eclipse wiki: http://wiki.eclipse.org/EMFIncQuery/DeveloperDocumentation/DevEnvironment

The rest of the page is preserved here only for archive purposes.

Prerequisites

Downloading IncQuery source projects from Git

The project is available at http://eclipse.org/incquery. To download it, you shoud point your Git client to http://git.eclipse.org/c/incquery/org.eclipse.incquery.git/ and after obtaining a local git repository on your hard disk, import the Eclipse plug-in projects under the plugins/ subfolder into your Eclipse workspace.

For details, see the Eclipse EGit help and the Git tutorial from Lars Vogel.

Important: Do not forget to set up your name and email address in your local Git repository - Git identifies your commits using your email address.

Generating the Editor Components

The projects contain both manually written and generated code. They are placed in different source folders: all src folders contain only manually written code, all src-gen and xtend-gen folders contain generated code.

  • The src-gen folders contain code generated by the Xtext code generation workflows. These files are not committed into Git; they are to generated in the workspace after cloning and after changes of the grammar or workflow files.
  • The xtend-gen files contain code generated from Xtend files. These files do have dependencies of the Xtext workflow-generated files: before the workflow was executed, it is normal for these files to be erroneous.

Xtext code generation workflows

In order to generate editor and parser code, execute the mwe2 code generation workflows by right clicking to the files below, and selecting Run as | MWW2 Workflow  in the following order:

  1. org.eclipse.incquery.patternlanguage/src/org.eclipse.incquery.patternlanguage/GeneratePatternLanguage.mwe2
  2. org.eclipse.incquery.patternlanguage.emf/src/org.eclipse.incquery.patternlanguage.emf/GenerateEMFPatternLanguage.mwe2: Type "y" in the console window to download antlr and finish code generation.
  3. org.eclipse.incquery.tooling.generator.model/src/org.eclipse.incquery.tooling.generator.model/GenerateGeneratorModel.mwe2: Type "y" in the console window to download antlr and finish code generation.

After issuing code generation, Eclipse should warn you about compile errors in the projects. To resolve them (by generating the missing code), click "Proceed". All workflow files require about 30-60 seconds to run - be patient.

Xtend code generation

Xtend files are used for code generation and some other reasons in language projects and tests. After the Xtext code generation workflows are executed, it might be required to clean the projects with xtend files, otherwise they do not find the freshly generated java code. (It is the easiest to issue a clean all and then build the entire workspace.)

Optional dependencies

Zest and Graphiti are marked as dependencies of optional supplementary components. You can either install these external plug-ins from the Juno update site, or just close the projects depending on them (as they are non-essential).