From 12e47b831dbe3d91a1a63b0a03e82c1a9ac14943 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Mon, 31 Jul 2006 16:43:47 +0000 Subject: [PATCH] Fix bug 150490 - run remote command in a visible shell --- .../META-INF/MANIFEST.MF | 1 + .../samples/ui/actions/ShowJarContents.java | 25 ++++++++----------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/META-INF/MANIFEST.MF b/rse/examples/org.eclipse.rse.examples.tutorial/META-INF/MANIFEST.MF index 8e6977b491b..69857f01af5 100644 --- a/rse/examples/org.eclipse.rse.examples.tutorial/META-INF/MANIFEST.MF +++ b/rse/examples/org.eclipse.rse.examples.tutorial/META-INF/MANIFEST.MF @@ -14,6 +14,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.rse.core, org.eclipse.rse.services, org.eclipse.rse.files.ui, + org.eclipse.rse.shells.ui, org.eclipse.rse.subsystems.files.core, org.eclipse.rse.subsystems.shells.core Eclipse-LazyStart: true diff --git a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java index d68dbdfc5b3..58edd378226 100644 --- a/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java +++ b/rse/examples/org.eclipse.rse.examples.tutorial/src/samples/ui/actions/ShowJarContents.java @@ -16,10 +16,10 @@ package samples.ui.actions; -import org.eclipse.rse.core.subsystems.ISubSystem; +import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.rse.files.ui.actions.SystemAbstractRemoteFilePopupMenuExtensionAction; -import org.eclipse.rse.internal.model.SystemRegistry; import org.eclipse.rse.model.IHost; +import org.eclipse.rse.shells.ui.RemoteCommandHelpers; import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile; import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem; @@ -45,22 +45,17 @@ public class ShowJarContents extends SystemAbstractRemoteFilePopupMenuExtensionA try { runCommand(cmdToRun); } catch(Exception e) { - //TODO: Display exception + MessageDialog.openError(getShell(), e.getClass().getName(), e.getLocalizedMessage()); } } public IRemoteCmdSubSystem getRemoteCmdSubSystem() { //get the Command subsystem associated with the current host IHost myHost = getSubSystem().getHost(); - ISubSystem[] subsys = SystemRegistry.getSystemRegistry().getSubSystems(myHost); + IRemoteCmdSubSystem[] subsys = RemoteCommandHelpers.getCmdSubSystems(myHost); for (int i=0; i