Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'rse/plugins/org.eclipse.rse.subsystems.shells.local')
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/.classpath7
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/.cvsignore1
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/.project28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/META-INF/MANIFEST.MF21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/about.html28
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/build.properties18
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommands_obj.gifbin230 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommandslive_obj.gifbin246 -> 0 bytes
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.properties21
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.xml41
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/Activator.java74
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java133
-rw-r--r--rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java159
14 files changed, 0 insertions, 539 deletions
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.classpath b/rse/plugins/org.eclipse.rse.subsystems.shells.local/.classpath
deleted file mode 100644
index ce7393340..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.cvsignore b/rse/plugins/org.eclipse.rse.subsystems.shells.local/.cvsignore
deleted file mode 100644
index ba077a403..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-bin
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.project b/rse/plugins/org.eclipse.rse.subsystems.shells.local/.project
deleted file mode 100644
index 45811d023..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.rse.subsystems.shells.local</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.settings/org.eclipse.jdt.core.prefs b/rse/plugins/org.eclipse.rse.subsystems.shells.local/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index bf0d29c9d..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,8 +0,0 @@
-#Tue Nov 28 18:18:22 CET 2006
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.source=1.3
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/META-INF/MANIFEST.MF b/rse/plugins/org.eclipse.rse.subsystems.shells.local/META-INF/MANIFEST.MF
deleted file mode 100644
index ef40fe100..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,21 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %pluginName
-Bundle-SymbolicName: org.eclipse.rse.subsystems.shells.local;singleton:=true
-Bundle-Version: 1.0.1.qualifier
-Bundle-Activator: org.eclipse.rse.subsystems.shells.local.Activator
-Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.rse.services,
- org.eclipse.rse.services.local,
- org.eclipse.rse.connectorservice.local,
- org.eclipse.rse.shells.ui,
- org.eclipse.rse.subsystems.shells.core,
- org.eclipse.rse.core,
- org.eclipse.rse.ui,
- org.eclipse.rse.subsystems.files.core
-Eclipse-LazyStart: true
-Bundle-Vendor: %providerName
-Export-Package: org.eclipse.rse.subsystems.shells.local
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/about.html b/rse/plugins/org.eclipse.rse.subsystems.shells.local/about.html
deleted file mode 100644
index 460233046..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/about.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
-<title>About</title>
-</head>
-<body lang="EN-US">
-<h2>About This Content</h2>
-
-<p>June 2, 2006</p>
-<h3>License</h3>
-
-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
-indicated below, the Content is provided to you under the terms and conditions of the
-Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
-apply to your use of any object code in the Content. Check the Redistributor's license that was
-provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
-indicated below, the terms and conditions of the EPL still apply to any source code in the Content
-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
-
-</body>
-</html> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/build.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.local/build.properties
deleted file mode 100644
index 34e219f76..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/build.properties
+++ /dev/null
@@ -1,18 +0,0 @@
-###############################################################################
-# Copyright (c) 2005, 2006 IBM Corporation and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# IBM Corporation - initial API and implementation
-###############################################################################
-bin.includes = META-INF/,\
- about.html,\
- icons/,\
- plugin.properties,\
- plugin.xml,\
- .
-source.. = src/
-output.. = bin/
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommands_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommands_obj.gif
deleted file mode 100644
index 061b6e226..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommands_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommandslive_obj.gif b/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommandslive_obj.gif
deleted file mode 100644
index 3faca4474..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/icons/full/obj16/systemcommandslive_obj.gif
+++ /dev/null
Binary files differ
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.properties b/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.properties
deleted file mode 100644
index 1ed70df4a..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.properties
+++ /dev/null
@@ -1,21 +0,0 @@
-################################################################################
-# Copyright (c) 2006 IBM Corporation. All rights reserved.
-# This program and the accompanying materials are made available under the terms
-# of the Eclipse Public License v1.0 which accompanies this distribution, and is
-# available at http://www.eclipse.org/legal/epl-v10.html
-#
-# Initial Contributors:
-# The following IBM employees contributed to the Remote System Explorer
-# component that contains this file: David McKnight, Kushal Munir,
-# Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-# Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-#
-# Contributors:
-# {Name} (company) - description of contribution.
-################################################################################
-
-pluginName = RSE Local Shells
-providerName = Eclipse.org
-
-Shells=Local Shells
-ShellsDescription=This configuration allows you to work with shells and commands on the local system and doesn't require any communication server to be running. \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.xml b/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.xml
deleted file mode 100644
index f03bd883c..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-Copyright (c) 2006 IBM Corporation. All rights reserved.
-This program and the accompanying materials are made available under the terms
-of the Eclipse Public License v1.0 which accompanies this distribution, and is
-available at http://www.eclipse.org/legal/epl-v10.html
-
-Initial Contributors:
-The following IBM employees contributed to the Remote System Explorer
-component that contains this file: David McKnight, Kushal Munir,
-Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
-Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
-
-Contributors:
-{Name} (company) - description of contribution.
--->
-<?eclipse version="3.1"?>
-<plugin>
-
-
-
-<!-- ============================================== -->
-<!-- Define subsystem factories for sample -->
-<!-- ============================================== -->
- <extension
- point="org.eclipse.rse.ui.subsystemConfigurations">
- <configuration
- systemTypes="Local"
- name="%Shells"
- description="%ShellsDescription"
- iconlive="icons/full/obj16/systemcommandslive_obj.gif"
- icon="icons/full/obj16/systemcommands_obj.gif"
- category="shells"
- class="org.eclipse.rse.subsystems.shells.local.LocalShellSubSystemConfiguration"
- vendor="%providerName"
- priority="300"
- id="local.shells">
- </configuration>
- </extension>
-
-</plugin> \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/Activator.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/Activator.java
deleted file mode 100644
index 2228cdeff..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/Activator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.local;
-
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The main plugin class to be used in the desktop.
- */
-public class Activator extends AbstractUIPlugin {
-
- //The shared instance.
- private static Activator plugin;
-
- /**
- * The constructor.
- */
- public Activator() {
- plugin = this;
- }
-
- /**
- * This method is called upon plug-in activation
- */
- public void start(BundleContext context) throws Exception
- {
- super.start(context);
-
- // shells ui needs to be started for proper UI init
- org.eclipse.rse.shells.ui.Activator.getDefault();
- }
-
- /**
- * This method is called when the plug-in is stopped
- */
- public void stop(BundleContext context) throws Exception {
- super.stop(context);
- plugin = null;
- }
-
- /**
- * Returns the shared instance.
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- /**
- * Returns an image descriptor for the image file at the given
- * plug-in relative path.
- *
- * @param path the path
- * @return the image descriptor
- */
- public static ImageDescriptor getImageDescriptor(String path) {
- return AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.rse.subsystems.shells.local", path); //$NON-NLS-1$
- }
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java
deleted file mode 100644
index 80893d396..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/LocalShellSubSystemConfiguration.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.local;
-
-import org.eclipse.rse.connectorservice.local.LocalConnectorService;
-import org.eclipse.rse.connectorservice.local.LocalConnectorServiceManager;
-import org.eclipse.rse.core.model.IHost;
-import org.eclipse.rse.core.subsystems.IConnectorService;
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.services.local.ILocalService;
-import org.eclipse.rse.services.local.shells.LocalShellService;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IShellService;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.IServiceCommandShell;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ShellServiceSubSystemConfiguration;
-import org.eclipse.rse.subsystems.shells.local.model.LocalServiceCommandShell;
-
-
-
-public class LocalShellSubSystemConfiguration extends ShellServiceSubSystemConfiguration
-{
- public LocalShellSubSystemConfiguration()
- {
- super();
- }
-
- /*
- * (non-Javadoc)
- * @see org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystemConfiguration#getCommandSeparator()
- */
- public String getCommandSeparator()
- {
- String os = System.getProperty("os.name").toLowerCase(); //$NON-NLS-1$
- if (os.startsWith("win")) //$NON-NLS-1$
- {
- return "&"; //$NON-NLS-1$
- }
- else
- {
- return ";"; //$NON-NLS-1$
- }
-
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.core.subsystems.SubSystemConfiguration#isFactoryFor(java.lang.Class)
- */
- public boolean isFactoryFor(Class subSystemType) {
- boolean isFor = ShellServiceSubSystem.class.equals(subSystemType);
- return isFor;
- }
-
-
-
- /**
- * Instantiate and return an instance of OUR subystem.
- * Do not populate it yet though!
- */
- public ISubSystem createSubSystemInternal(IHost host)
- {
- LocalConnectorService connectorService = (LocalConnectorService)getConnectorService(host);
- ISubSystem subsys = new ShellServiceSubSystem(host, connectorService, getShellService(host));
- return subsys;
- }
-
-
- /* (non-Javadoc)
- * @see org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystemConfiguration#supportsFilters()
- */
- public boolean supportsFilters() {
- return false;
- }
-
- /**
- * Returns <code>false</code>
- * @see org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteCmdSubSystemConfiguration#supportsSubSystemConnect()
- */
- public boolean supportsSubSystemConnect() {
- return false;
- }
-
- public IConnectorService getConnectorService(IHost host)
- {
- return LocalConnectorServiceManager.getTheLocalSystemManager().getConnectorService(host, getServiceImplType());
- }
-
- public IShellService createShellService(IHost host)
- {
- return new LocalShellService();
- }
-
- public boolean supportsCommands()
- {
- return true;
- }
- public boolean canRunCommand()
- {
- return true;
- }
-
- public void setConnectorService(IHost host, IConnectorService connectorService)
- {
- LocalConnectorServiceManager.getTheLocalSystemManager().setConnectorService(host, getServiceImplType(), connectorService);
- }
-
- public Class getServiceImplType()
- {
- return ILocalService.class;
- }
-
- public IServiceCommandShell createRemoteCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- return new LocalServiceCommandShell(cmdSS, hostShell);
- }
-
-} \ No newline at end of file
diff --git a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java b/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java
deleted file mode 100644
index 1f83279a8..000000000
--- a/rse/plugins/org.eclipse.rse.subsystems.shells.local/src/org/eclipse/rse/subsystems/shells/local/model/LocalServiceCommandShell.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/********************************************************************************
- * Copyright (c) 2006 IBM Corporation. All rights reserved.
- * This program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and is
- * available at http://www.eclipse.org/legal/epl-v10.html
- *
- * Initial Contributors:
- * The following IBM employees contributed to the Remote System Explorer
- * component that contains this file: David McKnight, Kushal Munir,
- * Michael Berger, David Dykstal, Phil Coulthard, Don Yantzi, Eric Simpson,
- * Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
- *
- * Contributors:
- * {Name} (company) - description of contribution.
- ********************************************************************************/
-
-package org.eclipse.rse.subsystems.shells.local.model;
-
-
-import java.io.File;
-
-import org.eclipse.rse.core.subsystems.ISubSystem;
-import org.eclipse.rse.internal.subsystems.shells.servicesubsystem.OutputRefreshJob;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteError;
-import org.eclipse.rse.internal.subsystems.shells.subsystems.RemoteOutput;
-import org.eclipse.rse.services.shells.IHostOutput;
-import org.eclipse.rse.services.shells.IHostShell;
-import org.eclipse.rse.services.shells.IHostShellChangeEvent;
-import org.eclipse.rse.services.shells.ParsedOutput;
-import org.eclipse.rse.services.shells.Patterns;
-import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
-import org.eclipse.rse.subsystems.shells.core.model.ISystemOutputRemoteTypes;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteCmdSubSystem;
-import org.eclipse.rse.subsystems.shells.core.subsystems.IRemoteOutput;
-import org.eclipse.rse.subsystems.shells.core.subsystems.servicesubsystem.ServiceCommandShell;
-
-public class LocalServiceCommandShell extends ServiceCommandShell
-{
- private Patterns _patterns;
- private String _workingDir;
- private IRemoteFileSubSystem _fs;
-
- public LocalServiceCommandShell(IRemoteCmdSubSystem cmdSS, IHostShell hostShell)
- {
- super(cmdSS, hostShell);
- _patterns = new Patterns();
- _patterns.update("cmd"); //$NON-NLS-1$
- ISubSystem[] sses = cmdSS.getHost().getSubSystems();
- for (int i = 0; i < sses.length; i++)
- {
- if (sses[i] instanceof IRemoteFileSubSystem)
- {
- _fs = (IRemoteFileSubSystem)sses[i];
- }
- }
- }
-
- public Object getContext()
- {
- String workingDir = _workingDir;
- if (workingDir != null && workingDir.length() > 0)
- {
- try
- {
- return _fs.getRemoteFileObject(workingDir);
- }
- catch (Exception e)
- {
- }
- }
- return null;
-
- }
-
-
-
- public void shellOutputChanged(IHostShellChangeEvent event)
- {
- IHostOutput[] lines = event.getLines();
- IRemoteOutput[] outputs = new IRemoteOutput[lines.length];
- for (int i = 0; i < lines.length; i++)
- {
- String line = lines[i].getString();
- ParsedOutput parsedMsg = null;
-
- try
- {
- parsedMsg = _patterns.matchLine(line);
- }
- catch (Throwable e)
- {
- e.printStackTrace();
- }
-
- RemoteOutput output = null;
- String type = "stdout"; //$NON-NLS-1$
- if (parsedMsg != null)
- {
- type = parsedMsg.type;
- }
- else
- {
- //System.out.println("parsedMsg = null");
- }
- if (event.isError())
- {
- output = new RemoteError(this, type);
- }
- else
- {
- output = new RemoteOutput(this, type);
- }
-
- output.setText(line);
- if (parsedMsg != null)
- {
- String file = parsedMsg.file;
- if (type.equals(ISystemOutputRemoteTypes.TYPE_PROMPT))
- {
- _workingDir = file;
- output.setAbsolutePath(_workingDir);
- }
- /*
- else if (type.equals(ISystemOutputRemoteTypes.TYPE_FILE) || type.equals(ISystemOutputRemoteTypes.TYPE_DIRECTORY))
- {
- output.setAbsolutePath(parsedMsg.file);
- }
- */
- else
- {
- output.setAbsolutePath(_workingDir + File.separatorChar + file);
- }
- }
-
- addOutput(output);
- outputs[i] = output;
- }
- //if (_lastRefreshJob == null || _lastRefreshJob.isComplete())
- {
- _lastRefreshJob = new OutputRefreshJob(this, outputs, false);
- _lastRefreshJob.schedule();
- }
- /*
- else
- {
- _lastRefreshJob.addOutputs(outputs);
- _lastRefreshJob.schedule();
- }
- */
- }
-
- public void writeToShell(String cmd)
- {
- _patterns.update(cmd);
- super.writeToShell(cmd);
-
- }
-
-} \ No newline at end of file

Back to the top