Interface OpenComparisonDialogOperation


public interface OpenComparisonDialogOperation
Configurable operation providing means to compare two textual sources.

Example usage from within a Script:

 import de.espirit.firstspirit.agency.OperationAgent;
 import de.espirit.firstspirit.ui.operations.OpenComparisonDialogOperation;

 operationAgent = context.requireSpecialist(OperationAgent.TYPE);
 operation = operationAgent.getOperation(OpenComparisonDialogOperation.TYPE);
 operation.setDialogTitle("Title");
 operation.setOriginalHeader("Original");
 operation.setModifiedHeader("Modified");
 originalText = "Deleted My Original Text";
 modifiedText = "My Modified Text Inserted";
 operation.perform(originalText, modifiedText);

 return 0;
 

The example will show a two column window having the original text on the left hand side and the modified text on the right hand side.

Since:
5.2.303
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    Configurable operation providing means to compare and optionally merge two textual sources.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    perform(@NotNull String originalText, @NotNull String modifiedText)
    Opens a differential view on the original and modified texts.
    void
    setDialogTitle(@NotNull String title)
    Sets the title of the dialog.
    void
    setModifiedHeader(@NotNull String header)
    Sets the header for the modified text section.
    void
    setOriginalHeader(@NotNull String header)
    Sets the header for the original text section.
  • Field Details

  • Method Details

    • setDialogTitle

      void setDialogTitle(@NotNull @NotNull String title)
      Sets the title of the dialog.
      Parameters:
      title - The dialog title.
      Since:
      5.2.303
    • setOriginalHeader

      void setOriginalHeader(@NotNull @NotNull String header)
      Sets the header for the original text section.
      Parameters:
      header - The original text's header.
      Since:
      5.2.303
    • setModifiedHeader

      void setModifiedHeader(@NotNull @NotNull String header)
      Sets the header for the modified text section.
      Parameters:
      header - The modified text's header.
      Since:
      5.2.303
    • perform

      void perform(@NotNull @NotNull String originalText, @NotNull @NotNull String modifiedText)
      Opens a differential view on the original and modified texts.
      Parameters:
      originalText - The original text.
      modifiedText - The modified text.
      Since:
      5.2.303