1) Reintroduced finishedBuilding
[phpeclipse.git] / net.sourceforge.phpeclipse.webbrowser / src / net / sourceforge / phpeclipse / webbrowser / internal / WebBrowser.java
index 4c4f9ee..4fc84c2 100644 (file)
@@ -139,7 +139,8 @@ public class WebBrowser extends Composite {
                                public void widgetSelected(SelectionEvent we) {
                                        try {
                                                if (combo.getSelectionIndex() != -1)
-                                                       setURL(combo.getItem(combo.getSelectionIndex()));
+                                                       setURL(combo.getItem(combo.getSelectionIndex()),
+                                                                       false);
                                        } catch (Exception e) {
                                        }
                                }
@@ -236,8 +237,11 @@ public class WebBrowser extends Composite {
                                // else its an editor window
                                if (shell != null)
                                        shell.dispose();
-                               else
-                                       editor.closeEditor();
+                               else {
+                                       // #1365431 (toshihiro) editor.closeEditor(); causes NPE
+                                       if (editor != null)
+                                               editor.closeEditor();
+                               }
                        }
                });
 
@@ -377,11 +381,12 @@ public class WebBrowser extends Composite {
                if (newURL != null)
                        url = newURL;
 
-               if (browse)
+               if (browse) {
                        navigate(url);
 
-               addToHistory(url);
-               updateHistory();
+                       addToHistory(url);
+                       updateHistory();
+               }
        }
 
        protected void addToHistory(String url) {
@@ -657,7 +662,7 @@ public class WebBrowser extends Composite {
                                                WebBrowserPreference.getHomePageURL().substring(9));
        }
 
-       protected String getURL() {
+       public String getURL() {
                return browser.getUrl();
        }
 
@@ -679,15 +684,15 @@ public class WebBrowser extends Composite {
                combo.setText(temp);
        }
 
-       public void addProgressListener(ProgressListener listener) {
-               browser.addProgressListener(listener);
-       }
+//     public void addProgressListener(ProgressListener listener) {
+//             browser.addProgressListener(listener);
+//     }
 
-       public void addStatusTextListener(StatusTextListener listener) {
-               browser.addStatusTextListener(listener);
-       }
+//     public void addStatusTextListener(StatusTextListener listener) {
+//             browser.addStatusTextListener(listener);
+//     }
 
-       public void addTitleListener(TitleListener listener) {
-               browser.addTitleListener(listener);
-       }
+//     public void addTitleListener(TitleListener listener) {
+//             browser.addTitleListener(listener);
+//     }
 }
\ No newline at end of file