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
12 * <code>null</code> if there is no project in the context.
14 public String getText(String varTag, String varValue, ExpandVariableContext context) {
15 IProject project= context.getProject();
16 if (project != null) {
17 return project.getName();