[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform] Re: SelectionProvider is not set in the WindowSelectionService
|
Hi,
a) Check that you implemented the setFocus() method appropriately
b) Wouldn't it be better if the Popup-Menu and its commands use the
selection from use the activeMenuSelection
Tom
Maghen Calinghee schrieb:
> Hi,
>
> I'm designing a RCP application with views and editor parts. In some
> part, i'm using the SelectionService mechanism and i set
> SelectionProvider object on their site
> "getSite().setSelectionProvider(provider)".
> In a other hand, i'm using the "org.eclipse.ui.menus" to display popup
> menu with command. Each command refered to a
> "org.eclipse.core.expressions.definitions" extension point to test if we
> display the command or not. I use the expression "selection" and it
> seems to do not work correctly. At the initialization of the RCP, the
> "selection" is not updated and the item associated to the command is not
> displayed in the popup menu. I need to re-activate the part to make it
> work. I've seen that there are two SelectionService which are declared
> at the beginning : PageSelectionService and WindowSelectionService. The
> WindowSelectionService does not call its setActivePart() method at the
> initialization of the application so the provider is not set for this
> service. So the selection is not updated for the
> "org.eclipse.core.expressions.definitions" extension point. And i think
> it's the reason why it is not working properly but i might be wrong.
>
> If someone knows a way to make it work correctly without reactivating
> the part everytime we have to launch the application, i would appreciate
> it.
>
> Thanks.
>
--
B e s t S o l u t i o n . at
--------------------------------------------------------------------
Tom Schindl JFace-Committer
--------------------------------------------------------------------