double-click and changing selection programmatically [message #196233] |
Sat, 17 September 2005 00:02 |
Eclipse User |
|
|
|
Originally posted by: no.yes.maybe
I'll try to rephrase a problem I already posted earlier to make it more
understandable.
I have a diagram editor. When the user double-clicks on a node I want to
programmatically select a different node (I know it sounds weird, but it
makes sense in my app).
I implemented performRequest(Request r) so that if the request is of
type REQ_OPEN I call viewer.setSelection(new
StructuredSelection(otherEditPart));
What happens is that after otherEditPart is selected, the selection
returns on the original node the used double-clicked on. I believe
that's because a selection event is posted due to the clicking on such
node.
Any suggestions on how to achieve the desired functionality?
Thanks,
Roberto
|
|
|
Re: double-click and changing selection programmatically [message #196280 is a reply to message #196233] |
Sat, 17 September 2005 10:56 |
Eclipse User |
|
|
|
Originally posted by: mvsteenbergen.eljakim.scratch-this.nl
No idea if this works, but maybe you can wrap it in a runnable and run
it on the event thread so it gets executed later?
roberto wrote:
> I'll try to rephrase a problem I already posted earlier to make it more
> understandable.
>
> I have a diagram editor. When the user double-clicks on a node I want to
> programmatically select a different node (I know it sounds weird, but it
> makes sense in my app).
>
> I implemented performRequest(Request r) so that if the request is of
> type REQ_OPEN I call viewer.setSelection(new
> StructuredSelection(otherEditPart));
>
> What happens is that after otherEditPart is selected, the selection
> returns on the original node the used double-clicked on. I believe
> that's because a selection event is posted due to the clicking on such
> node.
>
> Any suggestions on how to achieve the desired functionality?
>
> Thanks,
> Roberto
|
|
|
Re: double-click and changing selection programmatically [message #196316 is a reply to message #196280] |
Sat, 17 September 2005 16:24 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
Right. Display.asyncExec().
"Martijn van Steenbergen" <mvsteenbergen@eljakim.scratch-this.nl> wrote in
message news:dggsol$2op$1@news.eclipse.org...
> No idea if this works, but maybe you can wrap it in a runnable and run
> it on the event thread so it gets executed later?
>
> roberto wrote:
> > I'll try to rephrase a problem I already posted earlier to make it more
> > understandable.
> >
> > I have a diagram editor. When the user double-clicks on a node I want to
> > programmatically select a different node (I know it sounds weird, but it
> > makes sense in my app).
> >
> > I implemented performRequest(Request r) so that if the request is of
> > type REQ_OPEN I call viewer.setSelection(new
> > StructuredSelection(otherEditPart));
> >
> > What happens is that after otherEditPart is selected, the selection
> > returns on the original node the used double-clicked on. I believe
> > that's because a selection event is posted due to the clicking on such
> > node.
> >
> > Any suggestions on how to achieve the desired functionality?
> >
> > Thanks,
> > Roberto
|
|
|
Re: double-click and changing selection programmatically [message #196356 is a reply to message #196233] |
Mon, 19 September 2005 04:17 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
This should have been fixed in 3.1.0:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=46757
and then again in 3.1.1
https://bugs.eclipse.org/bugs/show_bug.cgi?id=107752
"roberto" <no@yes.maybe> wrote in message
news:dgfmcs$voo$1@news.eclipse.org...
> I'll try to rephrase a problem I already posted earlier to make it more
> understandable.
>
> I have a diagram editor. When the user double-clicks on a node I want to
> programmatically select a different node (I know it sounds weird, but it
> makes sense in my app).
>
> I implemented performRequest(Request r) so that if the request is of type
> REQ_OPEN I call viewer.setSelection(new
> StructuredSelection(otherEditPart));
>
> What happens is that after otherEditPart is selected, the selection
> returns on the original node the used double-clicked on. I believe that's
> because a selection event is posted due to the clicking on such node.
>
> Any suggestions on how to achieve the desired functionality?
>
> Thanks,
> Roberto
|
|
|
|
Powered by
FUDForum. Page generated in 0.83000 seconds