2 * (c) Copyright IBM Corp. 2000, 2001.
5 package net.sourceforge.phpdt.internal.corext.template;
7 import org.eclipse.core.runtime.CoreException;
10 * A template context. A template context is associated with a context type.
12 public abstract class TemplateContext {
14 /** context type of this context */
15 private final ContextType fContextType;
18 * Creates a template context of a particular context type.
20 protected TemplateContext(ContextType contextType) {
21 fContextType= contextType;
25 * Returns the context type of this context.
27 public ContextType getContextType() {
32 * Evaluates the template and returns a template buffer.
34 public abstract TemplateBuffer evaluate(Template template) throws CoreException;
37 * Tests if the specified template can be evaluated in this context.
39 public abstract boolean canEvaluate(Template template);