2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.corext.template;
8 * A simple template variable, which always evaluates to a defined string.
10 public class SimpleTemplateVariable extends TemplateVariable {
12 /** The string to which this variable evaluates. */
13 private String fEvaluationString;
14 /** A flag indicating if this variable can be resolved. */
15 private boolean fResolved;
18 * @see TemplateVariable#TemplateVariable(String, String)
20 protected SimpleTemplateVariable(String name, String description) {
21 super(name, description);
25 * Sets the string to which this variable evaluates.
27 * @param evaluationString the evaluation string, may be <code>null</code>.
29 public final void setEvaluationString(String evaluationString) {
30 fEvaluationString= evaluationString;
34 * @see TemplateVariable#evaluate(TemplateContext)
36 public String evaluate(TemplateContext context) {
37 return fEvaluationString;
41 * Sets the resolved flag.
43 public final void setResolved(boolean resolved) {
48 * @see TemplateVariable#isResolved(TemplateContext)
50 public boolean isResolved(TemplateContext context) {