Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Child Node, Top Level Node problem
Child Node, Top Level Node problem [message #140613] Fri, 29 June 2007 10:01
Grzegorz Bialek is currently offline Grzegorz BialekFriend
Messages: 43
Registered: July 2009
Member
Hello,



I try to build editor with elements which can be added as top level as well
as child.



I create common parent interface to have only one editpart for each object.
This solution works fine when elements are children but I this case GMF
create two editparts: one for top level and one child level. Generated
classes differ from each other only by method delete in semantic policy.



CompoundCommand cc = getDestroyEdgesCommand();

addDestroyShortcutsCommand(cc);



//difference start

View view = (View) getHost().getModel();

if (view.getEAnnotation("Shortcut") != null) { //$NON-NLS-1$

req.setElementToDestroy(view);

}

//difference end



cc.add(getGEFWrapper(new DestroyElementCommand(req)));

return cc.unwrap();



I don't plan to use 'shortcuts' in my editor so it is possible to set some
properties (in gefgen?) to force generating only single editpart?



Please help. (sorry for my English)

Grzegorz Bialek
Previous Topic:Creating connection with null source and/or null target
Next Topic:Shortcut to different model?
Goto Forum:
  


Current Time: Sun Oct 06 14:47:41 GMT 2024

Powered by FUDForum. Page generated in 0.02602 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top