Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » DND with InputDialog
DND with InputDialog [message #922816] Tue, 25 September 2012 11:14 Go to next message
John M. is currently offline John M.
Messages: 198
Registered: July 2010
Senior Member
Hello,

I am searching for a possibility to show an InputDialog after dragging an object for giving more details and so on.
I have my own createDragAndDropCommand, but I know from Ed Merks, that isn't the right way to combine commands with dialogs.

Is there another point to start?
I think there must be somewhere an event after inserting the element.
Re: DND with InputDialog [message #922893 is a reply to message #922816] Tue, 25 September 2012 12:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26050
Registered: July 2009
Senior Member
You generate a lot of questions. If you don't want to just execute a
command, you'll have do your own drop handler.

On 25/09/2012 1:14 PM, John M. wrote:
> Hello,
>
> I am searching for a possibility to show an InputDialog after dragging
> an object for giving more details and so on.
> I have my own createDragAndDropCommand, but I know from Ed Merks, that
> isn't the right way to combine commands with dialogs.
>
> Is there another point to start?
> I think there must be somewhere an event after inserting the element.
Re: DND with InputDialog [message #922916 is a reply to message #922816] Tue, 25 September 2012 13:00 Go to previous messageGo to next message
John M. is currently offline John M.
Messages: 198
Registered: July 2010
Senior Member
> You generate a lot of questions
I hope there is no problem with that. :/

> If you don't want to just execute a command, you'll have do your own drop handler.
I think you mean a own DropTargetAdapter, do you?
Re: DND with InputDialog [message #922942 is a reply to message #922916] Tue, 25 September 2012 13:24 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26050
Registered: July 2009
Senior Member
Yes.

On 25/09/2012 3:00 PM, John M. wrote:
>> You generate a lot of questions
> I hope there is no problem with that. :/
>
>> If you don't want to just execute a command, you'll have do your own
>> drop handler.
> I think you mean a own DropTargetAdapter, do you?
Re: DND with InputDialog [message #925170 is a reply to message #922942] Thu, 27 September 2012 12:56 Go to previous messageGo to next message
John M. is currently offline John M.
Messages: 198
Registered: July 2010
Senior Member
But I think there is no way around to open the Dialog from the DropTargetAdapter, is it?
Re: DND with InputDialog [message #925395 is a reply to message #925170] Thu, 27 September 2012 17:20 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26050
Registered: July 2009
Senior Member
I don't know. You can always post and event to be processed later.


On 27/09/2012 2:56 PM, John M. wrote:
> But I think there is no way around to open the Dialog from the
> DropTargetAdapter, is it?
Re: DND with InputDialog [message #930502 is a reply to message #925395] Tue, 02 October 2012 11:31 Go to previous messageGo to next message
John M. is currently offline John M.
Messages: 198
Registered: July 2010
Senior Member
>> But I think there is no way around to open the Dialog from the
>> DropTargetAdapter, is it?
> I don't know. You can always post and event to be processed later.
Excuse me, but I don't understand your hint.
Re: DND with InputDialog [message #930517 is a reply to message #930502] Tue, 02 October 2012 11:42 Go to previous messageGo to next message
Ed Merks is currently offline Ed Merks
Messages: 26050
Registered: July 2009
Senior Member
org.eclipse.swt.widgets.Display.asyncExec(Runnable)

On 02/10/2012 1:31 PM, John M. wrote:
>>> But I think there is no way around to open the Dialog from the
>>> DropTargetAdapter, is it?
>> I don't know. You can always post and event to be processed later.
> Excuse me, but I don't understand your hint.
Re: DND with InputDialog [message #949265 is a reply to message #930517] Thu, 18 October 2012 21:19 Go to previous messageGo to next message
John M. is currently offline John M.
Messages: 198
Registered: July 2010
Senior Member
Thanks for the hint. Yeah I know that method. Smile
But where to use it?

I create my DND Command and it is executed. After it the element is added to my resource.
How can I connect it with showing my dialog?
Re: DND with InputDialog [message #949611 is a reply to message #949265] Fri, 19 October 2012 05:50 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26050
Registered: July 2009
Senior Member
John,

You need to respond directly to the drop event to open a dialog and
create a command to execute only after the dialog is completed (with
okay). You could do that by specializing
org.eclipse.emf.edit.ui.dnd.EditingDomainViewerDropAdapter.drop to
detect when you want a dialog and bring up the dialog rather than
execute the command.


On 18/10/2012 11:19 PM, John M. wrote:
> Thanks for the hint. Yeah I know that method. :)
> But where to use it?
>
> I create my DND Command and it is executed. After it the element is
> added to my resource.
> How can I connect it with showing my dialog?
Previous Topic:Map in Map ArrayStoreException
Next Topic:Most mature Store for CDO?
Goto Forum:
  


Current Time: Thu Sep 18 17:48:39 GMT 2014

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

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