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.

Christopher Mindus
  • Method Details

    • isPrecondition

      default boolean isPrecondition()
      Returns if the operation is a precondition required to run BEFORE the parent operation runs, or if it should be run AFTERWARDS.
      true to run BEFORE, false to run AFTERWARDS.
    • isSelected

      default 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.

      true by default.
    • createOperationNode

      Creates the operation node for presentation in the link wizard main page.
      parent - The parent node.
      The node.
    • isOperationEnabled

      org.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".
      The status for the operation.
    • isOperationEnabled

      default org.eclipse.core.runtime.IStatus isOperationEnabled(List<ILinkOperation> allOperations)
      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".
      allOperations - A list of all operations, including the preconditions.
      The status for the operation, default is to return isOperationEnabled().
    • getDependentOperations

      default List<ILinkOperation> getDependentOperations()
      Returns the dependent operations that must be performed in order for this operation to be able to complete.
      The collection of dependency operations, default empty list.
    • isWizardDialogRequired

      default boolean isWizardDialogRequired()
      Returns if the link wizard dialog must be shown.
      true in order to present user choices, etc, false otherwise, default false.
    • validateOperations

      default org.eclipse.core.runtime.IStatus validateOperations(List<ILinkOperation> operations)
      Verifies 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.
      operations - All link operations, including preconditions.
      The status of the validation, default OK.
    • addPages

      default void addPages(LinkWizard wizard)
      Called 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.
    • executeOperation

      org.eclipse.core.runtime.IStatus executeOperation(ComplexOperation op) throws org.eclipse.core.runtime.CoreException
      Executes the operation.
      op - The complex operation.
      The status of the operation. A complex operation would have a MultiStatus return code.
      org.eclipse.core.runtime.CoreException - If the execution failed.
    • equalsOp

      boolean equalsOp(ILinkOperation op)
      Checks if two operations are equal.
      op - Operation to compare with.
      true if they produce the same result, false otherwise.