package net.sourceforge.phpdt.externaltools.variable; import net.sourceforge.phpeclipse.PHPeclipsePlugin; import org.eclipse.core.resources.IFile; /** * Expands a variable into the last opened PHP file *

* This class is not intended to be extended by clients. *

*/ public class LastPHPFileExpander implements IVariableTextExpander { public String getText(String varTag, String varValue, ExpandVariableContext context) { IFile file = PHPeclipsePlugin.getDefault().getLastEditorFile(); String fileLocation =""; if (file != null) { fileLocation = file.getLocation().toString(); } return fileLocation; } }