Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmf-dev] How to use multiple EObject instances with same node on canvas

Hello everyone,

I have one generated ECore for which there is generated model code and and diagram code. Now there is another dynamic eCore that I am creating at runtime.
In the static ECore there is one AnyType object which i am extending in my dynamic ECore object. Now at runtime I want this AnyType objects replaced by objects from my dynamic model.

For this I made changes to xyxNodeTypes class to return my dynamic object class type instead of AnyType and use EditParts of AnyType to draw node on canvas. Problem with this is it is bound to return only this one new Object every time user opens canvas. What my requirement is that I can add objects to canvas based on how many objects are added through Dynamic ECore(which could be more than one). That may mean that I need to add nodes to canvas dynamically and dont have to depend upon generated GMF code for it.

Please let me know if any one know how to achieve this as I really need to deliver this now.
--
Regards
Gaurav Mehta

Back to the top