Community
Participate
Working Groups
Incremental query evaluation is not possible for derived features that are not well-behaving (see http://wiki.eclipse.org/EMFIncQuery/UserDocumentation/Query_Based_Features#Well-behaving_structural_features). However, the queries written in the EMF-IncQuery language could be evaluated in a run once way where the initial traversal uses the value of derived features and the set of matches is returned.
The newly added RunOnceQueryEngine class provides the initial support for run-once querying. For details on usage, see: https://wiki.eclipse.org/index.php?title=EMFIncQuery/UserDocumentation/API/RunOnce The initial implementation was added to master in: http://git.eclipse.org/c/incquery/org.eclipse.incquery.git/commit/?id=0ab171b28b4c496275c87562963f48661bfd2ede and http://git.eclipse.org/c/incquery/org.eclipse.incquery.git/commit/?id=f133df8d51157a0987a2255508def71b21cebd78 The examples and test project was added to master in: http://git.eclipse.org/c/incquery/org.eclipse.incquery.examples.git/commit/?id=3fabbb48043d4c666b00708f2255961ae651f09e and http://git.eclipse.org/c/incquery/org.eclipse.incquery.examples.git/commit/?id=afe1e207c7ff68dddcfaf01f43ed9ba8fbe49118 and http://git.eclipse.org/c/incquery/org.eclipse.incquery.examples.git/commit/?id=da59abd697706f60b6b2c95dbe226f28d1bac47c
The implementation and examples are ported to the Xtext 2.3 branch as well.
The run-once support has been extended with automatic re-sampling of derived features, which means that the complete Rete network and base indices are not disposed between calls to getAllMatches. The automatic re-sampling is disabled by default and can be turned on and off through RunOnceQueryEngine.setAutomaticResampling(boolean).