Package org.eclipse.ui.model
Interface IComparableContribution
- All Superinterfaces:
IAdaptable
Instances of this interface represent a contribution within the workbench.
This interface is typically implemented by the workbench itself although
extension developers may wish to implement it as well for their own
extensions.
- Since:
- 3.4
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
getAdapter
(Class<T> adapter) Possible adaptations include:IConfigurationElement
useful for contributions that eventually work back to registry elements.getLabel()
Return the human readable label for this contribution.int
Return the priority of this contribution.
-
Field Details
-
PRIORITY_DEFAULT
static final int PRIORITY_DEFAULTThe default priority (0);- See Also:
-
-
Method Details
-
getPriority
int getPriority()Return the priority of this contribution. Lower values constitute higher priorities.- Returns:
- the priority
-
getLabel
String getLabel()Return the human readable label for this contribution. Must not benull
.- Returns:
- the label for this contribution
-
getAdapter
Possible adaptations include:IConfigurationElement
- useful for contributions that eventually work back to registry elements.
The majority of
IComparableContribution
instances provided by the platform will provide this adapter.
- Specified by:
getAdapter
in interfaceIAdaptable
- Type Parameters:
T
- the class type- Parameters:
adapter
- the adapter class to look up- Returns:
- a object of the given class, or
null
if this object does not have an adapter for the given class
-