Package com.sodius.mdw.core.operations
Class ExtensionOperation<F extends OperationFactory>
- java.lang.Object
-
- com.sodius.mdw.internal.core.operations.InternalOperation
-
- com.sodius.mdw.core.operations.Operation
-
- com.sodius.mdw.core.operations.ExtensionOperation<F>
-
- Type Parameters:
F
- the factory class that contributions must extend.
public abstract class ExtensionOperation<F extends OperationFactory> extends Operation
Executes plug-in contributions of a declared extension point, to enhance the behavior of an operation.A transformation can declare a few extension points that allow customizing the original behavior of the transformation, without having to modify the source code of the transformation. A plug-in can contribute an extension, referring the declared extension point, with an associated operation to execute.
Note that extensions are executed only when running in an Eclipse platform. Extensions are ignored if running in a standalone Java application.
See the Help Contents fore more information on how to extend operations: MDWorkbench Documentation > Tasks > Developing Operations > Extending Operations > Declaring an Operation Extension Point
- Since:
- 3.6.0
-
-
Constructor Summary
Constructors Constructor Description ExtensionOperation(String extensionPoint, OperationContext context)
Creates a new instance ofExtensionOperation
for the specified extension point.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
configure(F factory)
Configures the factory instance created by an extension.protected void
run(org.eclipse.core.runtime.IProgressMonitor monitor)
Executes extensions of the extension point specified in the constructor.-
Methods inherited from class com.sodius.mdw.core.operations.Operation
getName, getStatus, isCanceledOrFailed, run, run
-
-
-
-
Constructor Detail
-
ExtensionOperation
public ExtensionOperation(String extensionPoint, OperationContext context)
Creates a new instance ofExtensionOperation
for the specified extension point.- Parameters:
extensionPoint
- the id of the extension point this operation must execute contributions.context
- the operation context.
-
-
Method Detail
-
run
protected final void run(org.eclipse.core.runtime.IProgressMonitor monitor)
Executes extensions of the extension point specified in the constructor.- Specified by:
run
in classOperation
- Parameters:
monitor
- the progress monitor used to report progress and to check for cancellation.- See Also:
OperationRunner.run(Operation, IProgressMonitor)
,Operation.run(Operation, IProgressMonitor)
,Operation.isCanceledOrFailed(IProgressMonitor)
-
configure
protected abstract void configure(F factory)
Configures the factory instance created by an extension. Subclass is in charge to set all necessary fields on the specified factory to provide context information to the extension.- Parameters:
factory
- the factory instance created by an extension.
-
-