Class CompareWithOtherResourceDialog

All Implemented Interfaces:
IShellProvider

public class CompareWithOtherResourceDialog extends TitleAreaDialog
This is a dialog that can invoke the compare editor on chosen files.
  • Constructor Details

    • CompareWithOtherResourceDialog

      protected CompareWithOtherResourceDialog(Shell shell, ISelection selection)
      Creates the dialog.
      Parameters:
      shell - a shell
      selection - if the selection is not null, it will be set as initial files for comparison
      Since:
      3.4
  • Method Details

    • createDialogArea

      protected Control createDialogArea(Composite parent)
      Description copied from class: TitleAreaDialog
      Creates and returns the contents of the upper part of this dialog (above the button bar).

      The Dialog implementation of this framework method creates and returns a new Composite with no margins and spacing. Subclasses should override.

      Overrides:
      createDialogArea in class TitleAreaDialog
      Parameters:
      parent - The parent composite to contain the dialog area
      Returns:
      the dialog area control
    • createButtonsForButtonBar

      protected void createButtonsForButtonBar(Composite parent)
      Description copied from class: Dialog
      Adds buttons to this dialog's button bar.

      The Dialog implementation of this framework method adds standard ok and cancel buttons using the createButton framework method. These standard buttons will be accessible from getCancelButton, and getOKButton. Subclasses may override.

      Note: The common button order is: {other buttons}, OK, Cancel. On some platforms, Dialog.initializeBounds() will move the default button to the right.

      Overrides:
      createButtonsForButtonBar in class Dialog
      Parameters:
      parent - the button bar composite
    • getResult

      public IResource[] getResult()
      Returns table with selected resources. If any resource wasn't chosen in the ancestor panel, table has only two elements -- resources chosen in left and right panel. In the other case table contains all three resources.
      Returns:
      table with selected resources
    • getDialogBoundsSettings

      protected IDialogSettings getDialogBoundsSettings()
      Description copied from class: Dialog
      Gets the dialog settings that should be used for remembering the bounds of of the dialog, according to the dialog bounds strategy.
      Overrides:
      getDialogBoundsSettings in class Dialog
      Returns:
      settings the dialog settings used to store the dialog's location and/or size, or null if the dialog's bounds should never be stored.
      See Also: