Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » EditPart can't receive REQ_OPEN and REQ_SELECTION request
EditPart can't receive REQ_OPEN and REQ_SELECTION request [message #198584] Wed, 12 October 2005 15:16 Go to next message
victor fiu is currently offline victor fiuFriend
Messages: 37
Registered: July 2009
Member
Most of you should be familiar with Shape.
I implemented public void performRequest(Request req) for
shapeTreeEditPart,
hoping to do something when some nodes in the outline treeview are selected
or double-clicked.

The code is like this: (ENV: WindowsXP, Eclipse 3.1M7, JRE1.5, RCPed
Shape-Plugin)

void performRequest(Request req){

if (REQ_SELECTION.equals(req.getType())){
doMySelection();
}
else if (REQ_OPEN.equals(req.getType())){
doMyOpen();
}
}
However, doMySelection() and doMyOpen() were never called when debugging,
even though I selected or double-clicked on the nodes in the outline tree.
Does someone have any idea to get the requests?

Thanks,
Miaohua Xu
Re: EditPart can't receive REQ_OPEN and REQ_SELECTION request [message #198620 is a reply to message #198584] Wed, 12 October 2005 15:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: greg.gigon.tugulu.com

Well, I have

installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE,
new CallflowSelectionEditPolicy());

in my createEditPolicies() method and I have those requests.

Try to see what is req anyway?
What type do You get?
:)

Hope that helps, Greg


vince wrote:
> Most of you should be familiar with Shape.
> I implemented public void performRequest(Request req) for
> shapeTreeEditPart,
> hoping to do something when some nodes in the outline treeview are selected
> or double-clicked.
>
> The code is like this: (ENV: WindowsXP, Eclipse 3.1M7, JRE1.5, RCPed
> Shape-Plugin)
>
> void performRequest(Request req){
>
> if (REQ_SELECTION.equals(req.getType())){
> doMySelection();
> }
> else if (REQ_OPEN.equals(req.getType())){
> doMyOpen();
> }
> }
> However, doMySelection() and doMyOpen() were never called when debugging,
> even though I selected or double-clicked on the nodes in the outline tree.
> Does someone have any idea to get the requests?
>
> Thanks,
> Miaohua Xu
>
>
Re: EditPart can't receive REQ_OPEN and REQ_SELECTION request [message #198628 is a reply to message #198584] Wed, 12 October 2005 15:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: greg.gigon.tugulu.com

Well, I have

installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE,
new SelectionEditPolicy());

in my createEditPolicies() method and I have those requests.

Try to see what is req anyway?
What type do You get?
:)

Hope that helps, Greg


vince wrote:
> Most of you should be familiar with Shape.
> I implemented public void performRequest(Request req) for
> shapeTreeEditPart,
> hoping to do something when some nodes in the outline treeview are selected
> or double-clicked.
>
> The code is like this: (ENV: WindowsXP, Eclipse 3.1M7, JRE1.5, RCPed
> Shape-Plugin)
>
> void performRequest(Request req){
>
> if (REQ_SELECTION.equals(req.getType())){
> doMySelection();
> }
> else if (REQ_OPEN.equals(req.getType())){
> doMyOpen();
> }
> }
> However, doMySelection() and doMyOpen() were never called when debugging,
> even though I selected or double-clicked on the nodes in the outline tree.
> Does someone have any idea to get the requests?
>
> Thanks,
> Miaohua Xu
>
>
Re: EditPart can't receive REQ_OPEN and REQ_SELECTION request [message #198663 is a reply to message #198584] Wed, 12 October 2005 15:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

I'm not sure if DragTrackers are used in the tree since reordering is done
using native drag-and-drop.

Are you returning the drag tracker in the tree editpart? BTW, pick one
place/thread to discuss this problem.

