Skip to main content


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 08:24 Go to next message
ash is currently offline ashFriend
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 19:24 Go to previous messageGo to next message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 423
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 13:14 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
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: Thu Apr 25 06:12:21 GMT 2024

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

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

Back to the top