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 11:16  |
Eclipse User |
|
|
|
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 11:42   |
Eclipse User |
|
|
|
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 11:43   |
Eclipse User |
|
|
|
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 #199102 is a reply to message #198628] |
Thu, 13 October 2005 15:15   |
Eclipse User |
|
|
|
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 15:19   |
Eclipse User |
|
|
|
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
>>
>>
>
>
|
|
| | | |
Goto Forum:
Current Time: Thu May 22 22:57:19 EDT 2025
Powered by FUDForum. Page generated in 0.09844 seconds
|