import java.util.List;
import net.sourceforge.phpdt.internal.ui.viewsupport.ListContentProvider;
-import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+//import net.sourceforge.phpeclipse.PHPeclipsePlugin;
import net.sourceforge.phpeclipse.phpeditor.PHPEditor;
import net.sourceforge.phpeclipse.ui.WebUI;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.Path;
+//import org.eclipse.core.runtime.Path;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.ui.IEditorActionDelegate;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.IWorkbenchPage;
+//import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.actions.ActionDelegate;
import org.eclipse.ui.dialogs.ListSelectionDialog;
}
}
- private IWorkbenchPage getActivePage() {
- IWorkbenchWindow workbenchWindow = fEditor.getEditorSite()
- .getWorkbenchWindow();
- IWorkbenchPage page = workbenchWindow.getActivePage();
- return page;
- }
+// private IWorkbenchPage getActivePage() {
+// IWorkbenchWindow workbenchWindow = fEditor.getEditorSite()
+// .getWorkbenchWindow();
+// IWorkbenchPage page = workbenchWindow.getActivePage();
+// return page;
+// }
public IContainer getWorkingLocation(IFileEditorInput editorInput) {
if (editorInput == null || editorInput.getFile() == null) {
return editorInput.getFile().getParent();
}
- private IFile getIncludeFile(IProject project,
- IFileEditorInput editorInput, String relativeFilename) {
- IContainer container = getWorkingLocation(editorInput);
- String fullPath = project.getFullPath().toString();
- IFile file = null;
- if (relativeFilename.startsWith("../")) {
- Path path = new Path(relativeFilename);
- file = container.getFile(path);
- return file;
- }
- int index = relativeFilename.lastIndexOf('/');
-
- if (index >= 0) {
- Path path = new Path(relativeFilename);
- file = project.getFile(path);
- if (file.exists()) {
- return file;
- }
- }
-
- Path path = new Path(relativeFilename);
- file = container.getFile(path);
-
- return file;
- }
+// private IFile getIncludeFile(IProject project,
+// IFileEditorInput editorInput, String relativeFilename) {
+// IContainer container = getWorkingLocation(editorInput);
+// String fullPath = project.getFullPath().toString();
+// IFile file = null;
+// if (relativeFilename.startsWith("../")) {
+// Path path = new Path(relativeFilename);
+// file = container.getFile(path);
+// return file;
+// }
+// int index = relativeFilename.lastIndexOf('/');
+//
+// if (index >= 0) {
+// Path path = new Path(relativeFilename);
+// file = project.getFile(path);
+// if (file.exists()) {
+// return file;
+// }
+// }
+//
+// Path path = new Path(relativeFilename);
+// file = container.getFile(path);
+//
+// return file;
+// }
public void run(IAction action) {
if (fEditor == null) {