Skip to main content
Jump to: navigation, search

Difference between revisions of "VIATRA/Releases/Query/NewAndNoteWorthy0.9"

(Created page with "== New and Noteworthy - EMF-IncQuery 0.9.0 == As version 0.9 has not yet been released, this page is '''work in progress''' and can be expected to change in the future. === G...")
 
Line 1: Line 1:
 
== New and Noteworthy - EMF-IncQuery 0.9.0 ==
 
== New and Noteworthy - EMF-IncQuery 0.9.0 ==
As version 0.9 has not yet been released, this page is '''work in progress''' and can be expected to change in the future.
+
 
 +
=== Updated to Xtext 2.7 ===
 +
EMF-IncQuery 0.9 was developed and tested with Xtext 2.7. The runtime still works without Xtext installed, but the tooling requires Xtext 2.7 (available from the Luna update site since SR1).
  
 
=== Generalized API for non-EMF query scopes ===
 
=== Generalized API for non-EMF query scopes ===
Line 8: Line 10:
 
* Query specification declare the type of scope they can be evaluated on by the ''getPreferredScopeClass()'' method. For example, EMF model queries can only be evaluated on EMF models.  
 
* Query specification declare the type of scope they can be evaluated on by the ''getPreferredScopeClass()'' method. For example, EMF model queries can only be evaluated on EMF models.  
 
* The ''getBaseIndex()'' method on the IncQuery engine returns a non-EMF-specific interface of the base model index. To use EMF-specific features, refer to ''org.eclipse.incquery.runtime.emf.EMFScope.extractUnderlyingEMFIndex()''.
 
* The ''getBaseIndex()'' method on the IncQuery engine returns a non-EMF-specific interface of the base model index. To use EMF-specific features, refer to ''org.eclipse.incquery.runtime.emf.EMFScope.extractUnderlyingEMFIndex()''.
 +
 +
=== Warnings for recursive pattern calls ===
 +
The use of recursive pattern calls is problematic in EMF-IncQuery: when used incorrectly, its usage may result in incorrectly updated match sets after deletion. Furthermore, using recursion in a negative pattern composition or match counter cannot be evaluated at all.
 +
 +
In version 0.9.0 a new validator was added to the language that warns when using recursive calls (for the usual cases it is better to use the transitive closure support), and issues an error when used with pattern composition.

Revision as of 16:54, 6 February 2015

New and Noteworthy - EMF-IncQuery 0.9.0

Updated to Xtext 2.7

EMF-IncQuery 0.9 was developed and tested with Xtext 2.7. The runtime still works without Xtext installed, but the tooling requires Xtext 2.7 (available from the Luna update site since SR1).

Generalized API for non-EMF query scopes

Starting with version 0.9, it possible to instantiate an IncQueryEngine over non-EMF models and formulate queries appropriate against that kind of model. This required some minor changes to the API.

  • An IncQueryEngine can now be instantiated for a scope of query evaluation defined by the newly introduced org.eclipse.incquery.runtime.api.scope.IncQueryScope interface. For querying over EMF models, use the org.eclipse.incquery.runtime.emf.EMFScope class, which encompasses an EMF model root (ResourceSet, Resource or containing EObject) as well as the EMF-specific BaseIndexOptions (such as dynamic mode or wildcard mode).
  • Query specification declare the type of scope they can be evaluated on by the getPreferredScopeClass() method. For example, EMF model queries can only be evaluated on EMF models.
  • The getBaseIndex() method on the IncQuery engine returns a non-EMF-specific interface of the base model index. To use EMF-specific features, refer to org.eclipse.incquery.runtime.emf.EMFScope.extractUnderlyingEMFIndex().

Warnings for recursive pattern calls

The use of recursive pattern calls is problematic in EMF-IncQuery: when used incorrectly, its usage may result in incorrectly updated match sets after deletion. Furthermore, using recursion in a negative pattern composition or match counter cannot be evaluated at all.

In version 0.9.0 a new validator was added to the language that warns when using recursive calls (for the usual cases it is better to use the transitive closure support), and issues an error when used with pattern composition.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.