ACTIVE SELECTION PROVIDER PROBLEM!!!!!!!! [message #189478] |
Wed, 27 July 2005 15:44 |
Eclipse User |
|
|
|
Originally posted by: dakanalis.ced.tuc.gr
Hello,
I have developed a GEF based graphical editor and I have the following
problem:
The editor is consisted of two tabs.Each tab is a GraphicalViewer. Every
time I switch between the two tabs a listener does the following:
editor.setGraphicalViewer( editor.getGraphicalViewer() );
editor.getSite().setSelectionProvider( editor.getGraphicalViewer() );
The problem is that the active selectionProvider does not change, so when i
try to select an editpart in the second viewer the selection is null. I used
the following code in order to fix that problem :
((AbstractSelectionService)editor.getSite().getWorkbenchWind ow().getSelectio
nService()).partInputChanged(editor);
It works but only with the 3.0 version of the eclipse. The problem is that
the AbstractSelectionService is in the package org.eclipse.ui.internal which
has changed in the 3.1 version.
Is there any other way to update the active selection provider for my
editor?
|
|
|
Re: ACTIVE SELECTION PROVIDER PROBLEM!!!!!!!! [message #189509 is a reply to message #189478] |
Wed, 27 July 2005 16:00 |
Eclipse User |
|
|
|
Originally posted by: none.unknown.com
Are you not using the MultiPageEditorPart?
How about you write your own selection provider that will listen for changes
to both viewers and knows which the active one is? Then you don't have to
change the SelectionProvider when changing tabs.
"Themis" <dakanalis@ced.tuc.gr> wrote in message
news:dc8a4n$b15$1@news.eclipse.org...
> Hello,
>
> I have developed a GEF based graphical editor and I have the following
> problem:
>
> The editor is consisted of two tabs.Each tab is a GraphicalViewer. Every
> time I switch between the two tabs a listener does the following:
>
> editor.setGraphicalViewer( editor.getGraphicalViewer() );
>
> editor.getSite().setSelectionProvider( editor.getGraphicalViewer() );
>
> The problem is that the active selectionProvider does not change, so when
i
> try to select an editpart in the second viewer the selection is null. I
used
> the following code in order to fix that problem :
>
>
((AbstractSelectionService)editor.getSite().getWorkbenchWind ow().getSelectio
> nService()).partInputChanged(editor);
>
> It works but only with the 3.0 version of the eclipse. The problem is that
> the AbstractSelectionService is in the package org.eclipse.ui.internal
which
> has changed in the 3.1 version.
>
> Is there any other way to update the active selection provider for my
> editor?
>
>
>
|
|
|
Re: ACTIVE SELECTION PROVIDER PROBLEM!!!!!!!! [message #189523 is a reply to message #189478] |
Wed, 27 July 2005 17:02 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
"Themis" <dakanalis@ced.tuc.gr> wrote in message
news:dc8a4n$b15$1@news.eclipse.org...
> Hello,
>
> I have developed a GEF based graphical editor and I have the following
> problem:
>
> The editor is consisted of two tabs.Each tab is a GraphicalViewer. Every
> time I switch between the two tabs a listener does the following:
>
> editor.setGraphicalViewer( editor.getGraphicalViewer() );
>
> editor.getSite().setSelectionProvider( editor.getGraphicalViewer() );
Debug into how this method is implemented. If it doesn't query the new
provider for its selection and notify listeners that it has changed, open A
BUG against platform UI!!!!!!!!!!
>
> The problem is that the active selectionProvider does not change, so when
> i
> try to select an editpart in the second viewer the selection is null. I
> used
> the following code in order to fix that problem :
>
> ((AbstractSelectionService)editor.getSite().getWorkbenchWind ow().getSelectio
> nService()).partInputChanged(editor);
>
> It works but only with the 3.0 version of the eclipse. The problem is that
> the AbstractSelectionService is in the package org.eclipse.ui.internal
> which
> has changed in the 3.1 version.
>
> Is there any other way to update the active selection provider for my
> editor?
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03533 seconds