Class RelativePathSelectionDialog

java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.csstudio.opibuilder.visualparts.RelativePathSelectionDialog
All Implemented Interfaces:
IShellProvider, Listener

public final class RelativePathSelectionDialog extends Dialog implements Listener
This class represents a Dialog to choose a file in the workspace. There is an option to return relative path.
  • Constructor Details

    • RelativePathSelectionDialog

      public RelativePathSelectionDialog(Shell parentShell, IPath refPath, String dialogMessage, String[] fileExtensions)
      Creates an input dialog with OK and Cancel buttons. Note that the dialog will have no visual representation (no widgets) until it is told to open.

      Note that the open method blocks for input dialogs.

      Parameters:
      parentShell - the parent shell, or null to create a top-level shell
      refPath - the reference path which doesn't include the file name.
      dialogMessage - the dialog message, or null if none
      fileExtensions - the file extensions of files to show in the dialog. Use an empty array or null to show only containers (folders).
  • Method Details

    • setSelectedResource

      public void setSelectedResource(String path)
      Sets the initially selected resource. Must be called before the dialog is displayed.
      Parameters:
      path - the path to the initially selected resource.
    • configureShell

      protected void configureShell(Shell shell)
      Overrides:
      configureShell in class Window
    • createDialogArea

      protected Control createDialogArea(Composite parent)
      Overrides:
      createDialogArea in class Dialog
    • okPressed

      protected void okPressed()
      Overrides:
      okPressed in class Dialog
    • getSelectedResource

      public String getSelectedResource()
      Returns the path to the selected resource.
      Returns:
      the path to the selected resource, or null if no resource was selected.
    • handleEvent

      public void handleEvent(Event event)
      Specified by:
      handleEvent in interface Listener