Class ResourceSelectionGroup

All Implemented Interfaces:
Drawable

public final class ResourceSelectionGroup extends Composite
Workbench-level composite for choosing a filtered resource.
  • Constructor Details

    • ResourceSelectionGroup

      public ResourceSelectionGroup(Composite parent, Listener listener, String[] filters, boolean showNewContainerActions)
      Creates a new instance of the widget.
      Parameters:
      parent - The parent widget of the group.
      listener - A listener to forward events to. Can be null if no listener is required.
      filters -
      showNewContainerActions - Whether to show the New Folder and New Project actions.
    • ResourceSelectionGroup

      public ResourceSelectionGroup(Composite parent, Listener listener, String[] filters, String message, boolean showNewContainerActions)
      Creates a new instance of the widget.
      Parameters:
      parent - The parent widget of the group.
      listener - A listener to forward events to. Can be null if no listener is required.
      filters -
      message - The text to present to the user.
      showNewContainerActions - Whether to show the New Folder and New Project actions.
    • ResourceSelectionGroup

      public ResourceSelectionGroup(Composite parent, Listener listener, String[] filters, String message, boolean showClosedProjects, boolean showNewContainerActions)
      Creates a new instance of the widget.
      Parameters:
      parent - The parent widget of the group.
      listener - A listener to forward events to. Can be null if no listener is required.
      filters -
      message - The text to present to the user.
      showClosedProjects - Whether or not to show closed projects.
      showNewContainerActions - Whether to show the New Folder and New Project actions.
    • ResourceSelectionGroup

      public ResourceSelectionGroup(Composite parent, Listener listener, String[] filters, String message, boolean showClosedProjects, boolean showNewContainerActions, int heightHint, int widthHint)
      Creates a new instance of the widget.
      Parameters:
      parent - The parent widget of the group.
      listener - A listener to forward events to. Can be null if no listener is required.
      filters -
      message - The text to present to the user.
      showClosedProjects - Whether or not to show closed projects.
      showNewContainerActions - Whether to show the New Folder and New Project actions.
      heightHint - height hint for the drill down composite
      widthHint - width hint for the drill down composite
  • Method Details

    • containerSelectionChanged

      public void containerSelectionChanged(IResource resource)
      The container selection has changed in the tree view. Update the container name field value and notify all listeners.
      Parameters:
      resource - The container that changed
    • createContents

      public void createContents(String message, String[] filters, int heightHint, int widthHint)
      Creates the contents of the composite.
      Parameters:
      message - The text to present to the user.
      filters -
      heightHint - The height of the tree widget.
      widthHint - The width of the tree widget.
    • createTreeViewer

      protected void createTreeViewer(String[] filters, int heightHint)
      Returns a new drill down viewer for this dialog.
      Parameters:
      filters -
      heightHint - height hint for the drill down composite
    • getFullPath

      public IPath getFullPath()
      Returns the currently entered container name. Null if the field is empty. Note that the container may not exist yet if the user entered a new container name in the field.
      Returns:
      IPath
    • setInitialFocus

      public void setInitialFocus()
      Gives focus to one of the widgets in the group, as determined by the group.
    • setSelectedResource

      public void setSelectedResource(IResource resource)
    • setSelectedResource

      public void setSelectedResource(IPath path)
    • refreshTreeWithFilter

      public void refreshTreeWithFilter(String[] filters)