boolean bringToTopPreview = ProjectPrefUtil.getPreviewBooleanValue(
previewFile,
IPreferenceConstants.PHP_BRING_TO_TOP_PREVIEW_DEFAULT);
+ boolean stickyBrowserURL = ProjectPrefUtil.getPreviewBooleanValue(
+ previewFile,
+ IPreferenceConstants.PHP_STICKY_BROWSER_URL_DEFAULT);
if (autoPreview) {
IWorkbenchPage page = WebUI.getActivePage();
}.schedule();
}
// ((BrowserView) part).refresh();
- String localhostURL = getLocalhostURL(null, previewFile);
- ((BrowserView) part).refresh(localhostURL);
+ if (stickyBrowserURL
+ && ((BrowserView) part).getUrl() != null
+ && ((BrowserView) part).getUrl().length() > 0) {
+ ((BrowserView) part).refresh();
+ } else {
+ String localhostURL = getLocalhostURL(null, previewFile);
+ ((BrowserView) part).refresh(localhostURL);
+ }
}
} catch (PartInitException e) {
// ad hoc