"vince" <fiustudent@hotmail.com> wrote in message
news:dij9da$18l$1@news.eclipse.org...
> Most of you should be familiar with Shape.
> I implemented public void performRequest(Request req) for
> shapeTreeEditPart,
> hoping to do something when some nodes in the outline treeview are
> selected or double-clicked.
>
> The code is like this: (ENV: WindowsXP, Eclipse 3.1M7, JRE1.5, RCPed
> Shape-Plugin)
>
> void performRequest(Request req){
>
> if (REQ_SELECTION.equals(req.getType())){
> doMySelection();
> }
> else if (REQ_OPEN.equals(req.getType())){
> doMyOpen();
> }
> }
> However, doMySelection() and doMyOpen() were never called when debugging,
> even though I selected or double-clicked on the nodes in the outline tree.
> Does someone have any idea to get the requests?
>
> Thanks,
> Miaohua Xu
>
>
Re: EditPart can't receive REQ_OPEN and REQ_SELECTION request [message #199102 is a reply to message #198628] Thu, 13 October 2005 19:15 Go to previous messageGo to next message
victor fiu is currently offline victor fiuFriend
Messages: 37
Registered: July 2009
Member
Thank you for your reply.

I tried that and did get breakpoint in SelectionEditPolicy.showSelection()
if a node was selected. But still can't to handle double-click because still
no REQ_OPEN and REQ_SELECTION found in performRequest(Request req).

Actually I didn't find any request. But I don't think it's because
EditPolicies were not installed. In another view of my program, there is no
editpolicy handling REQ_OPEN, either, but I got REQ_OPEN in that editpart's
performRequest(). Is it because the outline TreeViewer has handled many
requests so that it doesn't dispatch them?

Thanks,
Miaohua Xu

"Greg" <greg.gigon@tugulu.com> wrote in message
news:dijav6$3hu$1@news.eclipse.org...
> Well, I have
>
> installEditPolicy(EditPolicy.SELECTION_FEEDBACK_ROLE,
> new SelectionEditPolicy());
>
> in my createEditPolicies() method and I have those requests.
>
> Try to see what is req anyway?
> What type do You get?
> :)
>
> Hope that helps, Greg
>
>
> vince wrote:
>> Most of you should be familiar with Shape.
>> I implemented public void performRequest(Request req) for
>> shapeTreeEditPart,
>> hoping to do something when some nodes in the outline treeview are
>> selected or double-clicked.
>>
>> The code is like this: (ENV: WindowsXP, Eclipse 3.1M7, JRE1.5, RCPed
>> Shape-Plugin)
>>
>> void performRequest(Request req){
>>
>> if (REQ_SELECTION.equals(req.getType())){
>> doMySelection();
>> }
>> else if (REQ_OPEN.equals(req.getType())){
>> doMyOpen();
>> }
>> }
>> However, doMySelection() and doMyOpen() were never called when debugging,
>> even though I selected or double-clicked on the nodes in the outline
>> tree. Does someone have any idea to get the requests?
>>
>> Thanks,
>> Miaohua Xu
>>
Re: EditPart can't receive REQ_OPEN and REQ_SELECTION request [message #199110 is a reply to message #198663] Thu, 13 October 2005 19:19 Go to previous messageGo to next message
victor fiu is currently offline victor fiuFriend
Messages: 37
Registered: July 2009
Member
Thank you for your reply!

I am guessing the outline TreeViewer has handled such request so that it
doesn't dispatch them. Could you please point out a direction for me? Say,
shall I look into the source code of treeViewer? or something else?

Additional, what do you mean by saying "pick one place/thread to discuss
this problem"? I am kind of new to Eclipse.

Thanks!
Miaohua Xu

