Fixed: 1777185 - Remote Debug option 'Open with ...' should work
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / editor / BrowserUtil.java
index f5781be..d6ce54c 100644 (file)
@@ -11,6 +11,7 @@ import org.eclipse.ui.IViewPart;
 import org.eclipse.ui.IViewReference;
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.internal.Perspective;
 import org.eclipse.ui.internal.WorkbenchPage;
 import org.eclipse.ui.part.IShowInTarget;
@@ -134,6 +135,15 @@ public class BrowserUtil {
                                        if (ref != null) {
                                                view = ref.getView(true);
                                        }
+                                       if (view == null && forceDBGPreview) {
+                                               try {
+                                                       view = persp.showView(BrowserView.ID_BROWSER, null);
+                                                       persp.bringToTop(persp.findView(
+                                                                       BrowserView.ID_BROWSER, null));
+                                               } catch (PartInitException e) {
+                                                       WebUI.log(e);
+                                               }
+                                       }
                                        if (view != null) {
                                                IShowInTarget target = getShowInTarget(view);
                                                if (target != null && target.show(context)) {