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 String
APPLY_ALWAYS
Value for theapply
attribute.static String
APPLY_INITIAL
Value for theapply
attribute.static String
APPLY_PROPERTY_KEY
Service property key for specifying the apply attribute, which defines in which case a processor is run.static String
APPLY_PROPERTY_PREFIX
Service property key for specifying the apply attribute, which defines in which case a processor is run.static 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 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.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default List<IModelProcessorContribution.ModelElement>
getModelElements()
default Class<?>
getProcessorClass()
-
-
-
Field Detail
-
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 totrue
.- See Also:
- Constant Field Values
-
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 totrue
.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 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 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 String APPLY_ALWAYS
Value for theapply
attribute. If set the processor is executed each time the application is started.- See Also:
- Constant Field Values
-
APPLY_INITIAL
static final String APPLY_INITIAL
Value for theapply
attribute. If set the processor is executed only when coming from a none persistent state.- See Also:
- Constant Field Values
-
-
Method Detail
-
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 returnsnull
it is expected that thisIModelProcessorContribution
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.
-
-