Class AggregateWorkingSet

java.lang.Object
org.eclipse.ui.internal.AbstractWorkingSet
org.eclipse.ui.internal.AggregateWorkingSet
All Implemented Interfaces:
Cloneable, EventListener, IAdaptable, IPropertyChangeListener, IAggregateWorkingSet, IPersistable, IPersistableElement, IWorkingSet

public class AggregateWorkingSet extends AbstractWorkingSet implements IAggregateWorkingSet, IPropertyChangeListener
Since:
3.2
  • Constructor Details

  • Method Details

    • getId

      public String getId()
      Description copied from interface: IWorkingSet
      Returns the working set id. Returns null if no working set id has been set. This is one of the ids defined by extensions of the org.eclipse.ui.workingSets extension point. It is used by the workbench to determine the page to use in the working set edit wizard. The default resource edit page is used if this value is null.
      Specified by:
      getId in interface IWorkingSet
      Returns:
      the working set id. May be null
    • getImageDescriptor

      public ImageDescriptor getImageDescriptor()
      Description copied from interface: IWorkingSet
      Returns the working set icon. Currently, this is one of the icons specified in the extensions of the org.eclipse.ui.workingSets extension point. The extension is identified using the value returned by getId(). Returns null if no icon has been specified in the extension or if getId() returns null.
      Specified by:
      getImageDescriptor in interface IWorkingSet
      Returns:
      the working set icon or null.
    • setElements

      public void setElements(IAdaptable[] elements)
      A no-op for aggregates - their contents should be derived.
      Specified by:
      setElements in interface IWorkingSet
      Parameters:
      elements - the elements to set in this working set
    • setId

      public void setId(String id)
      Description copied from interface: IWorkingSet
      Sets the working set id. This is one of the ids defined by extensions of the org.eclipse.ui.workingSets extension point. It is used by the workbench to determine the page to use in the working set edit wizard. The default resource edit page is used if this value is null.
      Specified by:
      setId in interface IWorkingSet
      Parameters:
      id - the working set id. May be null
    • isEditable

      public boolean isEditable()
      Aggregates are not editable.
      Specified by:
      isEditable in interface IWorkingSet
      Returns:
      true if the working set can be edited; otherwise false
    • isVisible

      public boolean isVisible()
      Aggregates should not generally be visible in the UI.
      Specified by:
      isVisible in interface IWorkingSet
      Returns:
      true if the working set should be shown in the user interface; otherwise false
    • saveState

      public void saveState(IMemento memento)
      Description copied from interface: IPersistable
      Saves the state of the object in the given memento.
      Specified by:
      saveState in interface IPersistable
      Parameters:
      memento - the storage area for object's state
    • connect

      public void connect(IWorkingSetManager manager)
      Description copied from class: AbstractWorkingSet
      Connect this working set to a manger.
      Overrides:
      connect in class AbstractWorkingSet
      Parameters:
      manager - the manager to connect to
    • disconnect

      public void disconnect()
      Description copied from class: AbstractWorkingSet
      Disconnect this working set from its manager, if any.
      Overrides:
      disconnect in class AbstractWorkingSet
    • getComponents

      public IWorkingSet[] getComponents()
      Return the component working sets.
      Specified by:
      getComponents in interface IAggregateWorkingSet
      Returns:
      the component working sets
    • propertyChange

      public void propertyChange(PropertyChangeEvent event)
      Description copied from interface: IPropertyChangeListener
      Notification that a property has changed.

      This method gets called when the observed object fires a property change event.

      Specified by:
      propertyChange in interface IPropertyChangeListener
      Parameters:
      event - the property change event object describing which property changed and how
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • isSelfUpdating

      public boolean isSelfUpdating()
      Description copied from interface: IWorkingSet
      Returns true if this working set is capable of updating itself and reacting to changes in the state of its members. For non-aggregate working sets this means that the working set has an IWorkingSetUpdater installed while for aggregates it means that all component sets have IWorkingSetUpdaters installed. Otherwise returns false.
      Specified by:
      isSelfUpdating in interface IWorkingSet
      Returns:
      whether the set is self-updating or not
    • isAggregateWorkingSet

      public boolean isAggregateWorkingSet()
      Description copied from interface: IWorkingSet
      Returns whether this working set is an aggregate working set or not.

      It is recommended that clients of aggregate working sets treat them in a specific way. Please see the documentation for IWorkbenchPage.getAggregateWorkingSet() for details.

      If this is true, you can cast this working set to an IAggregateWorkingSet

      Specified by:
      isAggregateWorkingSet in interface IWorkingSet
      Returns:
      whether this working set is an aggregate working set or not
    • adaptElements

      public IAdaptable[] adaptElements(IAdaptable[] objects)
      Description copied from interface: IWorkingSet
      Transforms the supplied elements into elements that are suitable for containment in this working set. This is useful for UI elements which wish to filter contributions to working sets based on applicability. This is a hint, however, and is not considered when the IWorkingSet.setElements(IAdaptable[]) method is invoked.
      Specified by:
      adaptElements in interface IWorkingSet
      Parameters:
      objects - the objects to transform
      Returns:
      an array of transformed elements that be empty if no elements from the original array are suitable
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object