geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcco...@apache.org
Subject svn commit: r936597 - in /geronimo/devtools/eclipse-plugin/trunk: plugins/org.apache.geronimo.st.v30.ui/ plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/gero...
Date Thu, 22 Apr 2010 02:38:18 GMT
Author: mcconne
Date: Thu Apr 22 02:38:18 2010
New Revision: 936597

URL: http://svn.apache.org/viewvc?rev=936597&view=rev
Log:
GERONIMODEVTOOLS-614 Isolate all downloads into a single menu group, which also includes the
OSGi tools

Added:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/Activator.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadGeronimo.java
  (with props)
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadOSGi.java
  (with props)
Modified:
    geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/plugin.xml
    geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml

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=936597&r1=936596&r2=936597&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
Thu Apr 22 02:38:18 2010
@@ -51,15 +51,93 @@
             class="org.apache.geronimo.st.v30.ui.sections.ServerPluginSection">
         </section>
     </extension>
-    <extension
-          point="org.eclipse.debug.core.statusHandlers">
+    
+    <extension point="org.eclipse.debug.core.statusHandlers">
        <statusHandler
-	   id="com.example.ExampleIdentifier"
-	   class="com.example.ExampleStatusHandler"
-	   plugin="com.example.ExamplePluginId"
-	   code="123">
-  </statusHandler>
+            id="com.example.ExampleIdentifier"
+            class="com.example.ExampleStatusHandler"
+            plugin="com.example.ExamplePluginId"
+            code="123">
+        </statusHandler>
+    </extension>
+    
+    
+    <!-- 
+     |
+     | Step 1. Create a commands category for the various download commands
+     |
+     -->
+    <extension point="org.eclipse.ui.commands">
+        <category 
+              description="Isolate all the various GEP downloads into a single menu"
+              id="org.apache.geronimo.st.v30.ui.commands.category"
+              name="Downloads">
+        </category>
+        <command
+              categoryId="org.apache.geronimo.st.v30.ui.commands.category"
+              description="Download tools for OSGi-based applications"
+              id="org.apache.geronimo.st.v30.ui.commands.downloadOSGi"
+              name="Download OSGi Tools">
+        </command>
+        <command
+              categoryId="org.apache.geronimo.st.v30.ui.commands.category"
+              description="Download Geronimo Servers"
+              id="org.apache.geronimo.st.v30.ui.commands.downloadGeronimo"
+              name="Download Geronimo Servers">
+        </command>
+    </extension>
+    
+
+    <!-- 
+     |
+     | Step 2. Create a Downloads menu for the download commands defined above
+     |
+     -->
+    <extension point="org.eclipse.ui.menus">
+        <menuContribution
+              locationURI="menu:org.eclipse.ui.main.menu?after=additions">
+            <menu
+                  icon="icons/obj16/littleG.gif"
+                  id="org.apache.geronimo.st.v30.ui.downloadsMenu"
+                  label="Downloads"
+                  mnemonic="D">
+                <command
+                      commandId="org.apache.geronimo.st.v30.ui.commands.downloadOSGi"
+                      icon="icons/obj16/littleOSGi.gif"
+                      id="org.apache.geronimo.st.v30.ui.menus.downloadOSGi"
+                      mnemonic="O"
+                      style="push">
+                </command>
+                <separator
+                      name="org.apache.geronimo.st.v30.ui.separator"
+                      visible="true">
+                </separator>
+                <command
+                      commandId="org.apache.geronimo.st.v30.ui.commands.downloadGeronimo"
+                      icon="icons/obj16/littleG.gif"
+                      id="org.apache.geronimo.st.v30.ui.menus.downloadGeronimo"
+                      mnemonic="G"
+                      style="push">
+                </command>
+            </menu>
+        </menuContribution>
+    </extension>
+
 
