forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r170902 - in /forrest/trunk/tools/eclipse: .project plugin.xml readme.txt src/org/apache/forrest/eclipse/ForrestPlugin.java src/org/apache/forrest/eclipse/job/ForrestRunner.java
Date Thu, 19 May 2005 10:07:50 GMT
Author: rgardler
Date: Thu May 19 03:07:48 2005
New Revision: 170902

URL: http://svn.apache.org/viewcvs?rev=170902&view=rev
Log:
upgarde to using WTP1.0M4

Modified:
    forrest/trunk/tools/eclipse/.project
    forrest/trunk/tools/eclipse/plugin.xml
    forrest/trunk/tools/eclipse/readme.txt
    forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/ForrestPlugin.java
    forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestRunner.java

Modified: forrest/trunk/tools/eclipse/.project
URL: http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/.project?rev=170902&r1=170901&r2=170902&view=diff
==============================================================================
--- forrest/trunk/tools/eclipse/.project (original)
+++ forrest/trunk/tools/eclipse/.project Thu May 19 03:07:48 2005
@@ -6,15 +6,6 @@
 	</projects>
 	<buildSpec>
 		<buildCommand>
-			<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
-			<arguments>
-				<dictionary>
-					<key>LaunchConfigHandle</key>
-					<value>&lt;project&gt;/.externalToolBuilders/com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder.launch</value>
-				</dictionary>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
 			<name>org.eclipse.jdt.core.javabuilder</name>
 			<arguments>
 			</arguments>
@@ -31,6 +22,11 @@
 		</buildCommand>
 		<buildCommand>
 			<name>com.ibm.sse.model.structuredbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.sse.core.structuredbuilder</name>
 			<arguments>
 			</arguments>
 		</buildCommand>

Modified: forrest/trunk/tools/eclipse/plugin.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/plugin.xml?rev=170902&r1=170901&r2=170902&view=diff
==============================================================================
--- forrest/trunk/tools/eclipse/plugin.xml (original)
+++ forrest/trunk/tools/eclipse/plugin.xml Thu May 19 03:07:48 2005
@@ -42,9 +42,9 @@
       <import plugin="org.eclipse.core.runtime"/>
       <import plugin="org.eclipse.debug.core"/>
       <import plugin="org.eclipse.ui.ide"/>
-      <import plugin="org.eclipse.webbrowser"/>
       <import plugin="org.eclipse.debug.ui"/>
       <import plugin="org.burrokeet.servletEngine"/>
+      <import plugin="org.eclipse.wst.internet.webbrowser"/>
    </requires>
 
 
@@ -76,7 +76,7 @@
          point="org.eclipse.ui.popupMenus">
       <objectContribution
             objectClass="org.eclipse.core.resources.IProject"
-            id="org.apache.forrest.eclipse.siteContrirubtion">
+            id="org.apache.forrest.eclipse.siteContribution">
          <menu
                label="Site"
                path="projStart"

Modified: forrest/trunk/tools/eclipse/readme.txt
URL: http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/readme.txt?rev=170902&r1=170901&r2=170902&view=diff
==============================================================================
--- forrest/trunk/tools/eclipse/readme.txt (original)
+++ forrest/trunk/tools/eclipse/readme.txt Thu May 19 03:07:48 2005
@@ -13,9 +13,9 @@
 Installation
 ============
 
-To use the plugin you need to install it within Eclipse V3.0 (V3.1M* not 
-currently supported) and Apache Forrest. You will also need to ensure that 
-you have the reqruied plugins for Eclipse.
+To use the plugin you need to install it within Eclipse V3.0 
+and Apache Forrest. You will also need to ensure that 
+you have the required plugins for Eclipse.
 
 Getting Forrest
 ---------------
@@ -54,8 +54,7 @@
 about it so I can feed it back to the WTP project at Eclipse). If you don't 
 use eclipse for XML editing at present then just use your normal installation.
 
-- download Eclipse 3.0 (you need the full SDK) 
-  - NOTE: 3.1 Milestone releases are not currently supported
+- download Eclipse 3.* (you need the full SDK) 
 
 - Extract the complete tree it into a new directory
   (we named it forrestEclipse)
@@ -99,25 +98,18 @@
   - If any are disabled then enable them by selecting them and clicking "Enable"
     in the right pane
   
