1 package net.sourceforge.phpdt.externaltools.variable;
3 import org.eclipse.core.resources.IProject;
6 * Extracts the project name from a variable context
8 public class ProjectNameExpander implements IVariableTextExpander {
11 * Returns the name of the project in the given context or <code>null</code>
12 * if there is no project in the context.
14 public String getText(String varTag, String varValue,
15 ExpandVariableContext context) {
16 IProject project = context.getProject();
17 if (project != null) {
18 return project.getName();