Author: adietish
Date: 2010-11-19 06:06:06 -0500 (Fri, 19 Nov 2010)
New Revision: 26750
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java
Log:
[JBIDE-7642] cleanup, extracted method
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java 2010-11-19
11:01:16 UTC (rev 26749)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java 2010-11-19
11:06:06 UTC (rev 26750)
@@ -94,12 +94,11 @@
cloud.replaceInstance(instance);
cloud.removeInstanceJob(instanceId, this);
String hostname = RSEUtils.createHostName(instance);
- Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
- boolean autoConnect =
prefs.getBoolean(IDeltaCloudPreferenceConstants.AUTO_CONNECT_INSTANCE, true);
+ boolean autoConnect = isAutoconnect();
if (hostname != null && hostname.length() > 0 && autoConnect) {
try {
String connectionName = RSEUtils.createConnectionName(instance);
- IHost host = RSEUtils.createHost(connectionName,
RSEUtils.createHostName(instance));
+ IHost host = RSEUtils.createHost(connectionName,
RSEUtils.createHostName(instance), RSEUtils.getSSHOnlySystemType());
RSEUtils.launchRemoteSystemExplorer(instance.getName(), connectionName, host);
} catch (Exception e) {
ErrorUtils.handleError("Error", "Could not launch remote system
explorer for instance \"" + instance.getName() + "\"", e,
getShell());
@@ -113,6 +112,12 @@
pm.done();
return Status.CANCEL_STATUS;
}
+ }
+
+ private boolean isAutoconnect() {
+ Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
+ boolean autoConnect =
prefs.getBoolean(IDeltaCloudPreferenceConstants.AUTO_CONNECT_INSTANCE, true);
+ return autoConnect;
};
};
Show replies by date