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: 554
Registered: November 2009
Senior Member

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?

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

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

Current Time: Fri Mar 05 16:09:21 GMT 2021

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

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

Back to the top