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
A compound contribution is a contribution item consisting of a dynamic list
of contribution items.
- Since:
- 3.1
-
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a compound contribution item with anull
id.protected
Creates a compound contribution item with the given (optional) id. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
The default implementation of thisIContributionItem
method does nothing.void
The default implementation of thisIContributionItem
method does nothing.protected abstract IContributionItem[]
Return a list of contributions items that will replace this item in the parent manager.boolean
isDirty()
The default implementation of thisIContributionItem
method returnsfalse
.boolean
The default implementation of thisIContributionItem
method returnsfalse
.void
setParent
(IContributionManager parent) Sets the parent manager of this itemMethods inherited from class org.eclipse.jface.action.ContributionItem
fill, fill, fill, getId, getParent, isEnabled, isGroupMarker, isSeparator, isVisible, saveWidgetState, setId, setVisible, toString, update, update
-
Constructor Details
-
CompoundContributionItem
protected CompoundContributionItem()Creates a compound contribution item with anull
id. -
CompoundContributionItem
Creates a compound contribution item with the given (optional) id.- Parameters:
id
- the contribution item identifier, ornull
-
-
Method Details
-
fill
Description copied from class:ContributionItem
The default implementation of thisIContributionItem
method does nothing. Subclasses may override.- Specified by:
fill
in interfaceIContributionItem
- Overrides:
fill
in classContributionItem
- Parameters:
menu
- the parent menuindex
- the index where the controls are inserted, or-1
to insert at the end
-
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:ContributionItem
The default implementation of thisIContributionItem
method returnsfalse
. Subclasses may override.- Specified by:
isDirty
in interfaceIContributionItem
- Overrides:
isDirty
in classContributionItem
- Returns:
true
if this item is dirty
-
isDynamic
public boolean isDynamic()Description copied from class:ContributionItem
The default implementation of thisIContributionItem
method returnsfalse
. Subclasses may override.- Specified by:
isDynamic
in interfaceIContributionItem
- Overrides:
isDynamic
in classContributionItem
- Returns:
true
if this item is dynamic, andfalse
for normal items
-
setParent
Description copied from interface:IContributionItem
Sets the parent manager of this item- Specified by:
setParent
in interfaceIContributionItem
- Overrides:
setParent
in classContributionItem
- Parameters:
parent
- the parent contribution manager
-
dispose
public void dispose()Description copied from class:ContributionItem
The default implementation of thisIContributionItem
method does nothing. Subclasses may override.- Specified by:
dispose
in interfaceIContributionItem
- Overrides:
dispose
in classContributionItem
-