This service presents API appropriate for working with the UI Model. If contains methods to search for model elements via a variety of search parameters a well as operations that can be used to manipulate the model to achieve changes in the UI.

This service presents API appropriate for working with the UI Model. If contains methods to search for model elements via a variety of search parameters a well as operations that can be used to manipulate the model to achieve changes in the UI.

+

+

:Since we decided to remove '''MPartDescriptor''' we should tag '''getPartDescriptor(String)''' as '''@noreference''' or remove it to avoid leaking non-API types. [[User:Michael_rennie@ca.ibm.com|Michael_Rennie@ca.ibm.com]]

=== EPartService ===

=== EPartService ===

−

This service provides API that deals with the runtime aspects of managin the current workbench UI such as opening new parts or getting / setting the 'active' part...

+

This service provides API that deals with the runtime aspects of managin the current workbench UI such as opening new parts or getting / setting the 'active' part...

+

+

:Can currently NOT used to open new parts as you cannot define the container, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=390971 [[User:Lars Vogel|Lars.Vogel@gmail.com]]

=== EBindingService ===

=== EBindingService ===

−

This service allows manipulation of the key binding structures.<br>

+

This service allows manipulation of the key binding structures.

−

<u><span style="font-style: italic;"><span style="font-weight: bold;">Some (many?) of the methods in this class appear to be more useful for the implementation rather than user API.</span></span></u>

+

:This services is used by the model to push key bindings into the runtime. It needs polish and I don't think it should be API for Kepler. [[User:Pwebster.ca.ibm.com|Pwebster.ca.ibm.com]]

=== EContextService ===

=== EContextService ===

Line 23:

Line 27:

Provides API to control the active 'chain' within a context structure.<br>

Provides API to control the active 'chain' within a context structure.<br>

−

<u>'''''Is this too low level to be useful for clients ?'''''</u>

+

:The EContextService is important to programmatic clients, for activating contexts in their '''@PostConstruct''' or managing context activations based on the state of their controls (which widgets have focus, etc). [[User:Pwebster.ca.ibm.com|Pwebster.ca.ibm.com]]

−

<u>''</u>

+

:Except for '''deferUpdates(*)''', that should be marked as '''@noreference''' [[User:Pwebster.ca.ibm.com|Pwebster.ca.ibm.com]]

:We can mark '''defineCategory(*)''' and '''defineCommand(*)''' as '''@noreference''' since those would be defined in the model. [[User:Pwebster.ca.ibm.com|Pwebster.ca.ibm.com]]

=== EHandlerService ===

=== EHandlerService ===

Line 39:

Line 43:

This provides API to manage Handlers.<br>

This provides API to manage Handlers.<br>

−

<u>'''''Why do the Execute methods take in Parameterized Commands (perhaps Execute should be in the CommandService and take a Handler?)'''''</u>

+

:The ParameterizedCommand contains the information of what to execute (i.e. it comes from the MenuItem or ToolItem or KeyBinding). The EHandlerService must then look up the handler to execute and actually execute it. The ECommandService is for managing commands, but it knows nothing of handlers. [[User:Pwebster.ca.ibm.com|Pwebster.ca.ibm.com]]

−

<u>'''''What's 'getContext' for ?'''''</u>

+

:'''getContext()''' is used in the ContributedAction, but it is cast to the implementation. It could probably be removed. [[User:Pwebster.ca.ibm.com|Pwebster.ca.ibm.com]]

=== EMenuService ===

=== EMenuService ===

−

Provides a single API to register context menus.<br>

+

Provides a single API to register context menus.<br>

+

+

:This method is used to instantiate an MPopupMenu and hook it up to the parent Control that's passed in. Contribution classes (MParts) need access to this. This should wait until after Kepler, as it probably could be replaced with some work and having the MPart call '''presentationEngine.createGui(mPopupMenu, control, mPart.getContext())''' [[User:Pwebster.ca.ibm.com|Pwebster.ca.ibm.com]]

+

+

=== ESelectionService ===

+

+

This allows for registration of listeners regarding the current selection. Note that this has more functionality in it than the @Inject approach since it provides 'post selection' (i.e. deferred) listeners as well as regular listeners.<br>

−

<u><span style="font-style: italic;"><span style="font-weight: bold;">In the UI Model a MPart can have any number of menus, each with a unique id. Do we need this or should we have a 'showMenu(id)' method ?</span></span></u><u><span style="font-style: italic;"><span style="font-weight: bold;" /></span></u>

+

=== IEventBroker ===

−

=== ESelectionService ===

+

Allows access to the OSGI event broker and can be used to register / unregister listeners on the UIModel.

−

asd

+

:Note that this API is incomplete, as it doesn't allow you to unregister an EventHandler from a specific topic https://bugs.eclipse.org/bugs/show_bug.cgi?id=331645 [[User:Pwebster.ca.ibm.com|Pwebster.ca.ibm.com]]

Services and Context Values

This section will describe which elements are guaranteed to be available for injection through the IEclipseContext. The most common of these will be the 'standard' services but will also reference some other 'value' elements (i.e. the injected value is *not* an interface itself but some discreet value such as a preference or model event).

Basic Services

EModelService

This service presents API appropriate for working with the UI Model. If contains methods to search for model elements via a variety of search parameters a well as operations that can be used to manipulate the model to achieve changes in the UI.

Since we decided to remove MPartDescriptor we should tag getPartDescriptor(String) as @noreference or remove it to avoid leaking non-API types. Michael_Rennie@ca.ibm.com

EPartService

This service provides API that deals with the runtime aspects of managin the current workbench UI such as opening new parts or getting / setting the 'active' part...

EBindingService

This services is used by the model to push key bindings into the runtime. It needs polish and I don't think it should be API for Kepler. Pwebster.ca.ibm.com

EContextService

Provides API to control the active 'chain' within a context structure.

The EContextService is important to programmatic clients, for activating contexts in their @PostConstruct or managing context activations based on the state of their controls (which widgets have focus, etc). Pwebster.ca.ibm.com

We can mark defineCategory(*) and defineCommand(*) as @noreference since those would be defined in the model. Pwebster.ca.ibm.com

EHandlerService

This provides API to manage Handlers.

The ParameterizedCommand contains the information of what to execute (i.e. it comes from the MenuItem or ToolItem or KeyBinding). The EHandlerService must then look up the handler to execute and actually execute it. The ECommandService is for managing commands, but it knows nothing of handlers. Pwebster.ca.ibm.com

getContext() is used in the ContributedAction, but it is cast to the implementation. It could probably be removed. Pwebster.ca.ibm.com

EMenuService

Provides a single API to register context menus.

This method is used to instantiate an MPopupMenu and hook it up to the parent Control that's passed in. Contribution classes (MParts) need access to this. This should wait until after Kepler, as it probably could be replaced with some work and having the MPart call presentationEngine.createGui(mPopupMenu, control, mPart.getContext())Pwebster.ca.ibm.com

ESelectionService

This allows for registration of listeners regarding the current selection. Note that this has more functionality in it than the @Inject approach since it provides 'post selection' (i.e. deferred) listeners as well as regular listeners.

IEventBroker

Allows access to the OSGI event broker and can be used to register / unregister listeners on the UIModel.