Model extensions

Identifier:
org.eclipse.e4.ui.workbench.model

Since:
4.2

Description:
This is not an API. The schema for this extension point is not frozen and might change in a non-backward compatible way in the future.

This extension point provides extensibility for the UI model of the running application. Modifications can be done in a declarative manner by using XML model fragments, or programmatically by supplying model processors.

Whenever possible, the model extensions of dependent bundles are processed before the extensions of bundles that depend on them.

Configuration Markup:

<!ELEMENT extension (fragment* , processor*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #REQUIRED

name  CDATA #IMPLIED>


<!ELEMENT fragment EMPTY>

<!ATTLIST fragment

uri   CDATA #REQUIRED

apply (always|initial|notexists) "always">

The model fragment to be added to the UI model of the running application. The root element of the model fragment is expected to conform to the org.eclipse.e4.ui.model.fragment.MModelFragments interface.



<!ELEMENT processor (element*)>

<!ATTLIST processor

class          CDATA #REQUIRED

beforefragment (true | false)

apply          (always|initial) "always">

Programmatic processor that gets called with the intention of modifying UI model.



<!ELEMENT element EMPTY>

<!ATTLIST element

id         CDATA #REQUIRED

contextKey CDATA #IMPLIED>

A model element to be added to the context used to invoke the processor.



Examples:
The following is an example for the preference extension point:


   <extension
         id="themeContribution"
         point="org.eclipse.e4.workbench.model">
      <processor
            beforefragment="true"
            class="org.eclipse.e4.demo.simpleide.internal.ThemeMenuProcessor">
         <element
               id="simpleide.mainmenu">
         </element>
      </processor>
   </extension>
   <extension
         id="logContribution"
         point="org.eclipse.e4.workbench.model">
      <snippet
            uri="platform:/plugin/org.eclipse.e4.demo.log/xmi/components.e4xmi">
      </snippet>
   </extension>


Copyright (c) 2010, 2014 IBM Corporation and others.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html/ SPDX-License-Identifier: EPL-2.0