       nil)))
 
 (defn- open-browser
-"Open a browser for the running labrepl web page"
-[]
-	(if (wait-for-resource check-server *timeout* *step*)
-   (let
-	  [browser-support (.getBrowserSupport (PlatformUI/getWorkbench))
-	   browser
-	   (.createBrowser 
-	      browser-support 
-	      (reduce bit-or 
-	        [IWorkbenchBrowserSupport/LOCATION_BAR
-	          IWorkbenchBrowserSupport/NAVIGATION_BAR
-	          IWorkbenchBrowserSupport/AS_EDITOR]) 
-	      nil "Labrepl" "Labrepl Instructions")]
-	   (.openURL browser (URL. (str "http://localhost:" *port*))))))
+  "Open a browser for the running labrepl web page"
+  [monitor]
+  (try
+    (.beginTask monitor "Opening Browser" IProgressMonitor/UNKNOWN)
+		(if (wait-for-resource check-server *timeout* *step* monitor)
+	   (let
+		  [browser-support (.getBrowserSupport (PlatformUI/getWorkbench))
+		   browser
+		   (.createBrowser 
+		      browser-support 
+		      (reduce bit-or 
+		        [IWorkbenchBrowserSupport/LOCATION_BAR
+		          IWorkbenchBrowserSupport/NAVIGATION_BAR
+		          IWorkbenchBrowserSupport/AS_EDITOR]) 
+		      nil "Labrepl" "Labrepl Instructions")]
+		   (.openURL browser (URL. (str "http://localhost:" *port*)))
+	     Status/OK_STATUS)
+	     Status/CANCEL_STATUS)
+  (finally (.done monitor))))
  
 (defn- fix-libraries
   "Enter all the JAR files in the lib directory to the Java build path of the project"

          (let
            [startup-file-selection (StructuredSelection. (.getFile (.getFolder project "src") "labrepl.clj"))
              browser-labrepl-job
                (proxy [UIJob] ["Start Labrepl Session and Browser"]
			            (runInUIThread [monitor]
			              (.launch (ClojureLaunchShortcut.) startup-file-selection ILaunchManager/RUN_MODE)
										(let [console (wait-for-resource #(ClojureClient/findActiveReplConsole) *timeout* *step*)]
                      (if console
                        (do
	                        (EvaluateTextAction/evaluateText console "(labrepl/-main)")
										      (open-browser)
                          Status/OK_STATUS)
                        Status/CANCEL_STATUS))))]
            (.schedule browser-labrepl-job)))))))

(defn -run
  [this monitor]
  (let
    [monitor (if monitor monitor (NullProgressMonitor.))
      state @(.state this)
      page (:page state)
      overwrite-query (:overwrite-query state)]
    (try

     [java.util.zip ZipFile]
     [org.eclipse.core.runtime NullProgressMonitor
                            SubProgressMonitor
                            IProgressMonitor
                            CoreException
                            IStatus
                            Platform
