Child Node, Top Level Node problem [message #140613] |
Fri, 29 June 2007 10:01 |
Grzegorz Bialek 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
|
|
|
Powered by
FUDForum. Page generated in 0.02602 seconds