|Retrieving of selection [message #759431]
||Mon, 28 November 2011 11:15
| Arthur Gurov
Registered: November 2011
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.
Powered by FUDForum
. Page generated in 0.01654 seconds