Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Create a node with Command AND setting EAttribute?
Create a node with Command AND setting EAttribute? [message #501848] Fri, 04 December 2009 03:31
Ugo Sangiorgi is currently offline Ugo SangiorgiFriend
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
Previous Topic:Accessing the editingdomain from another Plugin
Next Topic:Open diagram of shortcut
Goto Forum:
  


Current Time: Sat Apr 17 22:02:36 GMT 2021

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

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

Back to the top