Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "VIATRA/Releases/Query/MigrateTo0.8"

(Created page with "== Differences in EMF-IncQuery 0.8 == The ''org.eclipse.incquery.runtime'' project does not depend (and re-export) on the ''org.eclipse.patternlanguage.emf'' project. This mi...")
 
m (Harmath.incquerylabs.com moved page EMFIncQuery/Releases/MigrateTo0.8 to VIATRA/Releases/Query/MigrateTo0.8: Migration)
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
== Differences in EMF-IncQuery 0.8 ==
 
== Differences in EMF-IncQuery 0.8 ==
  
The ''org.eclipse.incquery.runtime'' project does not depend (and re-export) on the ''org.eclipse.patternlanguage.emf'' project. This might required some changes in existing code.
+
'''Important''': Before first using EMF-IncQuery 0.8, the older incquery projects needs to be updated. This is achieved by selecting the "Update/Add EMF-IncQuery Nature" menu item from the "Configuration" sub-menu of the project. Until the first build is finished after the update, some exceptions might be thrown.
 +
 
 +
The ''org.eclipse.incquery.runtime'' project does not depend (and re-export) on the ''org.eclipse.incquery.patternlanguage.emf'' project. This might required some changes in existing code.
  
 
=== Generic API use ===
 
=== Generic API use ===
Line 11: Line 13:
  
 
The registry does not know anything about patterns; related methods, most specifically the ''#getOrCreateQuerySpecification(Pattern)'' method. If it is required, use the ''SpecificationBuilder#getOrCreateSpecification(Pattern)'' method instead.
 
The registry does not know anything about patterns; related methods, most specifically the ''#getOrCreateQuerySpecification(Pattern)'' method. If it is required, use the ''SpecificationBuilder#getOrCreateSpecification(Pattern)'' method instead.
 +
 +
=== Query-based features ===
 +
 +
Setting delegate based implementation is used by default with annotations generated into the Ecore model.
 +
* For the migration, you should remove the @QueryBasedFeature annotation from your queries before updating to 0.8.0, which should clean up generated code.
 +
* After updating to 0.8.0, simply add the annotation back an don't forget to run the EMF Generator after the setting delegate annotations are created.
 +
* You can also continue using the legacy code generation by setting the ''generateIntoModelCode'' annotation parameter, but this is not recommended for the long term!
 +
* See [[EMFIncQuery/UserDocumentation/Query_Based_Features|documentation]] for details.
 +
 +
=== Logging ===
 +
 +
We have revised the logging in EMF-IncQuery, you can find a description in the [[EMFIncQuery/UserDocumentation/API/Advanced#Logging_in_EMF-IncQuery|Advanced API]] documentation.
 +
The changes were tracked in {{bugstrike|431207}}.

Latest revision as of 03:07, 28 February 2016

Differences in EMF-IncQuery 0.8

Important: Before first using EMF-IncQuery 0.8, the older incquery projects needs to be updated. This is achieved by selecting the "Update/Add EMF-IncQuery Nature" menu item from the "Configuration" sub-menu of the project. Until the first build is finished after the update, some exceptions might be thrown.

The org.eclipse.incquery.runtime project does not depend (and re-export) on the org.eclipse.incquery.patternlanguage.emf project. This might required some changes in existing code.

Generic API use

  • The GenericQuerySpecification, GenericPatternMatcher and GenericPatternMatch classes have been moved to the org.eclipse.incquery.patternlanguage.emf project, to the org.eclipse.incquery.patternlanguage.emf.specification package. In case these classes are required, add the org.eclipse.incquery.patternlanguage project as additional dependency.
  • To initialize query specifications from selected patterns, use the SpecificationBuilder class.

QuerySpecificationRegistry

The registry does not know anything about patterns; related methods, most specifically the #getOrCreateQuerySpecification(Pattern) method. If it is required, use the SpecificationBuilder#getOrCreateSpecification(Pattern) method instead.

Query-based features

Setting delegate based implementation is used by default with annotations generated into the Ecore model.

  • For the migration, you should remove the @QueryBasedFeature annotation from your queries before updating to 0.8.0, which should clean up generated code.
  • After updating to 0.8.0, simply add the annotation back an don't forget to run the EMF Generator after the setting delegate annotations are created.
  • You can also continue using the legacy code generation by setting the generateIntoModelCode annotation parameter, but this is not recommended for the long term!
  • See documentation for details.

Logging

We have revised the logging in EMF-IncQuery, you can find a description in the Advanced API documentation. The changes were tracked in bug 431207.

Back to the top