Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [incquery-dev] eclipsecon example


On 23 October 2013 11:30, Tamas Szabo <tamas.szabo@xxxxxxxxx> wrote:
Dynamic case: I have access to the features themselves in the IncQueryXcoreEcoreBuilder class when for example the annotation is created. I think the registration would be fine here, however, this registration would hold a strong reference in the Registry to the feature. (Every time the xcore is modified a new feature will be created) Is it safe to modify the Registry to use some weak collection?

If the weak collection does not affect the existing functionality, then yes, it is safe. I imagine that old packages registered by Xcore into the EPackage Registry will be removed and at that point, the related features will be also removed from the weak collection?

However, I'm not sure what is the overhead for checking the weak reference every time the isWellbehaving... method is called.

Finally, what about the case when the builder did not run? AFAIK, you created the model editor to work in these cases (thus the query spec registration in the SDF). Shouldn't it (also/instead) register the features?
I think the "also" option would be the solution to go for, because if the generator also registers these features then you will not get the warnings during pattern editing about "not well-behaving" features in the given pattern.


Generated case: from the documentation: " extend the org.eclipse.incquery.runtime.base.wellbehaving.derived.features extension point as described here" I think a link is missing at "here"

Thanks, added.


Back to the top