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 11:15 Go to next message
Arthur Gurov is currently offline Arthur Gurov
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 10:48 Go to previous message
Jan Krakora is currently offline Jan Krakora
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 Jul 24 02:45:46 EDT 2014

Powered by FUDForum. Page generated in 0.02394 seconds