|
Eclipse PDE Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.pde.ui.templates.TemplateField
org.eclipse.pde.ui.templates.TemplateOption
public abstract class TemplateOption
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).
| Constructor Summary | |
|---|---|
TemplateOption(BaseOptionTemplateSection section,
String name,
String label)
Creates a new option for the provided template section. |
|
| Method Summary | |
|---|---|
String |
getMessageLabel()
Returns the label of this option that can be presented in the messages to the user. |
String |
getName()
Returns the unique name of this option |
Object |
getValue()
Returns the value of this option. |
boolean |
isEmpty()
Returns whether this option is currently empty. |
boolean |
isEnabled()
Returns whether this option is enabled. |
boolean |
isRequired()
Returns whether this option is required (cannot be empty) |
void |
setEnabled(boolean enabled)
Sets the enabled state of this option. |
void |
setName(String name)
Changes the unique name of this option |
void |
setRequired(boolean required)
Marks this option as required. |
void |
setValue(Object value)
Sets the new value of this option. |
| Methods inherited from class org.eclipse.pde.ui.templates.TemplateField |
|---|
createControl, createLabel, getLabel, getSection, setLabel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TemplateOption(BaseOptionTemplateSection section,
String name,
String label)
section - the parent template sectionname - the unique name of this optionlabel - presentable label of this option| Method Detail |
|---|
public String getName()
public void setName(String name)
name - the new option namepublic Object getValue()
public boolean isEmpty()
public void setRequired(boolean required)
required - the new value of the propertyisEmpty()public boolean isRequired()
public void setValue(Object value)
value - the new valuepublic boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - the new enabled statepublic String getMessageLabel()
|
Eclipse PDE Release 3.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||