-- install the IBM code drop for the WTP project (this is the pre-alpha stuff)
-  - download http://download.eclipse.org/webtools/downloads/initial-contributions/ibm.zip
-  - extract the zip to a temp directory (we named it tmp)
-  - In the extracted tree you will find another archive
-    tmp/com.ibm.wtp.sdk-I-200407201920.zip extract its to the tmp directory
-  - copy or move the contents of tmp/eclipse to your forrestEclipse directory
+- install the the WTP project
+  - download page is http://download.eclipse.org/webtools/downloads/drops/S-1.0M4-200504292037/
+  - extract the zip into forestEclipse
   
 - restart forrestEclipse using the command "eclipse.exe -clean" (this will 
   reload all the plugin descriptors, you do not need the "-clean" flag in 
   subsequent restarts
   
-- verify that the IBM plugins have been installed
-  - Help -> Software Updates -> Manage Configuration
-  - ensure com.ibm.wtp.sdk.6.0.0 is listed and does not have a little red "disabled" flag
on the icon
-
 Export Forrest Eclipse Plugin
 -----------------------------
 
-To work with the Forrest Eclipse plugin you need to first need to make it
+To work with the Forrest Eclipse plugin you first need to make it
 available in your wokspace. Here's how:
 
 Import the Forrest Eclipse plugin code into you workspace
@@ -148,7 +140,7 @@
   
 NOTE - if you intend to help develop the Forrest Eclipse plugin (please do) 
 then you should be familar with using Eclipse for Plugin Development. A good
-startiung point is http://www.eclipse.org/articles/index.html
+starting point is http://www.eclipse.org/articles/index.html
 
 ===============
 Getting Started
@@ -176,8 +168,6 @@
 -------------
 - right click on Forrest project
 - select site -> stop
-
-(NOTE: currently broken - you will have to manually kill the java process I'm afraid)
 
 Build Site
 ----------

Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/ForrestPlugin.java
URL: http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/ForrestPlugin.java?rev=170902&r1=170901&r2=170902&view=diff
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/ForrestPlugin.java (original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/ForrestPlugin.java Thu May
19 03:07:48 2005
@@ -132,6 +132,7 @@
 			store.setDefault(ForrestPreferences.FORREST_HOME, (String)envVariables.get(ForrestPreferences.FORREST_HOME));
 		}
 	}
+	
 	/**
 	 * Set the preference value for Forrest Home.
 	 * @param forrestHome

Modified: forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestRunner.java
URL: http://svn.apache.org/viewcvs/forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestRunner.java?rev=170902&r1=170901&r2=170902&view=diff
==============================================================================
--- forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestRunner.java (original)
+++ forrest/trunk/tools/eclipse/src/org/apache/forrest/eclipse/job/ForrestRunner.java Thu
May 19 03:07:48 2005
@@ -31,8 +31,11 @@
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
-import org.eclipse.webbrowser.WebBrowser;
-import org.eclipse.webbrowser.WebBrowserEditorInput;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+import org.eclipse.wst.internet.webbrowser.internal.Trace;
+import org.eclipse.wst.internet.webbrowser.internal.WebBrowserUIPlugin;
 
 /**
  * Run a version of Forrest
@@ -123,23 +126,28 @@
 
             // FIXME: Timeout delay should be a preference
             long endTime = System.currentTimeMillis() + (1000 * 30);
-            while (Utilities.isPortFree(port) && endTime < System.currentTimeMillis())
{
+            while (Utilities.isPortFree(port)
+                    && endTime < System.currentTimeMillis()) {
                 try {
                     Thread.sleep(250);
                 } catch (InterruptedException e) {
                     // no problem (I think ;-))
                 }
             }
-            
-            if (! Utilities.isPortFree(port)) {
-                status = new Status(Status.WARNING, ForrestPlugin.ID,
-                        EXCEPTION_UNABLE_TO_START, "Server did not start within specified
timeout period, have not tried to open browser.", null);
+
+            if (!Utilities.isPortFree(port)) {
+                status = new Status(
+                        Status.WARNING,
+                        ForrestPlugin.ID,
+                        EXCEPTION_UNABLE_TO_START,
+                        "Server did not start within specified timeout period, have not tried
to open browser.",
+                        null);
                 return status;
             }
 
             if (!openBrowser(monitor)) {
                 status = new Status(Status.WARNING, ForrestPlugin.ID,
-                    BROWSER_ERROR, "Unable to open browser", null);
+                        BROWSER_ERROR, "Unable to open browser", null);
             }
 
             if (logger.isDebugEnabled()) {
@@ -147,7 +155,8 @@
             }
         } else {
             status = new Status(Status.WARNING, ForrestPlugin.ID,
-                   EXCEPTION_UNABLE_TO_START, "Unable to start Forrest, port " + port + "
already in use", null);
+                    EXCEPTION_UNABLE_TO_START, "Unable to start Forrest, port "
+                            + port + " already in use", null);
         }
         return status;
     }
@@ -162,17 +171,25 @@
     private boolean openBrowser(IProgressMonitor monitor) {
 
         monitor.subTask("Open index page");
-        URL url;
-        try {
-            url = new URL("http://localhost:8888");
-            WebBrowserEditorInput browserInput = new WebBrowserEditorInput(url,
-                    WebBrowserEditorInput.SHOW_ALL);
-            WebBrowser.openURL(browserInput);
-        } catch (MalformedURLException e1) {
-            // Should never be thrown
-            logger.error("openBrowser(IProgressMonitor)", e1);
-            return false;
-        }
+        // FIXME: port should come from the config files
+        Display.getDefault().syncExec(new Runnable() {
+            public void run() {
+                URL url;
+                try {
+                    url = new URL("http://localhost:8888");
+                    IWorkbenchBrowserSupport browserSupport = WebBrowserUIPlugin
+                            .getInstance().getWorkbench().getBrowserSupport();
+                    IWebBrowser browser = browserSupport.createBrowser(
+                            IWorkbenchBrowserSupport.LOCATION_BAR
+                                    | IWorkbenchBrowserSupport.NAVIGATION_BAR,
+                            null, null, null);
+                    browser.openURL(url);
+                } catch (Exception e) {
+                    Trace.trace(Trace.SEVERE, "Error opening browser", e);
+                }
+            }
+        });
+
         monitor.worked(3);
         return true;
     }



Mime
View raw message