Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Retrieving of selection
Retrieving of selection [message #759431] Mon, 28 November 2011 16:15 Go to next message
Arthur Gurov is currently offline Arthur GurovFriend
Messages: 7
Registered: November 2011
Location: Ukraine
Junior Member
Hi guys,

I have a small question about selection providing. Currently I've faced with following problem:

I have an editor with information about some entity within (let's assume that this is some products for mobile phone number). And I have view which should display short information for this phone number (let's assume that this info is phone number, status and owner). So, as I understand, editor is a provider of selection for view and view is a listener of selection from editor.
I've implemented simple ISelectionListener in my view, which was registered to view site ("getSite().getWorkbenchWindow().getSelectionService().addPostSelectionListener(listener);") and it seems that view recognize selection when I select editor. But what's the problem? When I've tried to use HandlerUtil in menu handler I've got null instead of my selected entity. It seems that I do something in wrong way, but I can't understand. I tried to provide selection from view - in this case HandlerUtil returns what i need. But From my point of view my view part is only listener, but not provider of selection... Or view anyway should provide selection even if it's not a provider by logic.

Any advices will be helpful.
Re: Retrieving of selection [message #765742 is a reply to message #759431] Wed, 14 December 2011 15:48 Go to previous message
Jan Krakora is currently offline Jan KrakoraFriend
Messages: 477
Registered: December 2009
Location: Prague
Senior Member
Hi,

do you mean HandlerUtil.getActiveSelection()? It returns the selection provided by the active part AFAIK. So check what part is active when you select the menu item.
Previous Topic:Popup Menu in Tabfolder
Next Topic:Can´t export feature based product to multiple platforms
Goto Forum:
  


Current Time: Thu Apr 25 00:52:36 GMT 2024

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

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

Back to the top