Package com.iizigo.link
Interface ILinkOperation
- All Known Implementing Classes:
- AddAnnotationPrecondition,- ButtonBuilderSubOp,- ComboBoxBuilderSubOp,- LayoutNewComponentsOperation,- LopAssignVirtualSpace,- LopVSAction,- LopVSComponent,- LopVSField,- MenuItemBuilderSubOp,- TextAreaBuilderSubOp,- TextBuilderSubOp,- UIBuilderOperation,- UIBuilderSubOperation,- VSActionBuilderSubOp,- VSFieldBuilderSubOp
public interface ILinkOperation
The link operation contains the information required to identify the link operation to perform, potentially present what should be done to the user for his/her selection. The operation must also be able to verify if it is incompatible with other operations in the global operation. Perhaps one operation may require others to be performed in order to be successful (e.g. create a VS Field reference for a panel component may required the panel to become VirtualSpace participant first).
The "equals(Object)" method MUST be implemented in the link operation class. This equal method must return equality if two operations would produce the SAME result if executed.
- Author:
- Christopher Mindus
- Method SummaryModifier and TypeMethodDescription- default void- addPages- (LinkWizard wizard) Called when the wizard is created and allows the creation of additional wizard pages required.Creates the operation node for presentation in the link wizard main page.- booleanChecks if two operations are equal.- org.eclipse.core.runtime.IStatusExecutes the operation.- default List<ILinkOperation>Returns the dependent operations that must be performed in order for this operation to be able to complete.- org.eclipse.core.runtime.IStatusReturns if the operation is enabled for execution, regardless of any preconditions.- default org.eclipse.core.runtime.IStatus- isOperationEnabled- (List<ILinkOperation> allOperations) Returns if the operation is enabled for execution, regardless of any preconditions.- default booleanReturns if the operation is a precondition required to run BEFORE the parent operation runs, or if it should be run AFTERWARDS.- default booleanReturns if this operation is selected or not.- default booleanReturns if the link wizard dialog must be shown.- default org.eclipse.core.runtime.IStatus- validateOperations- (List<ILinkOperation> operations) Verifies all the operations for each operation using this call.
- Method Details- isPreconditiondefault boolean isPrecondition()Returns if the operation is a precondition required to run BEFORE the parent operation runs, or if it should be run AFTERWARDS.- Returns:
- true to run BEFORE, false to run AFTERWARDS.
 
- isSelecteddefault boolean isSelected()Returns if this operation is selected or not.- This method is used e.g. in the build operations where a page shouldn't be displayed if the build wizard is not selected. - Returns:
- true by default.
 
- isOperationEnabledorg.eclipse.core.runtime.IStatus isOperationEnabled()Returns if the operation is enabled for execution, regardless of any preconditions. These are tested once all parties have agreed that the operation might be a "go".- Returns:
- The status for the operation.
 
- isOperationEnabledReturns if the operation is enabled for execution, regardless of any preconditions. These are tested once all parties have agreed that the operation might be a "go".- Parameters:
- allOperations- A list of all operations, including the preconditions.
- Returns:
- The status for the operation, default is to return isOperationEnabled()
 
- getDependentOperationsReturns the dependent operations that must be performed in order for this operation to be able to complete.- Returns:
- The collection of dependency operations, default empty list.
 
- isWizardDialogRequireddefault boolean isWizardDialogRequired()Returns if the link wizard dialog must be shown.- Returns:
- true in order to present user choices, etc, false otherwise, default false.
 
- validateOperationsVerifies all the operations for each operation using this call. This makes it possible for link operations that are not compatible or e.g. defined multiple times with different targets (or same target for multiple sources) and this is not allowed.- Parameters:
- operations- All link operations, including preconditions.
- Returns:
- The status of the validation, default OK.
 
- addPagesCalled when the wizard is created and allows the creation of additional wizard pages required. All created pages MUST implement done to get the link wizard information.
- executeOperationorg.eclipse.core.runtime.IStatus executeOperation- (ComplexOperation op) throws org.eclipse.core.runtime.CoreException Executes the operation.- Parameters:
- op- The complex operation.
- Returns:
- The status of the operation. A complex operation would have a MultiStatusreturn code.
- Throws:
- org.eclipse.core.runtime.CoreException- If the execution failed.
 
- equalsOpChecks if two operations are equal.- Parameters:
- op- Operation to compare with.
- Returns:
- true if they produce the same result, false otherwise.