"Randy Hudson" <none@us.ibm.com> wrote in message
news:dijbkt$4i4$1@news.eclipse.org...
> I'm not sure if DragTrackers are used in the tree since reordering is done
> using native drag-and-drop.
>
> Are you returning the drag tracker in the tree editpart? BTW, pick one
> place/thread to discuss this problem.
>
> "vince" <fiustudent@hotmail.com> wrote in message
> news:dij9da$18l$1@news.eclipse.org...
>> Most of you should be familiar with Shape.
>> I implemented public void performRequest(Request req) for
>> shapeTreeEditPart,
>> hoping to do something when some nodes in the outline treeview are
>> selected or double-clicked.
>>
>> The code is like this: (ENV: WindowsXP, Eclipse 3.1M7, JRE1.5, RCPed
>> Shape-Plugin)
>>
>> void performRequest(Request req){
>>
>> if (REQ_SELECTION.equals(req.getType())){
>> doMySelection();
>> }
>> else if (REQ_OPEN.equals(req.getType())){
>> doMyOpen();
>> }
>> }
>> However, doMySelection() and doMyOpen() were never called when debugging,
>> even though I selected or double-clicked on the nodes in the outline
>> tree. Does someone have any idea to get the requests?
>>
>> Thanks,
>> Miaohua Xu
>>
>>
>
>
Re: EditPart can't receive REQ_OPEN and REQ_SELECTION request [message #199347 is a reply to message #199110] Fri, 14 October 2005 14:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

"vince" <fiustudent@hotmail.com> wrote in message
news:dimbvr$uhk$1@news.eclipse.org...
> Thank you for your reply!
>
> I am guessing the outline TreeViewer has handled such request so that it
> doesn't dispatch them. Could you please point out a direction for me? Say,
> shall I look into the source code of treeViewer? or something else?

You should be looking at the editpart's getDragTrackerMethod, and at
SelectEditPartTracker, which is the tool that sends the open request. You'll
note that AbstractTreeEditPart does return a drag tracker, so this request
never gets sent.

Please open a bug for a special drag tracker just for treeitems which only
sends these requests, but doesn't perform any selection
>
> Additional, what do you mean by saying "pick one place/thread to discuss
> this problem"? I am kind of new to Eclipse.

I am referring to the different places on this newsgroup that you are asking
about the same problem
Re: EditPart can't receive REQ_OPEN and REQ_SELECTION request [message #199882 is a reply to message #199347] Wed, 19 October 2005 21:18 Go to previous messageGo to next message
victor fiu is currently offline victor fiuFriend
Messages: 37
Registered: July 2009
Member
With your help, I finally figured it out it's because
AbstractTreeEditpart.getDragTracker simply return null while actually a
SelectEditPartTracker is needed.

Thank you very much!
Miaohua Xu

"Randy Hudson" <none@us.ibm.com> wrote in message
news:diogk5$f4p$1@news.eclipse.org...
> "vince" <fiustudent@hotmail.com> wrote in message
> news:dimbvr$uhk$1@news.eclipse.org...
>> Thank you for your reply!
>>
>> I am guessing the outline TreeViewer has handled such request so that it
>> doesn't dispatch them. Could you please point out a direction for me?
>> Say, shall I look into the source code of treeViewer? or something else?
>
> You should be looking at the editpart's getDragTrackerMethod, and at
> SelectEditPartTracker, which is the tool that sends the open request.
> You'll note that AbstractTreeEditPart does return a drag tracker, so this
> request never gets sent.
>
> Please open a bug for a special drag tracker just for treeitems which only
> sends these requests, but doesn't perform any selection
>>
>> Additional, what do you mean by saying "pick one place/thread to discuss
>> this problem"? I am kind of new to Eclipse.
>
> I am referring to the different places on this newsgroup that you are
> asking about the same problem
>
Re: EditPart can't receive REQ_OPEN and REQ_SELECTION request [message #199906 is a reply to message #199882] Wed, 19 October 2005 21:25 Go to previous message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

SelectEditPartTracker is going to select the part when it will already have
been selected by the native Tree.

"vince" <fiustudent@hotmail.com> wrote in message
news:dj6d6t$h73$1@news.eclipse.org...
> With your help, I finally figured it out it's because
> AbstractTreeEditpart.getDragTracker simply return null while actually a
> SelectEditPartTracker is needed.
>
> Thank you very much!
Previous Topic:draw2d Newbie question
Next Topic:sticky tool selected on the palette
Goto Forum:
  


Current Time: Thu Nov 07 06:52:35 GMT 2024

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

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

Back to the top