Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Differnt ways register ISelectionProvider
Differnt ways register ISelectionProvider [message #643091] Sat, 04 December 2010 03:24 Go to next message
ash is currently offline ash
Messages: 142
Registered: July 2010
Senior Member
Hi,


Can any once tell different ways register selection provider.

when class implement the ISelectionProvider in general we register with the view getSite().setSelectionProvider(this);

Is there any way to register selection provider with PlatformUI.

Thanks
Ashok
Re: Differnt ways register ISelectionProvider [message #643117 is a reply to message #643091] Sat, 04 December 2010 14:24 Go to previous messageGo to next message
Wim Jongman is currently offline Wim Jongman
Messages: 418
Registered: July 2009
Senior Member
Hi,

Did you try: PlatformUI.getWorkbench().getService(ISelectionService.class );

--

Best Regards,
Wim Jongman


> Hi,
>
>
> Can any once tell different ways register selection provider.
>
> when class implement the ISelectionProvider in general we register with the
view getSite().setSelectionProvider(this);
>
> Is there any way to register selection provider with PlatformUI.
>
> Thanks
> Ashok
Re: Differnt ways register ISelectionProvider [message #643310 is a reply to message #643091] Mon, 06 December 2010 08:14 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

ashok_kumar_rr@yahoo.com wrote:
> Can any once tell different ways register selection provider.
>
> when class implement the ISelectionProvider in general we register
> with the view getSite().setSelectionProvider(this);

Our selection service will always take the selection service from the
active part (view/editor).

You must use a part to inject state into the system, as if you *did*
manage to change the window's current selection, the first change in
active part or another parts selection would wipe it out.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Platform_Expression_Framework
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Previous Topic:Update Site does not work for core features
Next Topic:set availible software update site while creating the product
Goto Forum:
  


Current Time: Tue Jul 29 02:49:46 EDT 2014

Powered by FUDForum. Page generated in 0.02057 seconds