|Create a node with Command AND setting EAttribute? [message #501848]
||Fri, 04 December 2009 03:31
| Ugo Sangiorgi
Registered: July 2009
Hi all, i'm developing a drag'n'drop funcionality to my gmf editor, i'm |
able to drop a item from nebula gallery widget onto a compartment and to
create the node, using the getDropObjectsCommand method.
But i want to set a property (a string onto this newly created node), so
it gets created with this property already set.
how do i do that?
here is what i have:
DiagramEditor editor = (DiagramEditor)
CreateViewRequest createRequest =
CreateViewRequestFactory.getCreateShapeRequest(MolicElementT ypes.Sketch_3001,editor.getDiagramEditPart().getDiagramPrefe rencesHint());
command = getHost().getCommand(createRequest);
then i just return this command, i dont execute it 'myself'.
ps. I'd tried the method that Artur Kronenberg has posted (with
createVewCommand), but the nodes arent created nor showed. =/
Thanks in advance!
Powered by FUDForum
. Page generated in 0.02174 seconds