Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 19:21 Go to next message
Alex Kravets is currently offline Alex KravetsFriend
Messages: 561
Registered: November 2009
Senior Member
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 08:59 Go to previous message
Giovanni De Sossi is currently offline Giovanni De SossiFriend
Messages: 161
Registered: October 2009
Location: Rome, Italy
Senior Member

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: Fri Apr 26 08:00:08 GMT 2024

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

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

Back to the top