Package org.eclipse.ui.internal
Class AbstractWorkingSet
java.lang.Object
org.eclipse.ui.internal.AbstractWorkingSet
- All Implemented Interfaces:
- Cloneable,- IAdaptable,- IPersistable,- IPersistableElement,- IWorkingSet
- Direct Known Subclasses:
- AggregateWorkingSet,- WorkingSet
public abstract class AbstractWorkingSet
extends Object
implements IAdaptable, IWorkingSet, Cloneable
Abstract baseclass for IWorkingSet implementations.
- Since:
- 3.2
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected List<IAdaptable> protected static final Stringprotected IMemento
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractWorkingSet(String name, String label) Create a new instance of this class
- 
Method SummaryModifier and TypeMethodDescriptionprotected AbstractWorkingSetclone()voidconnect(IWorkingSetManager manager) Connect this working set to a manger.voidDisconnect this working set from its manager, if any.protected voidfireWorkingSetChanged(String property, Object oldValue) <T> TgetAdapter(Class<T> adapter) Returns the receiver if the requested type is either IWorkingSet or IPersistableElement.Returns the elements that are contained in this working set.protected List<IAdaptable> Returns the elements array list.Returns the id of the element factory which should be used to re-create this object.final ImageDescriptorgetImage()Returns the working set icon.getLabel()Return the name of this working set, formated for the end user.protected IWorkingSetManagergetName()Returns the name of the working set.protected voidinternalSetElements(IAdaptable[] newElements) Create a copy of the elements to store in the receiver.booleanisEmpty()Returns whether this working set is currently empty (has no elements).voidSet the name of this working set, formated for the end user.voidSets the name of the working set.Methods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.ui.IPersistablesaveStateMethods inherited from interface org.eclipse.ui.IWorkingSetadaptElements, getId, getImageDescriptor, isAggregateWorkingSet, isEditable, isSelfUpdating, isVisible, setElements, setId
- 
Field Details- 
FACTORY_ID- See Also:
 
- 
elements
- 
workingSetMemento
 
- 
- 
Constructor Details- 
AbstractWorkingSetCreate a new instance of this class- Parameters:
- name- the unique name for this working set
- label- the user-friendly name for this working set
 
 
- 
- 
Method Details- 
getAdapterReturns the receiver if the requested type is either IWorkingSet or IPersistableElement.- Specified by:
- getAdapterin interface- IAdaptable
- Type Parameters:
- T- the class type
- Parameters:
- adapter- the requested type
- Returns:
- the receiver if the requested type is either IWorkingSet or IPersistableElement.
 
- 
getNameDescription copied from interface:IWorkingSetReturns the name of the working set.- Specified by:
- getNamein interface- IWorkingSet
- Returns:
- the name of the working set
 
- 
setNameDescription copied from interface:IWorkingSetSets the name of the working set. The working set name should be unique. The working set name must not have leading or trailing whitespace.- Specified by:
- setNamein interface- IWorkingSet
- Parameters:
- newName- the name of the working set
 
- 
connectConnect this working set to a manger.- Parameters:
- manager- the manager to connect to
 
- 
disconnectpublic void disconnect()Disconnect this working set from its manager, if any.
- 
fireWorkingSetChanged
- 
internalSetElementsCreate a copy of the elements to store in the receiver.- Parameters:
- newElements- the elements to store a copy of in the receiver.
 
- 
getElementsDescription copied from interface:IWorkingSetReturns the elements that are contained in this working set.This method might throw an IllegalStateExceptionif the working set is invalid.- Specified by:
- getElementsin interface- IWorkingSet
- Returns:
- the working set's elements
 
- 
getElementsArrayReturns the elements array list. Lazily restores the elements from persistence memento.- Returns:
- the elements array list
 
- 
getManager
- 
getFactoryIdDescription copied from interface:IPersistableElementReturns the id of the element factory which should be used to re-create this object.Factory ids are declared in extensions to the standard extension point "org.eclipse.ui.elementFactories".- Specified by:
- getFactoryIdin interface- IPersistableElement
- Returns:
- the element factory id
- See Also:
 
- 
getLabelDescription copied from interface:IWorkingSetReturn the name of this working set, formated for the end user. Often this value is the same as the one returned fromIWorkingSet.getName().- Specified by:
- getLabelin interface- IWorkingSet
- Returns:
- the name of this working set, formated for the end user
 
- 
setLabelDescription copied from interface:IWorkingSetSet the name of this working set, formated for the end user.- Specified by:
- setLabelin interface- IWorkingSet
- Parameters:
- label- the label for this working set. If- nullis supplied then the value of- IWorkingSet.getName()will be used.
 
- 
isEmptypublic boolean isEmpty()Description copied from interface:IWorkingSetReturns whether this working set is currently empty (has no elements).- Specified by:
- isEmptyin interface- IWorkingSet
- Returns:
- whether this working set is currently empty
 
- 
getImageDescription copied from interface:IWorkingSetReturns 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 bygetId(). Returnsnullif no icon has been specified in the extension or ifgetId()returnsnull.- Specified by:
- getImagein interface- IWorkingSet
- Returns:
- the working set icon or null.
 
- 
clone
 
-