Important to know:
In this example https://github.com/ujhelyiz/EMF-IncQuery-Examples/tree/master/school/school.instancemodel you can find two school instance models with a school, years, classes, students, teachers, and courses.
If you create a new plug-in project, you don’t need Activator (on the second wizard page, uncheck the „Generate an activator, a Java class that controls the plug-in’s life cycle”).
This project contains:
The basic and model manipulation test cases in .xtend file
An example model manipulation test, where change the School "Budapest University of Technology and Economics" name to "BME":
Snapshot files
You can create an .eiqsnapshot file in Query Explorer: right click on a pattern result or the root of the patterns - Save EMF-IncQuery snapshot. Important: this file contains relative path to the instance model, so if you move this file to another folder, you need to check the path.
JUnit run configurations. You can run the tests: right click - run as - SchoolTests
As parsing eiq files requires custom components registered during the pattern load process, the built-in Reflective Ecore Editor cannot open eiq files. To overcome this, an Xtext-specific reflective editor is needed. A short description of the reflective editor component is available in the blog post Reflective Tree Editor for Xtext-based Languages. Downloads are available from:
Additionally, the registration of the reflective editor is created in an external project, as it is not planned to distribute this editor together with EMF-IncQuery (and manage its external dependency). For the same reason, the plug-in is only available in source form at Github,