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/Addon/Query Based Features/Legacy Code Generator"

(Created page with "This page contains information relevant to the legacy code generation used for query-based features by default before EMF-IncQuery 0.8.0 and still supported by adding the gene...")
(No difference)

Revision as of 11:00, 10 July 2014

This page contains information relevant to the legacy code generation used for query-based features by default before EMF-IncQuery 0.8.0 and still supported by adding the generateIntoModelCode annotation parameter.

UnsupportedOperationException during model editing, even after successful generation

If you have multiple inheritance in your metamodel, it is possible that the getter for a feature will be implemented in more than one place. The easy way to avoid this is to ensure, that query-based features are only inherited from one supertype and that supertype is used as the extension and not only as interface (i.e. that type must be the first in the values of the supertypes feature).

In the unfortunate case when you have query-based features in multiple supertypes, the generator will only override the getter in the implementation class of the defining EClass, so you will have to copy-paste the generated getter code and the handler into the subclass implementation as well.

Future versions of EMF-IncQuery may support the automatic generation into multiple implementation classes.

Alternatively, you can try the setting delegate based implementation, which avoids this problem.

Back to the top