Author: jjohnstn
Date: 2010-08-19 13:23:21 -0400 (Thu, 19 Aug 2010)
New Revision: 24305
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
Log:
2010-08-19 Jeff Johnston <jjohnstn(a)redhat.com>
* META-INF/MANIFEST.MF: Add dependency on rse.
* src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties: Add connecting to RSE
message.
* src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (makeActions): Add connect
to
RSE action.
(fillContextMenu): Add connect to RSE action skeleton and enable/disable depending on
instance
state.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-19 17:16:12
UTC (rev 24304)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-08-19 17:23:21
UTC (rev 24305)
@@ -1,3 +1,13 @@
+2010-08-19 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ * META-INF/MANIFEST.MF: Add dependency on rse.
+ * src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties: Add connecting to RSE
+ message.
+ * src/org/jboss/tools/deltacloud/ui/views/InstanceView.java (makeActions): Add connect
to
+ RSE action.
+ (fillContextMenu): Add connect to RSE action skeleton and enable/disable depending on
instance
+ state.
+
2010-08-18 Jeff Johnston <jjohnstn(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/views/CVInstancesCategoryElement.java (listChanged):
Get
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-08-19
17:16:12 UTC (rev 24304)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2010-08-19
17:23:21 UTC (rev 24305)
@@ -10,6 +10,7 @@
org.eclipse.core.runtime,
org.eclipse.ui.views;bundle-version="3.4.1",
org.eclipse.ui.views.properties.tabbed;bundle-version="3.5.0",
- org.jboss.tools.deltacloud.core;bundle-version="1.0.0"
+ org.jboss.tools.deltacloud.core;bundle-version="1.0.0",
+ org.eclipse.rse.core;bundle-version="3.1.1"
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-08-19
17:16:12 UTC (rev 24304)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/CVMessages.properties 2010-08-19
17:23:21 UTC (rev 24305)
@@ -23,6 +23,7 @@
Refresh.label=Refresh View
CreateInstance.label=Launch Instance
DeleteInstance.label=Delete Instance
+ShowInRSE.label=Show in Remote System Explorer
Start.label=Start
Stop.label=Stop
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-08-19
17:16:12 UTC (rev 24304)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-08-19
17:23:21 UTC (rev 24305)
@@ -24,6 +24,10 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.rse.core.IRSESystemType;
+import org.eclipse.rse.core.model.IHost;
+import org.eclipse.rse.core.model.ISystemRegistry;
+import org.eclipse.rse.core.model.SystemStartHere;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -59,6 +63,7 @@
private final static String STOP_LABEL = "Stop.label"; //$NON-NLS-1$
private final static String REBOOT_LABEL = "Reboot.label"; //$NON-NLS-1$
private final static String DESTROY_LABEL = "Destroy.label"; //$NON-NLS-1$
+ private final static String RSE_LABEL = "ShowInRSE.label"; //$NON-NLS-1$
private final static String STARTING_INSTANCE_TITLE =
"StartingInstance.title"; //$NON-NLS-1$
private final static String STARTING_INSTANCE_MSG = "StartingInstance.msg";
//$NON-NLS-1$
private final static String STOPPING_INSTANCE_TITLE =
"StoppingInstance.title"; //$NON-NLS-1$
@@ -84,6 +89,7 @@
private Action stopAction;
private Action destroyAction;
private Action rebootAction;
+ private Action rseAction;
private Map<String, Action> instanceActions;
private Map<String, Job> currentPerformingActions = new HashMap<String,
Job>();
@@ -286,6 +292,13 @@
for (String action : actions) {
instanceActions.get(action).setEnabled(true);
}
+ manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
+ manager.add(rseAction);
+ if (selectedElement.getState().equals(DeltaCloudInstance.RUNNING) ||
+ selectedElement.getState().equals(DeltaCloudInstance.STOPPED))
+ rseAction.setEnabled(true);
+ else
+ rseAction.setEnabled(false);
// Other plug-ins can contribute there actions here
manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
}
@@ -450,6 +463,18 @@
destroyAction.setText(CVMessages.getString(DESTROY_LABEL));
destroyAction.setToolTipText(CVMessages.getString(DESTROY_LABEL));
+ rseAction = new Action() {
+ public void run() {
+ ISelection selection = viewer.getSelection();
+ DeltaCloudInstance instance =
(DeltaCloudInstance)((IStructuredSelection)selection).getFirstElement();
+ String hostname = instance.getHostName();
+ ISystemRegistry registry = SystemStartHere.getSystemRegistry();
+ String connectionName = instance.getName() + " [" + instance.getId() +
"]"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ };
+ rseAction.setText(CVMessages.getString(RSE_LABEL));
+ rseAction.setToolTipText(CVMessages.getString(RSE_LABEL));
+
instanceActions = new HashMap<String, Action>();
instanceActions.put(DeltaCloudInstance.START, startAction);
instanceActions.put(DeltaCloudInstance.STOP, stopAction);
Show replies by date