SWITCH SELECTION PROVIDER PROBLEM [message #189733] |
Thu, 28 July 2005 19:10 |
Eclipse User |
|
|
|
Originally posted by: dakanalis.ced.tuc.gr
Hi,
I try to develop a graphical editor with two graphical viewers. I have
implement a listener in order to initialize the editor each time I switch
between the two viewers. Inside that listener I want to set as selection
provider of the editor the current viewer each time. For that purpose I use
the following code:
editor.getSite().setSelectionProvider( currentViewer );
The problem is that when I try to select a part in the second viewer, the
selection is null because the selectionprovider has not change.Of course the
selectionProvider on the site has changed and the getSelectionProvider
method returns the right provider but when I select something in the
graphical area the selection is null. I managed to fix that problem by using
the method partInputChanged of the class AbstractSelectionService, but that
class it belongs in the org.eclipse.ui.internal package.
What I want is to find a way to update the selection provider of my editor
each time I switch between the two viewers without to use anything from the
internal package. Is thos possible? Any Idea?
Thanks
|
|
|
Re: SWITCH SELECTION PROVIDER PROBLEM [message #189798 is a reply to message #189733] |
Fri, 29 July 2005 15:05 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
See the thread by Themis on 7/27/2005 regarding the same topic.
"Dakanalis" <dakanalis@ced.tuc.gr> wrote in message
news:dcbaj4$o49$1@news.eclipse.org...
> Hi,
>
> I try to develop a graphical editor with two graphical viewers. I have
> implement a listener in order to initialize the editor each time I switch
> between the two viewers. Inside that listener I want to set as selection
> provider of the editor the current viewer each time. For that purpose I
use
> the following code:
> editor.getSite().setSelectionProvider( currentViewer );
> The problem is that when I try to select a part in the second viewer, the
> selection is null because the selectionprovider has not change.Of course
the
> selectionProvider on the site has changed and the getSelectionProvider
> method returns the right provider but when I select something in the
> graphical area the selection is null. I managed to fix that problem by
using
> the method partInputChanged of the class AbstractSelectionService, but
that
> class it belongs in the org.eclipse.ui.internal package.
>
> What I want is to find a way to update the selection provider of my
editor
> each time I switch between the two viewers without to use anything from
the
> internal package. Is thos possible? Any Idea?
>
>
> Thanks
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02965 seconds