Interface ILinkOperation

    • Method Detail

      • 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.
        Returns:
        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.

        Returns:
        true by default.
      • 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".
        Returns:
        The status for the operation.
      • isOperationEnabled

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

        default java.util.List<ILinkOperation> getDependentOperations()
        Returns 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.
      • isWizardDialogRequired

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

        default org.eclipse.core.runtime.IStatus validateOperations​(java.util.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.
        Parameters:
        operations - All link operations, including preconditions.
        Returns:
        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.
        Parameters:
        op - The complex operation.
        Returns:
        The status of the operation. A complex operation would have a MultiStatus return code.
        Throws:
        org.eclipse.core.runtime.CoreException - If the execution failed.
      • equalsOp

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