Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » CurrentSelectionSourceProvider patch
CurrentSelectionSourceProvider patch [message #114179] Mon, 01 December 2008 12:38 Go to next message
Igor Pavlenko is currently offline Igor PavlenkoFriend
Messages: 24
Registered: July 2009
Junior Member
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.
Re: CurrentSelectionSourceProvider patch [message #114258 is a reply to message #114179] Tue, 02 December 2008 20:41 Go to previous message
Eclipse UserFriend
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.
>
Previous Topic:qooxdoo 0.7.4 about to be released
Next Topic:Reading contents of Text widgets using Selenium?
Goto Forum:
  


Current Time: Fri Apr 19 03:37:18 GMT 2024

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

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

Back to the top