import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import net.sourceforge.phpdt.core.compiler.ITerminalSymbols;
import net.sourceforge.phpdt.core.compiler.InvalidInputException;
public class IncludesScanner implements ITerminalSymbols {
- private final PHPOpenAllIncludesEditorAction fLineCreator;
+// private final PHPOpenAllIncludesEditorAction fOpenAllIncludesAction;
private IProject fProject;
private IFileEditorInput fEditorInput;
HashSet fSet;
- public IncludesScanner(PHPOpenAllIncludesEditorAction action, IProject project, IFileEditorInput editorInput) {
+ public IncludesScanner(IProject project, IFileEditorInput editorInput) {
fProject = project;
- this.fLineCreator = action;
+// fOpenAllIncludesAction = action;
fEditorInput = editorInput;
fSet = new HashSet();
}
// e.printStackTrace();
}
}
+
+ private IContainer getWorkingLocation(IFileEditorInput editorInput) {
+ if (editorInput == null || editorInput.getFile() == null) {
+ return null;
+ }
+ return editorInput.getFile().getParent();
+ }
public IFile getIncludeFile(String relativeFilename) {
- IContainer container = this.fLineCreator.getWorkingLocation(fEditorInput);
+ IContainer container = getWorkingLocation(fEditorInput);
String fullPath = fProject.getLocation().toString();
IFile file = null;
if (relativeFilename.startsWith("../")) {
return list;
}
+ /**
+ * @return Returns the set.
+ */
+ public Set getSet() {
+ return fSet;
+ }
}
\ No newline at end of file