X-Git-Url: http://git.phpeclipse.com diff --git a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/editor/ShowExternalPreviewAction.java b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/editor/ShowExternalPreviewAction.java index abe117e..c471f50 100644 --- a/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/editor/ShowExternalPreviewAction.java +++ b/net.sourceforge.phpeclipse.ui/src/net/sourceforge/phpeclipse/ui/editor/ShowExternalPreviewAction.java @@ -54,15 +54,15 @@ public class ShowExternalPreviewAction extends TextEditorAction { } public void refresh(int type) { - IFile fileToParse = getFile(); - if (fileToParse == null) { + IFile previewFile = getFile(); + if (previewFile == null) { // should never happen return; } boolean autoPreview = ProjectPrefUtil.getPreviewBooleanValue( - fileToParse, IPreferenceConstants.PHP_AUTO_PREVIEW_DEFAULT); + previewFile, IPreferenceConstants.PHP_AUTO_PREVIEW_DEFAULT); boolean bringToTopPreview = ProjectPrefUtil.getPreviewBooleanValue( - fileToParse, + previewFile, IPreferenceConstants.PHP_BRING_TO_TOP_PREVIEW_DEFAULT); if (autoPreview) { @@ -77,7 +77,9 @@ public class ShowExternalPreviewAction extends TextEditorAction { } } if (part != null) { - ((BrowserView) part).refresh(); + // ((BrowserView) part).refresh(); + String localhostURL = getLocalhostURL(null, previewFile); + ((BrowserView) part).refresh(localhostURL); } } catch (Exception e) { // PHPeclipsePlugin.log(e);