Author: jjohnstn
Date: 2010-10-13 18:29:35 -0400 (Wed, 13 Oct 2010)
New Revision: 25813
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
Log:
2010-10-13 Jeff Johnston <jjohnstn(a)redhat.com>
[JBIDE-7194]
* src/org/jboss/tools/deltacloud/ui/views/InstanceView.java: For RSE
action, add code to open the Remote Systems view. Do this in the case
where the connection is already in place.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-13 20:50:15
UTC (rev 25812)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-13 22:29:35
UTC (rev 25813)
@@ -1,3 +1,10 @@
+2010-10-13 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ [JBIDE-7194]
+ * src/org/jboss/tools/deltacloud/ui/views/InstanceView.java: For RSE
+ action, add code to open the Remote Systems view. Do this in the case
+ where the connection is already in place.
+
2010-10-13 André Dietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java: [JBIDE-7326] implemented
dialog to disconnect multiple cloud connections.
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-10-13
20:50:15 UTC (rev 25812)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-10-13
22:29:35 UTC (rev 25813)
@@ -64,6 +64,7 @@
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;
import org.jboss.tools.deltacloud.core.DeltaCloud;
@@ -508,6 +509,17 @@
protected IStatus run(IProgressMonitor monitor) {
try {
service.connect(monitor);
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.rse.ui.view.systemView");
+ } catch (PartInitException e) {
+ // TODO Auto-generated catch block
+ Activator.log(e);
+ }
+ }
+ });
return Status.OK_STATUS;
} catch(Exception e) {
return Status.CANCEL_STATUS;
@@ -517,6 +529,20 @@
connect.setUser(true);
connect.schedule();
}
+ } else {
+ // Assume failure is due to name already in use
+ Display.getDefault().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.rse.ui.view.systemView");
+ } catch (PartInitException e) {
+ Activator.log(e);
+ }
+ }
+
+ });
}
} catch (Exception e) {
// TODO Auto-generated catch block