geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r939813 - in /geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui: ./ src/main/java/org/apache/geronimo/st/v30/ui/handlers/ src/main/java/org/apache/geronimo/st/v30/ui/internal/
Date Fri, 30 Apr 2010 20:59:48 GMT
Author: mcconne
Date: Fri Apr 30 20:59:47 2010
New Revision: 939813

URL: http://svn.apache.org/viewvc?rev=939813&view=rev
Log:
Support download of OSGi development tools

Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadOSGi.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.java
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.properties

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml?rev=939813&r1=939812&r2=939813&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml
Fri Apr 30 20:59:47 2010
@@ -322,9 +322,9 @@
         </category>
         <command
               categoryId="org.apache.geronimo.st.v30.ui.commands.category"
-              description="Download tools for OSGi-based applications"
+              description="Download OSGi application development tools"
               id="org.apache.geronimo.st.v30.ui.commands.downloadOSGi"
-              name="Download OSGi Tools">
+              name="Download OSGi Application Development Tools">
         </command>
         <command
               categoryId="org.apache.geronimo.st.v30.ui.commands.category"

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadOSGi.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadOSGi.java?rev=939813&r1=939812&r2=939813&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadOSGi.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadOSGi.java
Fri Apr 30 20:59:47 2010
@@ -16,10 +16,18 @@
  */
 package org.apache.geronimo.st.v30.ui.handlers;
 
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.geronimo.st.v30.ui.internal.Messages;
 import org.apache.geronimo.st.v30.ui.internal.Trace;
 import org.eclipse.core.commands.AbstractHandler;
 import org.eclipse.core.commands.ExecutionEvent;
 import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.browser.IWebBrowser;
+import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
+import org.eclipse.ui.internal.browser.WorkbenchBrowserSupport;
 
 /**
  * Handler to download the OSGi Application Development tools (i.e., Aries free tooling)
@@ -31,22 +39,25 @@ import org.eclipse.core.commands.Executi
  */
 public class DownloadOSGi extends AbstractHandler  {
 
-    @Override
     public Object execute(ExecutionEvent event) throws ExecutionException {
         Trace.tracePoint("Entry", "DownloadOSGi.execute", event);
-        // TODO
-        Trace.tracePoint("Exit", "DownloadOSGi.execute");
-        return null;
-    }
 
-    @Override
-    public boolean isEnabled() {
-        return false;
-    }
+        String url = Messages.DownloadOSGiURL;
+
+        try {
+            int style = IWorkbenchBrowserSupport.AS_EXTERNAL | IWorkbenchBrowserSupport.STATUS;
+            IWebBrowser browser = WorkbenchBrowserSupport.getInstance().createBrowser(style,
"", "", "");
+            browser.openURL(new URL(url));
+        }
+        catch (MalformedURLException e) {
+            e.printStackTrace();
+        }
+        catch (PartInitException e) {
+            e.printStackTrace();
+        }
 
-    @Override
-    public boolean isHandled() {
-        return false;
+        Trace.tracePoint("Exit", "DownloadOSGi.execute");
+        return null;
     }
 
 }

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.java
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.java?rev=939813&r1=939812&r2=939813&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.java
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.java
Fri Apr 30 20:59:47 2010
@@ -93,6 +93,7 @@ public class Messages extends NLS {
     public static String DownloadServerButtonLabel;
     public static String DownloadServerText;
     public static String DownloadServerURL;
+    public static String DownloadOSGiURL;
     public static String jvmWarning;
     public static String installTitle;
     public static String installMessage;

Modified: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.properties
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.properties?rev=939813&r1=939812&r2=939813&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.properties
(original)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/internal/Messages.properties
Fri Apr 30 20:59:47 2010
@@ -398,6 +398,7 @@ gWithJetty=Geronimo with Jetty
 DownloadServerButtonLabel=Download Server
 DownloadServerText=To download the {1} server, click: <br/> {0} .
 DownloadServerURL=http://geronimo.apache.org/downloads.html
+DownloadOSGiURL=http://www.ibm.com/developerworks/rational/downloads/10/rationaldevtoolsforosgiapplications.html
 jvmWarning={0} requires a 5.0+ JDK (J2SE 1.5.0+).
 installTitle=Install Confirmation
 installMessage=\nInstall {0} to {1} ?



Mime
View raw message