1 package net.sourceforge.phpdt.externaltools.variable;
3 import org.eclipse.core.runtime.IPath;
6 * Expands a variable into the last opened PHP file
8 * This class is not intended to be extended by clients.
11 public class FileExpander extends ResourceExpander { // implements
12 // IVariableTextExpander
18 public FileExpander() {
23 * Returns a string representation of the path to a file or directory for
24 * the given variable tag and value or <code>null</code>.
26 * @see IVariableTextExpander#getText(String, String, ExpandVariableContext)
28 public String getText(String varTag, String varValue,
29 ExpandVariableContext context) {
30 IPath path = getPath(varTag, varValue, context);
32 return path.toString();
34 return "<no file selected>";