Package org.eclipse.ui.actions
Class CompoundContributionItem
- java.lang.Object
-
- org.eclipse.jface.action.ContributionItem
-
- org.eclipse.ui.actions.CompoundContributionItem
-
- All Implemented Interfaces:
IContributionItem
- Direct Known Subclasses:
BaseNewWizardMenu,BreakpointTypesContribution
public abstract class CompoundContributionItem extends ContributionItem
A compound contribution is a contribution item consisting of a dynamic list of contribution items.- Since:
- 3.1
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCompoundContributionItem()Creates a compound contribution item with anullid.protectedCompoundContributionItem(String id)Creates a compound contribution item with the given (optional) id.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddispose()The default implementation of thisIContributionItemmethod does nothing.voidfill(Menu menu, int index)The default implementation of thisIContributionItemmethod does nothing.protected abstract IContributionItem[]getContributionItems()Return a list of contributions items that will replace this item in the parent manager.booleanisDirty()The default implementation of thisIContributionItemmethod returnsfalse.booleanisDynamic()The default implementation of thisIContributionItemmethod returnsfalse.voidsetParent(IContributionManager parent)Sets the parent manager of this item-
Methods inherited from class org.eclipse.jface.action.ContributionItem
fill, fill, fill, getId, getParent, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setVisible, toString, update, update
-
-
-
-
Constructor Detail
-
CompoundContributionItem
protected CompoundContributionItem()
Creates a compound contribution item with anullid.
-
CompoundContributionItem
protected CompoundContributionItem(String id)
Creates a compound contribution item with the given (optional) id.- Parameters:
id- the contribution item identifier, ornull
-
-
Method Detail
-
fill
public void fill(Menu menu, int index)
Description copied from class:ContributionItemThe default implementation of thisIContributionItemmethod does nothing. Subclasses may override.- Specified by:
fillin interfaceIContributionItem- Overrides:
fillin classContributionItem- Parameters:
menu- the parent menuindex- the index where the controls are inserted, or-1to insert at the end
-
getContributionItems
protected abstract IContributionItem[] getContributionItems()
Return a list of contributions items that will replace this item in the parent manager. The list must contain new contribution items every call since the old ones will be disposed.- Returns:
- an array list of items to display. Must not be
null.
-
isDirty
public boolean isDirty()
Description copied from class:ContributionItemThe default implementation of thisIContributionItemmethod returnsfalse. Subclasses may override.- Specified by:
isDirtyin interfaceIContributionItem- Overrides:
isDirtyin classContributionItem- Returns:
trueif this item is dirty
-
isDynamic
public boolean isDynamic()
Description copied from class:ContributionItemThe default implementation of thisIContributionItemmethod returnsfalse. Subclasses may override.- Specified by:
isDynamicin interfaceIContributionItem- Overrides:
isDynamicin classContributionItem- Returns:
trueif this item is dynamic, andfalsefor normal items
-
setParent
public void setParent(IContributionManager parent)
Description copied from interface:IContributionItemSets the parent manager of this item- Specified by:
setParentin interfaceIContributionItem- Overrides:
setParentin classContributionItem- Parameters:
parent- the parent contribution manager
-
dispose
public void dispose()
Description copied from class:ContributionItemThe default implementation of thisIContributionItemmethod does nothing. Subclasses may override.- Specified by:
disposein interfaceIContributionItem- Overrides:
disposein classContributionItem
-
-