Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » SWITCH SELECTION PROVIDER PROBLEM
SWITCH SELECTION PROVIDER PROBLEM [message #189733] Thu, 28 July 2005 19:10 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
>
Previous Topic:How to contribute an action to the GEF view's toolbar
Next Topic:Creating new paragraphs while editing in the GEF sample text editor
Goto Forum:
  


Current Time: Fri Apr 19 16:13:33 GMT 2024

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

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

Back to the top