Interface IModelProcessorContribution


public interface IModelProcessorContribution
Service component interface to be able to register model processors via OSGi services.

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

Since:
1.13
  • Field Details

    • BEFORE_FRAGMENT_PROPERTY_KEY

      static final String BEFORE_FRAGMENT_PROPERTY_KEY
      Service property key for specifying the beforeFragment attribute, which specifies if the processor has to be invoked before model fragments are added. If not specified it defaults to true.
      See Also:
    • BEFORE_FRAGMENT_PROPERTY_PREFIX

      static final String BEFORE_FRAGMENT_PROPERTY_PREFIX
      Service property key for specifying the beforeFragment attribute, which specifies if the processor has to be invoked before model fragments are added. If not specified it defaults to true.

      This constant can be used to simplify the property definition in the Component annotation:
      @Component(property = { IModelProcessorContribution.BEFORE_FRAGMENT_PROPERTY_PREFIX + "false" })

      See Also:
    • APPLY_PROPERTY_KEY

      static final String APPLY_PROPERTY_KEY
      Service property key for specifying the apply attribute, which defines in which case a processor is run. If not specified it defaults to always.
      See Also:
    • APPLY_PROPERTY_PREFIX

      static final String APPLY_PROPERTY_PREFIX
      Service property key for specifying the apply attribute, which defines in which case a processor is run. If not specified it defaults to always.

      This constant can be used to simplify the property definition in the Component annotation:
      @Component(property = { IModelProcessorContribution.APPLY_PROPERTY_PREFIX + "initial" })

      See Also:
    • APPLY_ALWAYS

      static final String APPLY_ALWAYS
      Value for the apply attribute. If set the processor is executed each time the application is started.
      See Also:
    • APPLY_INITIAL

      static final String APPLY_INITIAL
      Value for the apply attribute. If set the processor is executed only when coming from a none persistent state.
      See Also:
  • Method Details

    • getProcessorClass

      default Class<?> getProcessorClass()
      Returns:
      Java class containing model processor. A class method with the qualifier "org.eclipse.e4.core.di.annotations.Execute", will be invoked as a part of the model processing. If this method returns null it is expected that this IModelProcessorContribution contains a method with the qualifier "org.eclipse.e4.core.di.annotations.Execute".
    • getModelElements

      default List<IModelProcessorContribution.ModelElement> getModelElements()
      Returns:
      model elements to be added to the context used to invoke the processor.