Cheers,
Ábel Hegedüs
Fault Tolerant Systems Research Group
Department of Measurement and Information Systems
Budapest University of Technology and Economics
On 2013.06.21. 17:53:34, Tamas Szabo <tamas.szabo@xxxxxxxxx> wrote:
Hi
I have one note here: the code that you have pushed can only be
used if the query specifications are registered in a plugin.xml
(appropriate extension point) right?
Maybe the best would be to attend one of you meetings, but I will
discuss this with Istvan.
Regards,
Tamas
Hi,
Separation to two projects:
- In the existing version of query-based features, I have
solved that issue by simply not adding the incquery project as a
dependency to the model project. Instead, the required query
specification was retrieved from the QuerySpecificationRegistry
by it's fully qualified name. While you can also use this
approach, you will have to make sure that the queries are
registered into the QuerySpecificationRegisrty of the running
Eclipse. Since the registry only allows adding and not
replacing, a better approach would be to use a pattern registry
for the dynamic case.
- But, as Zoltán has pointed out, separating the two projects
would introduce several new problems for the one that it might
solve.
Evaluator code in the dynamic case:
- From a quick look at setting delegates (
http://wiki.eclipse.org/EMF/New_and_Noteworthy/Helios#Support_for_Feature_Setting_Delegates show
me some more up to date content if you can) I think we just have
to create a QueryBasedFeatureSettingDelegate and it's factory
and use that in the same way as it is used for Xcore. Instead of
parsing an Xcore _expression_, it will the
QueryBasedFeatureHandler and retreive the value for the given
source. Once initialized, the handler will keep the value of the
feature updated and send notifications.
- I have pushed a QueryBasedFeatureSettingDelegate and its
Factory to the repository. As I don't fully know how setting
delegates work, it may not be correct. However, it should give
you a way to register the factory either through annotations or
manually in the dynamic case and after that EMF will hopefully
just call it as it does other delegates. As before, I would like
to see some more documentation on the lifecycle and working of
delegates, since that may include information that would impact
the implementation of this delegate.