Create a node with Command AND setting EAttribute? [message #501848] |
Fri, 04 December 2009 03:31 |
Ugo Sangiorgi Messages: 44 Registered: July 2009 |
Member |
|
|
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)
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getActiveEditor();
CreateViewRequest createRequest =
CreateViewRequestFactory.getCreateShapeRequest(MolicElementT ypes.Sketch_3001,editor.getDiagramEditPart().getDiagramPrefe rencesHint());
createRequest.setLocation(request.getLocation());
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. =/
Any clue?
Thanks in advance!
Ugo
|
|
|
Powered by
FUDForum. Page generated in 0.03022 seconds