|
From: <bh...@us...> - 2006-09-12 23:17:02
|
Revision: 181
http://svn.sourceforge.net/cishell/?rev=181&view=rev
Author: bh2
Date: 2006-09-12 16:16:48 -0700 (Tue, 12 Sep 2006)
Log Message:
-----------
added the update manager and manage configuration
features to the cishell gui
Modified Paths:
--------------
trunk/clients/gui/org.cishell.reference.gui.brand.cishell/META-INF/MANIFEST.MF
trunk/clients/gui/org.cishell.reference.gui.brand.cishell/plugin.xml
trunk/clients/gui/org.cishell.reference.gui.workspace/src/org/cishell/reference/gui/workspace/ApplicationActionBarAdvisor.java
trunk/clients/gui/org.cishell.reference.gui.workspace/src/org/cishell/reference/gui/workspace/CIShellApplication.java
Added Paths:
-----------
trunk/clients/gui/org.cishell.reference.gui.brand.cishell/icons/findandinstall.gif
trunk/clients/gui/org.cishell.reference.gui.brand.cishell/icons/manage.gif
trunk/clients/gui/org.cishell.reference.gui.brand.cishell/src/org/cishell/reference/gui/brand/cishell/ManageConfigurationAction.java
trunk/clients/gui/org.cishell.reference.gui.brand.cishell/src/org/cishell/reference/gui/brand/cishell/UpdateAction.java
Modified: trunk/clients/gui/org.cishell.reference.gui.brand.cishell/META-INF/MANIFEST.MF
===================================================================
--- trunk/clients/gui/org.cishell.reference.gui.brand.cishell/META-INF/MANIFEST.MF 2006-09-12 21:03:09 UTC (rev 180)
+++ trunk/clients/gui/org.cishell.reference.gui.brand.cishell/META-INF/MANIFEST.MF 2006-09-12 23:16:48 UTC (rev 181)
@@ -10,5 +10,6 @@
org.cishell.reference.gui.datamanager,
org.cishell.reference.gui.log,
org.cishell.reference.gui.workspace,
- org.cishell.reference.gui.menumanager
+ org.cishell.reference.gui.menumanager,
+ org.eclipse.update.ui
Eclipse-LazyStart: true
Added: trunk/clients/gui/org.cishell.reference.gui.brand.cishell/icons/findandinstall.gif
===================================================================
(Binary files differ)
Property changes on: trunk/clients/gui/org.cishell.reference.gui.brand.cishell/icons/findandinstall.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/clients/gui/org.cishell.reference.gui.brand.cishell/icons/manage.gif
===================================================================
(Binary files differ)
Property changes on: trunk/clients/gui/org.cishell.reference.gui.brand.cishell/icons/manage.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/clients/gui/org.cishell.reference.gui.brand.cishell/plugin.xml
===================================================================
--- trunk/clients/gui/org.cishell.reference.gui.brand.cishell/plugin.xml 2006-09-12 21:03:09 UTC (rev 180)
+++ trunk/clients/gui/org.cishell.reference.gui.brand.cishell/plugin.xml 2006-09-12 23:16:48 UTC (rev 181)
@@ -41,4 +41,26 @@
<extension point="org.eclipse.ui.startup">
<startup/>
</extension>
+ <extension
+ point="org.eclipse.ui.actionSets">
+ <actionSet
+ id="org.cishell.reference.gui.management"
+ label="Manager Action Set"
+ visible="true">
+ <action
+ class="org.cishell.reference.gui.brand.cishell.ManageConfigurationAction"
+ icon="icons/manage.gif"
+ id="org.cishell.reference.gui.configuration.manager.action"
+ label="Manage Configuration..."
+ menubarPath="help/end"
+ style="push"/>
+ <action
+ class="org.cishell.reference.gui.brand.cishell.UpdateAction"
+ icon="icons/findandinstall.gif"
+ id="org.cishell.reference.gui.update.manager.action"
+ label="Update..."
+ menubarPath="help/end"
+ style="push"/>
+ </actionSet>
+ </extension>
</plugin>
Added: trunk/clients/gui/org.cishell.reference.gui.brand.cishell/src/org/cishell/reference/gui/brand/cishell/ManageConfigurationAction.java
===================================================================
--- trunk/clients/gui/org.cishell.reference.gui.brand.cishell/src/org/cishell/reference/gui/brand/cishell/ManageConfigurationAction.java (rev 0)
+++ trunk/clients/gui/org.cishell.reference.gui.brand.cishell/src/org/cishell/reference/gui/brand/cishell/ManageConfigurationAction.java 2006-09-12 23:16:48 UTC (rev 181)
@@ -0,0 +1,35 @@
+/* ****************************************************************************
+ * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework.
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Apache License v2.0 which accompanies
+ * this distribution, and is available at:
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *
+ * Created on Sep 12, 2006 at Indiana University.
+ *
+ * Contributors:
+ * Indiana University -
+ * ***************************************************************************/
+package org.cishell.reference.gui.brand.cishell;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.update.ui.UpdateManagerUI;
+
+public class ManageConfigurationAction implements IWorkbenchWindowActionDelegate {
+ Shell s;
+
+ public void run(IAction action) {
+ UpdateManagerUI.openConfigurationManager(s);
+ }
+
+ public void init(IWorkbenchWindow window) {
+ s = window.getShell();
+ }
+ public void dispose() {}
+ public void selectionChanged(IAction action, ISelection selection) {}
+}
Added: trunk/clients/gui/org.cishell.reference.gui.brand.cishell/src/org/cishell/reference/gui/brand/cishell/UpdateAction.java
===================================================================
--- trunk/clients/gui/org.cishell.reference.gui.brand.cishell/src/org/cishell/reference/gui/brand/cishell/UpdateAction.java (rev 0)
+++ trunk/clients/gui/org.cishell.reference.gui.brand.cishell/src/org/cishell/reference/gui/brand/cishell/UpdateAction.java 2006-09-12 23:16:48 UTC (rev 181)
@@ -0,0 +1,35 @@
+/* ****************************************************************************
+ * CIShell: Cyberinfrastructure Shell, An Algorithm Integration Framework.
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Apache License v2.0 which accompanies
+ * this distribution, and is available at:
+ * http://www.apache.org/licenses/LICENSE-2.0.html
+ *
+ * Created on Sep 12, 2006 at Indiana University.
+ *
+ * Contributors:
+ * Indiana University -
+ * ***************************************************************************/
+package org.cishell.reference.gui.brand.cishell;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.update.ui.UpdateManagerUI;
+
+public class UpdateAction implements IWorkbenchWindowActionDelegate {
+ Shell s;
+
+ public void run(IAction action) {
+ UpdateManagerUI.openInstaller(s);
+ }
+
+ public void init(IWorkbenchWindow window) {
+ s = window.getShell();
+ }
+ public void dispose() {}
+ public void selectionChanged(IAction action, ISelection selection) {}
+}
Modified: trunk/clients/gui/org.cishell.reference.gui.workspace/src/org/cishell/reference/gui/workspace/ApplicationActionBarAdvisor.java
===================================================================
--- trunk/clients/gui/org.cishell.reference.gui.workspace/src/org/cishell/reference/gui/workspace/ApplicationActionBarAdvisor.java 2006-09-12 21:03:09 UTC (rev 180)
+++ trunk/clients/gui/org.cishell.reference.gui.workspace/src/org/cishell/reference/gui/workspace/ApplicationActionBarAdvisor.java 2006-09-12 23:16:48 UTC (rev 181)
@@ -3,6 +3,7 @@
import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
+import org.eclipse.jface.action.Separator;
import org.eclipse.ui.IWorkbenchActionConstants;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.actions.ActionFactory;
@@ -21,20 +22,19 @@
// them in the fill methods. This ensures that the actions aren't recreated
// when fillActionBars is called with FILL_PROXY.
private IWorkbenchAction exitAction;
- private IWorkbenchAction aboutAction;
-
+ private IWorkbenchAction aboutAction;
public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
super(configurer);
}
protected void makeActions(final IWorkbenchWindow window) {
+ CIShellApplication.setWorkbench(window);
// Creates the actions and registers them.
// Registering is needed to ensure that key bindings work.
// The corresponding commands keybindings are defined in the plugin.xml
// file. Registering also provides automatic disposal of the actions
// when the window is closed.
-
exitAction = ActionFactory.QUIT.create(window);
register(exitAction);
@@ -60,6 +60,7 @@
fileMenu.add(exitAction);
//Help menu items
+ helpMenu.add(new Separator());
helpMenu.add(aboutAction);
}
Modified: trunk/clients/gui/org.cishell.reference.gui.workspace/src/org/cishell/reference/gui/workspace/CIShellApplication.java
===================================================================
--- trunk/clients/gui/org.cishell.reference.gui.workspace/src/org/cishell/reference/gui/workspace/CIShellApplication.java 2006-09-12 21:03:09 UTC (rev 180)
+++ trunk/clients/gui/org.cishell.reference.gui.workspace/src/org/cishell/reference/gui/workspace/CIShellApplication.java 2006-09-12 23:16:48 UTC (rev 181)
@@ -3,6 +3,7 @@
import org.eclipse.core.runtime.IPlatformRunnable;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
/**
@@ -10,6 +11,7 @@
*/
public class CIShellApplication implements IPlatformRunnable {
private static IMenuManager menuManager;
+ private static IWorkbenchWindow workbench;
/**
* @see org.eclipse.core.runtime.IPlatformRunnable#run(java.lang.Object)
@@ -27,11 +29,19 @@
}
}
- public static void setMenuManager(IMenuManager menuManager) {
+ protected static void setMenuManager(IMenuManager menuManager) {
CIShellApplication.menuManager = menuManager;
}
public static IMenuManager getMenuManager() {
return menuManager;
}
+
+ protected static void setWorkbench(IWorkbenchWindow workbench) {
+ CIShellApplication.workbench = workbench;
+ }
+
+ public static IWorkbenchWindow getWorkbench() {
+ return CIShellApplication.workbench;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|