Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Remove menu for creating child nodes in the parent node
Remove menu for creating child nodes in the parent node [message #692816] Tue, 05 July 2011 09:53 Go to next message
Aintzane  is currently offline Aintzane Friend
Messages: 10
Registered: March 2011
Junior Member
Hi,

I have a parent node, with two child nodes affixed to its east and west sides. These child nodes are created programatically. In order to avoid creating them by means of a tool, I didn't add a creation tool in the palette, but when I pass the mouse over the parent node, a context menu appear with the options for creating these child nodes. How can I avoid this context menu?


Thanks in advance,

Aintzane
Re: Remove menu for creating child nodes in the parent node [message #693000 is a reply to message #692816] Tue, 05 July 2011 15:49 Go to previous message
Giovanni De Sossi is currently offline Giovanni De SossiFriend
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

Hi Aintzane,

in your [XYZ]DiagramEditPart.createDefaultEditPolicies() you have to add the following code:

[...]
removeEditPolicy(EditPolicyRoles.POPUPBAR_ROLE);
removeEditPolicy(EditPolicyRoles.CONNECTION_HANDLES_ROLE);


HTH, bye

Giovanni

Previous Topic:Register the diagram as selection provider
Next Topic:Get All the Information in the Diagram
Goto Forum:
  


Current Time: Mon Mar 08 07:18:11 GMT 2021

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

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

Back to the top