Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Enabling drag-n-drop from palette
Enabling drag-n-drop from palette [message #685925] Mon, 20 June 2011 15:21 Go to next message
Eclipse UserFriend
Hello,

I found this discussion on enabling DND from the palette in GMF generated editor. Changes work, but when I drag a palette item over any edit part in the editor feedback always shows that drop is permitted, even if particular edit part does not accept object being created. Is this expected behavior?

Thanks,
Alex
Re: Enabling drag-n-drop from palette [message #685980 is a reply to message #685925] Tue, 21 June 2011 04:59 Go to previous message
Eclipse UserFriend
Hi Alex,

take a look at the [XYZ]DiagramItemSemanticEditPolicy: here, in the getCreateCommand(CreateElementRequest req) method, you can disable the creation of unwanted objects simply returning "null"; this way, you have the "forbidden" cursor icon.

HTH, bye

Giovanni
Previous Topic:Resizing subclasses of LabelEditPart
Next Topic:GMF Databaseconnection Issue
Goto Forum:
  


Current Time: Tue Jul 01 01:01:46 EDT 2025

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

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

Back to the top