+    <!-- 
+     |
+     | Step 3. Create the handlers for the commands defined above
+     |
+     -->
+    <extension point="org.eclipse.ui.handlers">
+        <handler
+              class="org.apache.geronimo.st.v30.ui.handlers.DownloadOSGi"
+              commandId="org.apache.geronimo.st.v30.ui.commands.downloadOSGi">
+        </handler>
+        <handler
+              class="org.apache.geronimo.st.v30.ui.handlers.DownloadGeronimo"
+              commandId="org.apache.geronimo.st.v30.ui.commands.downloadGeronimo">
+        </handler>
     </extension>
 
 </plugin>

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/Activator.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/Activator.java?rev=936597&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/Activator.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/Activator.java
Thu Apr 22 02:38:18 2010
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ *
+ * @version $Rev$ $Date$
+ */
+public class Activator extends AbstractUIPlugin {
+
+    // The plug-in ID
+    public static final String PLUGIN_ID = "org.apache.geronimo.st.v30.ui";
+
+    // The shared instance
+    private static Activator plugin;
+
+    /**
+     * The constructor
+     */
+    public Activator() {
+        plugin = this;
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+     */
+    public void start(BundleContext context) throws Exception {
+        super.start(context);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+     */
+    public void stop(BundleContext context) throws Exception {
+        plugin = null;
+        super.stop(context);
+    }
+
+    /**
+     * Returns the shared instance
+     * 
+     * @return the shared instance
+     */
+    public static Activator getDefault() {
+        return plugin;
+    }
+
+    /**
+     * Returns an image descriptor for the image file at the given plug-in
+     * relative path.
+     * 
+     * @param path
+     *            the path
+     * @return the image descriptor
+     */
+    public static ImageDescriptor getImageDescriptor(String path) {
+        return AbstractUIPlugin.imageDescriptorFromPlugin("org.apache.geronimo.st.v30.ui",
path);
+    }
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/Activator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadGeronimo.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/DownloadGeronimo.java?rev=936597&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadGeronimo.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadGeronimo.java
Thu Apr 22 02:38:18 2010
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.handlers;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.geronimo.st.core.internal.Trace;
+import org.apache.geronimo.st.ui.internal.Messages;
+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 A Geronimo server
+ * 
+ * @see org.eclipse.core.commands.IHandler
+ * @see org.eclipse.core.commands.AbstractHandler
+ *
+ * @version $Rev$ $Date$
+ */
+public class DownloadGeronimo extends AbstractHandler {
+
+    public Object execute(ExecutionEvent event) throws ExecutionException {
+        Trace.tracePoint("ENTRY", "DownloadGeronimo.execute", event);
+
+        String url = Messages.DownloadServerURL;
+
+        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();
+        }
+
+        Trace.tracePoint("EXIT ", "DownloadGeronimo.execute");
+        return null;
+    }
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadGeronimo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 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=936597&view=auto
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadOSGi.java
(added)
+++ geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadOSGi.java
Thu Apr 22 02:38:18 2010
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.geronimo.st.v30.ui.handlers;
+
+import org.apache.geronimo.st.core.internal.Trace;
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+
+/**
+ * Handler to download the OSGi Application Development tools (i.e., Aries free tooling)
+ * 
+ * @see org.eclipse.core.commands.IHandler
+ * @see org.eclipse.core.commands.AbstractHandler
+ * 
+ * @version $Rev$ $Date$
+ */
+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;
+    }
+
+    @Override
+    public boolean isHandled() {
+        return false;
+    }
+
+}

Propchange: geronimo/devtools/eclipse-plugin/trunk/plugins/org.apache.geronimo.st.v30.ui/src/main/java/org/apache/geronimo/st/v30/ui/handlers/DownloadOSGi.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml?rev=936597&r1=936596&r2=936597&view=diff
==============================================================================
--- geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml (original)
+++ geronimo/devtools/eclipse-plugin/trunk/testsuite/plugins/pom.xml Thu Apr 22 02:38:18 2010
@@ -26,7 +26,7 @@
     <artifactId>testsuite-plugins</artifactId>
     <version>3.0.0</version>
     <packaging>pom</packaging>
-    <name>${artifactId}</name>
+    <name>Geronimo Eclipse Plugin :: Testsuite :: Plugins</name>
         
     <parent>
         <groupId>org.apache.geronimo.devtools</groupId>



Mime
View raw message