Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Programatically adding nodes to the GMF diagram(Programatically adding nodes to the GMF diagram)
Programatically adding nodes to the GMF diagram [message #685905] Mon, 20 June 2011 11:50 Go to next message
Eclipse UserFriend
HI,
I have been working on this topic since last week. I have a problem in adding nodes to the GMF Diagram.
I have a systemView which contains multiple systemBlocks and each systemBlock contains multiple parameters. My question is if i want to add the parameter along with the systemblock and systemview it is not possible. It gives me a write transaction error.

When i add only the systemView it is fine, but when I try to add a full nested block (systemview containing systemblock containing parameters) I get the error.

Are there any other tutorials other than the one in Eclipse website, I have already checked the tutorial of Custom Actions, but that is not what I want.

Can anyone help me with this !!!

Thanks and Regards,
SPRao

Re: Programatically adding nodes to the GMF diagram [message #693299 is a reply to message #685905] Wed, 06 July 2011 04:26 Go to previous messageGo to next message
Eclipse UserFriend
You need to make sure you use the command stack when you programatically add nodes. If you simply use setor add methods it will not work.
You need to do something like:

SetCommand cmd = SetCommand.create(.....) 


then something like:
  someEditPart.getEdittingdomain().getCommandStack().execute(cmd);
  
Re: Programatically adding nodes to the GMF diagram [message #716360 is a reply to message #685905] Wed, 17 August 2011 03:18 Go to previous message
Eclipse UserFriend
Hi

I am newbei to GMF...
If I want to add new parameters dynamically to the property window for a
specific node in gmf..How it can be done....
Please help me regarding this...I am stuck at this stage...

thanks,
Vinay
Previous Topic:Loading external resource
Next Topic:Block resize an element
Goto Forum:
  


Current Time: Fri Jul 04 04:56:52 EDT 2025

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

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

Back to the top