| java.lang.Object org.eclipse.pde.ui.templates.TemplateField org.eclipse.pde.ui.templates.TemplateOption
All known Subclasses: org.eclipse.pde.ui.templates.AbstractChoiceOption, org.eclipse.pde.ui.templates.BlankField, org.eclipse.pde.ui.templates.StringOption, org.eclipse.pde.ui.templates.ChoiceOption, org.eclipse.pde.ui.templates.BooleanOption,
TemplateOption | abstract public class TemplateOption extends TemplateField (Code) | | The base class of all the template options. Options have unique name and a
value that can be changed. The value of the option is automatically available
to the template files - can be accessed by substitution (e.g. $value_name$)
or as part of conditional code generation (e.g. if value_name).
since: 2.0 |
Method Summary | |
public String | getMessageLabel() Returns the label of this option that can be presented in the messages to
the user. | public String | getName() | public Object | getValue() Returns the value of this option. | public boolean | isEmpty() Returns whether this option is currently empty. | public boolean | isEnabled() Returns whether this option is enabled. | public boolean | isRequired() | public void | setEnabled(boolean enabled) Sets the enabled state of this option. | public void | setName(String name) | public void | setRequired(boolean required) Marks this option as required. | public void | setValue(Object value) Sets the new value of this option. |
TemplateOption | public TemplateOption(BaseOptionTemplateSection section, String name, String label)(Code) | | Creates a new option for the provided template section.
Parameters: section - the parent template section Parameters: name - the unique name of this option Parameters: label - presentable label of this option |
getMessageLabel | public String getMessageLabel()(Code) | | Returns the label of this option that can be presented in the messages to
the user. The default implementation trims the 'label' property from
mnemonics and from the trailing column.
|
getName | public String getName()(Code) | | Returns the unique name of this option
option name |
getValue | public Object getValue()(Code) | | Returns the value of this option.
the current value |
isEmpty | public boolean isEmpty()(Code) | | Returns whether this option is currently empty. The actual semantics of
the result depends on the implementing option.
true if option is empty, false otherwise. |
isEnabled | public boolean isEnabled()(Code) | | Returns whether this option is enabled. The actual presentation of
enabled state depends on the implementing option.
true if option is enabled and can be modified. |
isRequired | public boolean isRequired()(Code) | | Returns whether this option is required (cannot be empty)
true if this option is required, false otherwise. |
setEnabled | public void setEnabled(boolean enabled)(Code) | | Sets the enabled state of this option. The action presentation of the
enabled state depends on the implementing option.
Parameters: enabled - the new enabled state |
setName | public void setName(String name)(Code) | | Changes the unique name of this option
Parameters: name - the new option name |
setRequired | public void setRequired(boolean required)(Code) | | Marks this option as required. Required options must be set by the user.
An option that is empty and is marked required will be flagged as an
error in the wizard.
Parameters: required - the new value of the property See Also: TemplateOption.isEmpty |
setValue | public void setValue(Object value)(Code) | | Sets the new value of this option.
Parameters: value - the new value |
|
|