public class CommandContributionItemParameter extends Object
Modifier and Type | Field and Description |
---|---|
String |
commandId
A command id for a defined command.
|
ImageDescriptor |
disabledIcon
A disabled icon for this item.
|
String |
helpContextId
The help context id to be applied to this contribution.
|
ImageDescriptor |
hoverIcon
A hover icon for this item.
|
ImageDescriptor |
icon
An icon for this item.
|
String |
iconStyle
The icon style to use.
|
String |
id
The id for this item.
|
String |
label
A label for this item.
|
String |
mnemonic
A mnemonic for this item to be applied to the label.
|
int |
mode
Any number of mode bits, like
CommandContributionItem.MODE_FORCE_TEXT . |
Map |
parameters
A map of strings to strings which represent parameter names to values.
|
IServiceLocator |
serviceLocator
a service locator that is most appropriate for this contribution.
|
int |
style
The style of this menu contribution.
|
String |
tooltip
A tooltip for this item.
|
boolean |
visibleEnabled
The visibility tracking for a menu contribution.
|
Constructor and Description |
---|
CommandContributionItemParameter(IServiceLocator serviceLocator,
String id,
String commandId,
int style)
Create the parameter object.
|
CommandContributionItemParameter(IServiceLocator serviceLocator,
String id,
String commandId,
Map parameters,
ImageDescriptor icon,
ImageDescriptor disabledIcon,
ImageDescriptor hoverIcon,
String label,
String mnemonic,
String tooltip,
int style,
String helpContextId,
boolean visibleEnabled)
Build the parameter object.
|
public IServiceLocator serviceLocator
IWorkbenchWindow
or
IWorkbenchPartSite
will be sufficient. Must not be
null
.public String id
null
. Items without an id
cannot be referenced later.public String commandId
null
.public Map parameters
null
public ImageDescriptor icon
null
.public ImageDescriptor disabledIcon
null
.public ImageDescriptor hoverIcon
null
.public String label
null
.public String mnemonic
null
.public String tooltip
null
. Tooltips are
currently only valid for toolbar contributions.public int style
public String helpContextId
null
public String iconStyle
null
for default style.ICommandImageService
public boolean visibleEnabled
public int mode
CommandContributionItem.MODE_FORCE_TEXT
.public CommandContributionItemParameter(IServiceLocator serviceLocator, String id, String commandId, int style)
serviceLocator
- a service locator that is most appropriate for this
contribution. Typically the local IWorkbenchWindow
or
IWorkbenchPartSite
will be sufficient. Must not be
null
.id
- The id for this item. May be null
. Items
without an id cannot be referenced later.commandId
- A command id for a defined command. Must not be
null
.style
- The style of this menu contribution. See the STYLE_* contants.public CommandContributionItemParameter(IServiceLocator serviceLocator, String id, String commandId, Map parameters, ImageDescriptor icon, ImageDescriptor disabledIcon, ImageDescriptor hoverIcon, String label, String mnemonic, String tooltip, int style, String helpContextId, boolean visibleEnabled)
Note: This constructor should not be called outside the framework.
serviceLocator
- a service locator that is most appropriate for this
contribution. Typically the local IWorkbenchWindow
or
IWorkbenchPartSite
will be sufficient. Must not be
null
.id
- The id for this item. May be null
. Items
without an id cannot be referenced later.commandId
- A command id for a defined command. Must not be
null
.parameters
- A map of strings to strings which represent parameter names to
values. The parameter names must match those in the command
definition. May be null
icon
- An icon for this item. May be null
.disabledIcon
- A disabled icon for this item. May be null
.hoverIcon
- A hover icon for this item. May be null
.label
- A label for this item. May be null
.mnemonic
- A mnemonic for this item to be applied to the label. May be
null
.tooltip
- A tooltip for this item. May be null
. Tooltips
are currently only valid for toolbar contributions.style
- The style of this menu contribution. See the STYLE_* contants.helpContextId
- the help context id to be applied to this contribution. May be
null
visibleEnabled
- Visibility tracking for the menu contribution.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.