Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » ViewerDropAdapter
ViewerDropAdapter [message #295097] Wed, 23 November 2005 09:21 Go to next message
Eclipse UserFriend
Originally posted by: osipov.appliedtech.ru

Hi, everybody!
I use ViewerDropAdapter to add drop support to my view.But if I try to drop
for the first time no drop operation is available (I see this crossed circle
no matter where I am trying to drop) until I press CTRL, only then the
behaviour of drop seems to be ok. But how do I switch to move operation? In
normal situation I use CTRL to switch between copy and move. But how do I do
it here?
And how to I start withh copy operation, not with NONE operation.
thanks a lot in advance for your help.
Re: ViewerDropAdapter [message #295549 is a reply to message #295097] Fri, 02 December 2005 05:32 Go to previous messageGo to next message
Eclipse UserFriend
Peter -

Shortly before you started this thread, I tried to revive an old thread on the same topic,
"ViewerDropAdapter validateDrop()", without success. So, I have now posted a bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=119014

Which contains my small suggestion for a not-very-impressive workaround. I think you and I are
having the same problem, though I do not yet know what exactly the problem is.

Paul K
Re: ViewerDropAdapter [message #296638 is a reply to message #295549] Wed, 28 December 2005 15:05 Go to previous messageGo to next message
Eclipse UserFriend
Peter --

Sorry for slow reply (your answer went to my webmail, which I now rarely use, since it has gotten
picked up by the spammers).

> I saved the problem in a way. Overloaded fuction
> public void dragOver(DropTargetEvent event)
> {
> event.detail = DND.DROP_NONE;
> if (canCopy(event))
> {
> event.detail = DND.DROP_COPY;
> }
> super.dragOver(event);
> }
> Though it just works for copy - mouse pointer is never changed to
> "move" no matter what I do.
>

Right, makes sense. I have made some progress, now posted to the bug.

Paul
Re: ViewerDropAdapter [message #296650 is a reply to message #296638] Thu, 29 December 2005 03:09 Go to previous message
Eclipse UserFriend
Originally posted by: osipov.appliedtech.ru

Anyway, Paul, Now it works the way it should be.
What I did wrong is - in my drag source I did not add MOVE operation, just
copy.
Now what I am doing is just overload operation dragOver and when drop is not
allowed I set
event.detail = DND.DROP_NONE;
otherwise I am doing nothing and it works fine.
hope this helps.

> Peter --
>
> Sorry for slow reply (your answer went to my webmail, which I now rarely
use, since it has gotten
> picked up by the spammers).
>
> > I saved the problem in a way. Overloaded fuction
> > public void dragOver(DropTargetEvent event)
> > {
> > event.detail = DND.DROP_NONE;
> > if (canCopy(event))
> > {
> > event.detail = DND.DROP_COPY;
> > }
> > super.dragOver(event);
> > }
> > Though it just works for copy - mouse pointer is never changed to
> > "move" no matter what I do.
> >
>
> Right, makes sense. I have made some progress, now posted to the bug.
>
> Paul
Previous Topic:How could I add content to a TextEditor programmatically?
Next Topic:Design Patterns Java Plug-in?
Goto Forum:
  


Current Time: Sun May 11 06:41:19 EDT 2025

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

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

Back to the top