Author: adietish
Date: 2011-02-14 12:41:58 -0500 (Mon, 14 Feb 2011)
New Revision: 29146
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateServerFromRSEJob.java
Log:
[JBIDE-8294] cleanup, moved #findRemoteFileSubsys to RSEUtils
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-02-14
17:35:59 UTC (rev 29145)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-02-14
17:41:58 UTC (rev 29146)
@@ -29,6 +29,7 @@
import org.eclipse.rse.core.model.ISystemRegistry;
import org.eclipse.rse.core.model.SystemStartHere;
import org.eclipse.rse.core.subsystems.IConnectorService;
+import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.services.clientserver.messages.SystemOperationFailedException;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.swt.widgets.Display;
@@ -36,7 +37,6 @@
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.integration.DeltaCloudIntegrationPlugin;
import org.jboss.tools.deltacloud.integration.Messages;
-import org.jboss.tools.deltacloud.integration.wizard.CreateServerFromRSEJob;
import org.jboss.tools.internal.deltacloud.ui.utils.WorkbenchUtils;
import com.jcraft.jsch.JSchException;
@@ -272,7 +272,15 @@
}
public static IRemoteFileSubSystem findRemoteFileSubSystem(IHost host) {
- return CreateServerFromRSEJob.findRemoteFileSubSystem(host);
+ if (host == null) {
+ return null;
+ }
+ ISubSystem[] systems = RSECorePlugin.getTheSystemRegistry().getSubSystems(host);
+ for (int i = 0; i < systems.length; i++) {
+ if (systems[i] instanceof IRemoteFileSubSystem) {
+ return (IRemoteFileSubSystem) systems[i];
+ }
+ }
+ return null;
}
-
}
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateServerFromRSEJob.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateServerFromRSEJob.java 2011-02-14
17:35:59 UTC (rev 29145)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/CreateServerFromRSEJob.java 2011-02-14
17:41:58 UTC (rev 29146)
@@ -29,9 +29,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.wizard.WizardDialog;
-import org.eclipse.rse.core.RSECorePlugin;
import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.ISubSystem;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
import org.eclipse.swt.SWT;
@@ -118,24 +116,6 @@
return server;
}
- // TODO move to util class
- public static IRemoteFileSubSystem findRemoteFileSubSystem(IHost host) {
- if (host == null) {
- return null;
- }
- ISubSystem[] systems = RSECorePlugin.getTheSystemRegistry().getSubSystems(host);
- for (int i = 0; i < systems.length; i++) {
- if (systems[i] instanceof IRemoteFileSubSystem) {
- return (IRemoteFileSubSystem) systems[i];
- }
- }
- return null;
- }
-
- protected IRemoteFileSubSystem findRemoteFileSubSystem() {
- return findRemoteFileSubSystem(host);
- }
-
protected String loadRemoteFileData(String path, IRemoteFileSubSystem system) throws
CoreException {
Throwable e;
IPath p = new Path(path);
@@ -204,7 +184,7 @@
}
protected void createServerCheckRemoteDetails(IProgressMonitor monitor) throws
CoreException {
- IRemoteFileSubSystem system = findRemoteFileSubSystem();
+ IRemoteFileSubSystem system =
org.jboss.tools.deltacloud.integration.rse.util.RSEUtils.findRemoteFileSubSystem(host);
if (system != null) {
ensureIsConnected(system, monitor);
Show replies by date