1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-04 06:45:43 +02:00

Remove SSH Service dependency on UI. Update Manifest. Polish About.

This commit is contained in:
Martin Oberhuber 2006-05-17 07:48:14 +00:00
parent e3f0ff096d
commit 9a4a39a9ed
9 changed files with 42 additions and 33 deletions

View file

@ -1,17 +1,14 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.rse.services.ssh;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.eclipse.rse.services.ssh.Activator
Bundle-Vendor: Eclipse.org
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.rse.services,
com.jcraft.jsch,
org.eclipse.team.cvs.ui,
org.eclipse.team.cvs.ssh2
com.jcraft.jsch;bundle-version="[0.1.28,2.0.0)"
Eclipse-LazyStart: true
Export-Package: org.eclipse.rse.services.ssh,
org.eclipse.rse.services.ssh.files,

View file

@ -24,5 +24,9 @@ provided with the Content. If no such license exists, contact the Redistributor
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</a>.</p>
<h2>Trademarks</h2>
<p>SSH is a registered trademark and Secure Shell is a trademark of
SSH Communications Security Corp (<a href="http://www.ssh.com">http://www.ssh.com</a>)</p>
</body>
</html>

View file

@ -1,12 +1,11 @@
bin.includes = about.html,\
icons/,\
META-INF/,\
plugin.properties,\
plugin.xml,\
readme.txt,\
bin.includes = META-INF/,\
.,\
about.html,\
about.ini,\
about.mappings,\
about.properties,\
plugin.properties,\
readme.txt,\
eclipse32.gif
src.includes = readme.txt
jars.compile.order = .

View file

@ -9,4 +9,6 @@
# Martin Oberhuber - initial API and implementation
################################################################################
plugin.name = RSE SSH Services
pluginName = RSE SSH Services
providerName = Eclipse.org

View file

@ -11,15 +11,14 @@
package org.eclipse.rse.services.ssh;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;
/**
* The main plugin class to be used in the desktop.
*/
public class Activator extends AbstractUIPlugin {
public class Activator extends Plugin {
//The shared instance.
private static Activator plugin;
@ -28,6 +27,7 @@ public class Activator extends AbstractUIPlugin {
* The constructor.
*/
public Activator() {
super();
plugin = this;
}
@ -56,15 +56,4 @@ public class Activator extends AbstractUIPlugin {
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.services.ssh", path);
}
}

View file

@ -133,11 +133,21 @@ public class SftpFileService extends AbstractFileService implements IFileService
return (IHostFile[])results.toArray(new IHostFile[results.size()]);
}
private static SftpHostFile makeHostFile(String parentPath, String fileName, SftpATTRS attrs) {
private SftpHostFile makeHostFile(String parentPath, String fileName, SftpATTRS attrs) {
SftpHostFile node = new SftpHostFile(parentPath, fileName, attrs.isDir(), false, attrs.isLink(), attrs.getMTime(), attrs.getSize());
if (attrs.getExtended()!=null) {
node.setExtendedData(attrs.getExtended());
}
//TODO remove comments as soon as jsch-0.1.29 is available
//if (node.isLink()) {
// try {
// //Note: readlink() is supported only with jsch-0.1.29 or higher.
// //By catching the exception we remain backward compatible.
// String linkTarget=fChannelSftp.readlink(node.getAbsolutePath());
// node.setLinkTarget(linkTarget);
// //TODO: Classify the type of resource linked to as file, folder or broken link
// } catch(Exception e) {}
//}
return node;
}

View file

@ -32,6 +32,7 @@ public class SftpHostFile implements IHostFile {
private long fLastModified = 0;
private long fSize = 0;
private boolean fIsLink = false;
private String fLinkTarget;
private String[] fExtended = null;
//TODO just re-use or extend FTPHostFile instead of copying here?
@ -126,6 +127,14 @@ public class SftpHostFile implements IHostFile {
return fIsLink;
}
public void setLinkTarget(String linkTarget) {
fLinkTarget = linkTarget;
}
public String getLinkTarget() {
return fLinkTarget;
}
/** Extended data: name:value pairs */
public void setExtendedData(String[] extended) {
fExtended = extended;
@ -141,6 +150,9 @@ public class SftpHostFile implements IHostFile {
if (isLink()) {
//TODO: read symbolic link target and its type to provide e.g. "symbolic link(directory):/export4/opt
result = "symbolic link"; //$NON-NLS-1$
if (fLinkTarget!=null) {
result += "(unknown):" + fLinkTarget; //$NON-NLS-1$
}
} else if (isFile()) {
result = "file"; //$NON-NLS-1$
} else if (isDirectory()) {

View file

@ -20,13 +20,11 @@ import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import org.eclipse.rse.services.shells.AbstractHostShell;
import org.eclipse.rse.services.shells.IHostShellOutputReader;
import org.eclipse.rse.services.ssh.ISshSessionProvider;
import com.jcraft.jsch.Channel;
import com.jcraft.jsch.Session;
/**
* A Shell subsystem for SSH.

View file

@ -23,8 +23,6 @@ import org.eclipse.rse.services.shells.IShellService;
import org.eclipse.rse.services.ssh.ISshService;
import org.eclipse.rse.services.ssh.ISshSessionProvider;
import com.jcraft.jsch.Session;
/**
* A Shell Services for ssh.
* Adapted from LocalShellService.