Skip to main content
Jump to: navigation, search



  • Eclipse Modeling Tools 3.7, 3.8, 4.2 or 4.3 distribution
    • Other Eclipse distributions might work as well, but this contains EMF-related plug-ins
    • Newer Eclipse versions should also work (we regularly test and develop with Eclipse 4.2 Juno)
  • Xtext and Xtend 2.4.3
    • Earlier versions (including 2.4.0 and 2.4.1) will not work
    • Currently install 2.4.2 from or
    • IncQuery master since February 2014 works with Xtext 2.5 as well; however does not work with 2.4.2 anymore
  • EGit (and JGit) - required components for downloading source from Git
    • Available from Eclipse Juno update site:

Editor Settings

Code style: slightly modified built-in Eclipse style

  • line width: 120 characters both for code and comments
  • using spaces for indentation

Downloadable style available from

Downloading IncQuery source projects from Git

The project is available in the from the Eclipse repository at To download it, you can select either clone URLs listed. However, if you want to use the committer account, you have to use the ssh url.

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. Generated code is not committed into Git; they are to generated in the workspace after cloning and after changes of the grammar or workflow files.

  • The src-gen folders contain code generated by the Xtext code generation workflows.
  • 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

The org.eclipse.incquery.patternlanguage, org.eclipse.incquery.patternlanguage.emf and org.eclipse.incquery.tooling.generator.model projects all contain a code generation workflow file (found in the top-level package in each project, with a mwe2 extension). All workflows need to run to generate the editor and parser code in the workspace: first the core, then the emf, finally the tooling.generator.model workflow needs to be executed. You can run these workflows either by selecting Run as/GeneratePatternLanguage.mwe2 from the context menu of the .mwe2.launch file in the corresponding project root. In case of the tooling.generator.model project, you may be required to create the folder "src-gen" manually the first time.

All workflow files require about 30-60 seconds to run - be patient.

Important: In case of fuure language changes, the corresponding languages are to be regenerated. Until that happens, the codebase might or might not have compile errors. However, if the language is not changed, this regeneration step is not necessary.

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, GMF and Graphiti are marked as dependencies of optional supplementary components. You can either install GMF and Graphiti from the Juno update site, while Zest uses the GEF4 version. Alternatively you can just close the projects depending on them (as they are non-essential).

As the GEF4 Zest component is under heavy refactoring, the extra update site of EMF-IncQuery also contains a Zest version known working with the current version.

Back to the top