|Re: Hook for creation and destruction of EObject [message #657913 is a reply to message #656750]
||Fri, 04 March 2011 10:14
| Sebastian Zarnekow
Registered: July 2009
sorry, your message somehow slipped through the net.
1) Have a look at IAstFactory#create . The instance is not fully
initialized, though. AbstractCleaningLinker#beforeModelLinked should be
a better match for your usecase.
2) Please register a EContentAdapter in the resource to get such a
However, I'd recommend to implement something along those lines:
remove any dynamically created instance from your model.
DefaultLinkingService#getLinkedObjects(EObject, EReference, INode):
create instances dynamically if the returned list is empty.
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com
Am 28.02.11 13:49, schrieb Marco:
> According to Sven's proposal I create additional EObject during linking.
> But due to limitation with forward/cyclic references this is too late.
> It would be perfect to create the additional EObjects after normal
> creation of an EObject as a result of parsing.
> 1. Is there a hook called which is called for each EObject identified by
> the parser before linking?
> 2. Is there a hook which is called an Object is removed from source?
Powered by FUDForum
. Page generated in 0.01928 seconds