Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Dragging from the Palette does not have the source feedback
Dragging from the Palette does not have the source feedback [message #165183] Sat, 22 January 2005 00:12 Go to next message
Eclipse UserFriend
Originally posted by: kevinlouisnospam.hotmail.com

I am wondering why dragging from the Palette does not show the source
feedback. When I drag a LED from the Palette in the logic sample, I expect
it shows the LED tracking image. However, when I move a LED on the editor,
it shows the tracking image.

I check the codes, the DragEditPartsTracker has the showSourceFeedback
function to show the feedback of all editParts dragged.

But for dragging from the Palette, the CreationTool has the handleMove
function to handle the moust move. It does not have the showSourceFeedback.

To provide the source feedback from the Palette, I have to override the
CombinedTemplaeCreationEntry to create my own CreationTool derived class.
Inside the MyCreationTool class, I override the handleMove and call my own
showSourceFeedback. I need to override some event handler to deactivate the
figure, just like what the DragEditPartsTracker does.

Is it the right way to do it? It is good if the next version of the GEF can
provide this feedback.

Thanks.
Re: Dragging from the Palette does not have the source feedback [message #165803 is a reply to message #165183] Thu, 27 January 2005 00:34 Go to previous messageGo to next message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
Dragging from the palette uses native drag and drop, so the
DragEditPartsTracker doesn't even come into the picture. Nor is the
sourceFeedback shown at this time because there is no source (the LED
editpart hasn't been created yet, so you can't ask it to show source
feedback).

Showing the feedback in CreationTool#handleMove will only work if you use
click-and-drop. It won't work for drag-and-drop. Also, on whom are you
invoking showSourceFeedback()?

One hack is to just show the source feedback as the target feedback. That
means that your container(s) would be responsible for showing this feedback
in their showTargetFeedback() for creation requests. Then you won't have to
mess with native DND or with the CreationTool.

"Kevin" <kevinlouisnospam@hotmail.com> wrote in message
news:css5qa$ato$1@www.eclipse.org...
> I am wondering why dragging from the Palette does not show the source
> feedback. When I drag a LED from the Palette in the logic sample, I
expect
> it shows the LED tracking image. However, when I move a LED on the
editor,
> it shows the tracking image.
>
> I check the codes, the DragEditPartsTracker has the showSourceFeedback
> function to show the feedback of all editParts dragged.
>
> But for dragging from the Palette, the CreationTool has the handleMove
> function to handle the moust move. It does not have the
showSourceFeedback.
>
> To provide the source feedback from the Palette, I have to override the
> CombinedTemplaeCreationEntry to create my own CreationTool derived class.
> Inside the MyCreationTool class, I override the handleMove and call my own
> showSourceFeedback. I need to override some event handler to deactivate
the
> figure, just like what the DragEditPartsTracker does.
>
> Is it the right way to do it? It is good if the next version of the GEF
can
> provide this feedback.
>
> Thanks.
>
>
Re: Dragging from the Palette does not have the source feedback [message #165834 is a reply to message #165803] Thu, 27 January 2005 01:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: kevinlouisnospam.hotmail.com

MyCreationTool has a feeback IFigure member which is just RectangleFigure
that tells the user the side of the editPart that will be dropped. Once
this MyCreationTool is deactivated, this feedback is cleaned up.

If I show it in the showTargetFeedback, I need to pass the rectangle info to
the target editPart.

You have a good point that it may work in the click-and-drop case only.
Could you tell me what the handler for the drag-and-drop case?

Thanks.

Kevin

"Pratik Shah" <ppshah@us.ibm.com> wrote in message
news:ct9cud$kt7$1@www.eclipse.org...
> Dragging from the palette uses native drag and drop, so the
> DragEditPartsTracker doesn't even come into the picture. Nor is the
> sourceFeedback shown at this time because there is no source (the LED
> editpart hasn't been created yet, so you can't ask it to show source
> feedback).
>
> Showing the feedback in CreationTool#handleMove will only work if you use
> click-and-drop. It won't work for drag-and-drop. Also, on whom are you
> invoking showSourceFeedback()?
>
> One hack is to just show the source feedback as the target feedback. That
> means that your container(s) would be responsible for showing this
feedback
> in their showTargetFeedback() for creation requests. Then you won't have
to
> mess with native DND or with the CreationTool.
>
> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
> news:css5qa$ato$1@www.eclipse.org...
> > I am wondering why dragging from the Palette does not show the source
> > feedback. When I drag a LED from the Palette in the logic sample, I
> expect
> > it shows the LED tracking image. However, when I move a LED on the
> editor,
> > it shows the tracking image.
> >
> > I check the codes, the DragEditPartsTracker has the showSourceFeedback
> > function to show the feedback of all editParts dragged.
> >
> > But for dragging from the Palette, the CreationTool has the handleMove
> > function to handle the moust move. It does not have the
> showSourceFeedback.
> >
> > To provide the source feedback from the Palette, I have to override the
> > CombinedTemplaeCreationEntry to create my own CreationTool derived
class.
> > Inside the MyCreationTool class, I override the handleMove and call my
own
> > showSourceFeedback. I need to override some event handler to deactivate
> the
> > figure, just like what the DragEditPartsTracker does.
> >
> > Is it the right way to do it? It is good if the next version of the GEF
> can
> > provide this feedback.
> >
> > Thanks.
> >
> >
>
>
Re: Dragging from the Palette does not have the source feedback [message #165965 is a reply to message #165834] Thu, 27 January 2005 16:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

DND and loaded cursor (creation tool) should both appear the same to the
target editpart. They are both creation requests.

"Kevin" <kevinlouisnospam@hotmail.com> wrote in message
news:ct9hu1$5mb$1@www.eclipse.org...
> MyCreationTool has a feeback IFigure member which is just RectangleFigure
> that tells the user the side of the editPart that will be dropped. Once
> this MyCreationTool is deactivated, this feedback is cleaned up.
>
> If I show it in the showTargetFeedback, I need to pass the rectangle info
> to
> the target editPart.
>
> You have a good point that it may work in the click-and-drop case only.
> Could you tell me what the handler for the drag-and-drop case?
>
> Thanks.
>
> Kevin
>
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:ct9cud$kt7$1@www.eclipse.org...
>> Dragging from the palette uses native drag and drop, so the
>> DragEditPartsTracker doesn't even come into the picture. Nor is the
>> sourceFeedback shown at this time because there is no source (the LED
>> editpart hasn't been created yet, so you can't ask it to show source
>> feedback).
>>
>> Showing the feedback in CreationTool#handleMove will only work if you use
>> click-and-drop. It won't work for drag-and-drop. Also, on whom are you
>> invoking showSourceFeedback()?
>>
>> One hack is to just show the source feedback as the target feedback.
>> That
>> means that your container(s) would be responsible for showing this
> feedback
>> in their showTargetFeedback() for creation requests. Then you won't have
> to
>> mess with native DND or with the CreationTool.
>>
>> "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
>> news:css5qa$ato$1@www.eclipse.org...
>> > I am wondering why dragging from the Palette does not show the source
>> > feedback. When I drag a LED from the Palette in the logic sample, I
>> expect
>> > it shows the LED tracking image. However, when I move a LED on the
>> editor,
>> > it shows the tracking image.
>> >
>> > I check the codes, the DragEditPartsTracker has the showSourceFeedback
>> > function to show the feedback of all editParts dragged.
>> >
>> > But for dragging from the Palette, the CreationTool has the handleMove
>> > function to handle the moust move. It does not have the
>> showSourceFeedback.
>> >
>> > To provide the source feedback from the Palette, I have to override the
>> > CombinedTemplaeCreationEntry to create my own CreationTool derived
> class.
>> > Inside the MyCreationTool class, I override the handleMove and call my
> own
>> > showSourceFeedback. I need to override some event handler to
>> > deactivate
>> the
>> > figure, just like what the DragEditPartsTracker does.
>> >
>> > Is it the right way to do it? It is good if the next version of the
>> > GEF
>> can
>> > provide this feedback.
>> >
>> > Thanks.
>> >
>> >
>>
>>
>
>
Re: Dragging from the Palette does not have the source feedback [message #165986 is a reply to message #165834] Thu, 27 January 2005 17:24 Go to previous message
Pratik Shah is currently offline Pratik ShahFriend
Messages: 1077
Registered: July 2009
Senior Member
"Kevin" <kevinlouisnospam@hotmail.com> wrote in message
news:ct9hu1$5mb$1@www.eclipse.org...
> MyCreationTool has a feeback IFigure member which is just RectangleFigure
> that tells the user the side of the editPart that will be dropped. Once
> this MyCreationTool is deactivated, this feedback is cleaned up.
>
> If I show it in the showTargetFeedback, I need to pass the rectangle info
to
> the target editPart.

It is already being passed to it (via the CreateRequest).

>
> You have a good point that it may work in the click-and-drop case only.
> Could you tell me what the handler for the drag-and-drop case?
>

Like I mentioned earlier, it utilizes native DND. For the logic example,
look at LogicTemplateTransferDropTargetListener.

> Thanks.
>
> Kevin
>
> "Pratik Shah" <ppshah@us.ibm.com> wrote in message
> news:ct9cud$kt7$1@www.eclipse.org...
> > Dragging from the palette uses native drag and drop, so the
> > DragEditPartsTracker doesn't even come into the picture. Nor is the
> > sourceFeedback shown at this time because there is no source (the LED
> > editpart hasn't been created yet, so you can't ask it to show source
> > feedback).
> >
> > Showing the feedback in CreationTool#handleMove will only work if you
use
> > click-and-drop. It won't work for drag-and-drop. Also, on whom are you
> > invoking showSourceFeedback()?
> >
> > One hack is to just show the source feedback as the target feedback.
That
> > means that your container(s) would be responsible for showing this
> feedback
> > in their showTargetFeedback() for creation requests. Then you won't
have
> to
> > mess with native DND or with the CreationTool.
> >
> > "Kevin" <kevinlouisnospam@hotmail.com> wrote in message
> > news:css5qa$ato$1@www.eclipse.org...
> > > I am wondering why dragging from the Palette does not show the source
> > > feedback. When I drag a LED from the Palette in the logic sample, I
> > expect
> > > it shows the LED tracking image. However, when I move a LED on the
> > editor,
> > > it shows the tracking image.
> > >
> > > I check the codes, the DragEditPartsTracker has the showSourceFeedback
> > > function to show the feedback of all editParts dragged.
> > >
> > > But for dragging from the Palette, the CreationTool has the handleMove
> > > function to handle the moust move. It does not have the
> > showSourceFeedback.
> > >
> > > To provide the source feedback from the Palette, I have to override
the
> > > CombinedTemplaeCreationEntry to create my own CreationTool derived
> class.
> > > Inside the MyCreationTool class, I override the handleMove and call my
> own
> > > showSourceFeedback. I need to override some event handler to
deactivate
> > the
> > > figure, just like what the DragEditPartsTracker does.
> > >
> > > Is it the right way to do it? It is good if the next version of the
GEF
> > can
> > > provide this feedback.
> > >
> > > Thanks.
> > >
> > >
> >
> >
>
>
Previous Topic:Bug in SWTEventDispatcher?
Next Topic:Help for a newbie
Goto Forum:
  


Current Time: Fri Apr 26 19:03:20 GMT 2024

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

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

Back to the top