|
Re: CurrentSelectionSourceProvider patch [message #114258 is a reply to message #114179] |
Tue, 02 December 2008 20:41 |
Eclipse User |
|
|
|
Originally posted by: rherrmann.innoopract.com
Hi Igor,
I don't quite understand to which problem you refer to. Could you
provide a bit more information on what exactly doesn't work?
I saw that parts of AbstractSelectionService code are disabled. May
this be related?
Thanks
Rüdiger
Igor Pavlenko wrote:
> Hello
>
> I found an interesting problem and the solution of this problem. May be
> it will be interesting for developers.
>
> I worked with activities and saw that the CurrentSelectionSourceProvider
> is not a registered listener for AbstractSelectionService. I only added
> few lines of code to my implementation of WorkbenchAdvisor in the
> postStartup method:
>
> ISourceProviderService sps =
> (ISourceProviderService)getWorkbenchConfigurer().getWorkbenc h().getService(ISourceProviderService.class);
>
> ISourceProvider sp =
> sps.getSourceProvider(ISources.ACTIVE_CURRENT_SELECTION_NAME );
> if (sp instanceof CurrentSelectionSourceProvider)
> {
> IWorkbenchWindow window =
> getWorkbenchConfigurer().getWorkbench().getActiveWorkbenchWi ndow();
>
> window.getSelectionService().addSelectionListener((CurrentSe lectionSourceProvider)sp);
>
> }
>
> I think it is not a bug and I know that I did not provide a right
> solution for the problem. But it is a good workaround.
>
> If somebody know the best solution please tell me about it.
>
|
|
|
Powered by
FUDForum. Page generated in 0.02824 seconds