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
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  IModelProcessorContribution.ModelElement
      A model element to be added to the context used to invoke the processor.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String APPLY_ALWAYS
      Value for the apply attribute.
      static java.lang.String APPLY_INITIAL
      Value for the apply attribute.
      static java.lang.String APPLY_PROPERTY_KEY
      Service property key for specifying the apply attribute, which defines in which case a processor is run.
      static java.lang.String APPLY_PROPERTY_PREFIX
      Service property key for specifying the apply attribute, which defines in which case a processor is run.
      static java.lang.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.
      static java.lang.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.
    • Field Detail

      • BEFORE_FRAGMENT_PROPERTY_KEY

        static final java.lang.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:
        Constant Field Values
      • BEFORE_FRAGMENT_PROPERTY_PREFIX

        static final java.lang.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:
        Constant Field Values
      • APPLY_PROPERTY_KEY

        static final java.lang.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:
        Constant Field Values
      • APPLY_PROPERTY_PREFIX

        static final java.lang.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:
        Constant Field Values
      • APPLY_ALWAYS

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

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

      • getProcessorClass

        default java.lang.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".