From cd03ece2b5f4176ceda46cde105f6052247769d6 Mon Sep 17 00:00:00 2001
From: incastrix <incastrix>
Date: Thu, 20 Nov 2008 00:33:18 +0000
Subject: [PATCH 1/1] Fix bugs #725 and releted #744

---
 .../phpeclipse/phpeditor/PHPEditor.java            |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditor.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditor.java
index e8de8e0..ae728e1 100644
--- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditor.java
+++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpeclipse/phpeditor/PHPEditor.java
@@ -61,6 +61,7 @@ import net.sourceforge.phpdt.ui.text.JavaTextTools;
 import net.sourceforge.phpdt.ui.text.PHPSourceViewerConfiguration;
 import net.sourceforge.phpdt.ui.text.folding.IJavaFoldingStructureProvider;
 import net.sourceforge.phpeclipse.PHPeclipsePlugin;
+import net.sourceforge.phpeclipse.builder.ExternalEditorInput;
 import net.sourceforge.phpeclipse.ui.editor.BrowserUtil;
 import net.sourceforge.phpeclipse.webbrowser.views.BrowserView;
 
@@ -5870,15 +5871,19 @@ public abstract class PHPEditor extends AbstractDecoratedTextEditor implements
 	}
 
 	public ShowInContext getShowInContext() {
-		IFile file;
+		IFile file = null;
 		if(getEditorInput() instanceof FileStoreEditorInput){
 			FileStoreEditorInput fei = (FileStoreEditorInput) getEditorInput();
 			file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fei.getURI().getPath()));
-		} else {
+		} else if (getEditorInput() instanceof FileEditorInput) {
 			FileEditorInput fei = (FileEditorInput) getEditorInput();
 			// added to fix ticket 637
 			file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fei.getURI().getPath()));
+		} else if (getEditorInput() instanceof ExternalEditorInput) {
+			ExternalEditorInput fei = (ExternalEditorInput) getEditorInput();
+			file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(fei.getFullPath()/* .getURI().getPath()*/));
 		}
+
 		ShowInContext context = BrowserUtil.getShowInContext(file,
 				false, "");
 		if (context != null) {
-- 
1.7.1