Register new file extensions for the php-editor:
[phpeclipse.git] / net.sourceforge.phpeclipse.ui / src / net / sourceforge / phpeclipse / ui / editor / BrowserUtil.java
index 095d624..a70b636 100644 (file)
@@ -117,13 +117,16 @@ public class BrowserUtil {
                                        // If this view is already visible just return.
                                        IViewReference ref = persp.findView(BrowserView.ID_BROWSER, null);
                                        IViewPart view = null;
-                                       if (ref != null)
+                                       if (ref != null) {
                                                view = ref.getView(true);
-                                       IShowInTarget target = getShowInTarget(view);
-                                       if (target != null && target.show(context)) {
-                                               // success
                                        }
-                                       ((WorkbenchPage) page).performedShowIn(BrowserView.ID_BROWSER);
+                                       if (view != null) {
+                                               IShowInTarget target = getShowInTarget(view);
+                                               if (target != null && target.show(context)) {
+                                                       // success
+                                               }
+                                               ((WorkbenchPage) page).performedShowIn(BrowserView.ID_BROWSER);
+                                       }
                                }
 
                                // IViewPart view = page.showView(BrowserView.ID_BROWSER);