mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Bug 559514 - Cleanup codebase
Remove useless non-javadoc comments. Change-Id: Ib08d8ad1df5a28a228c2b4b68520e88a0339cf43 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
This commit is contained in:
parent
f0b41feeff
commit
7ef3f914d6
51 changed files with 0 additions and 1522 deletions
|
@ -200,9 +200,6 @@ public class TerminalConsolePage extends Page implements IAdaptable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public <T> T getAdapter(Class<T> adapter) {
|
public <T> T getAdapter(Class<T> adapter) {
|
||||||
|
|
|
@ -46,134 +46,65 @@ public abstract class AbstractRemoteProcessBuilder implements IRemoteProcessBuil
|
||||||
this(connection, Arrays.asList(command));
|
this(connection, Arrays.asList(command));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessBuilder#command()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> command() {
|
public List<String> command() {
|
||||||
return fCommandArgs;
|
return fCommandArgs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteProcessBuilder#command(java.util.List)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcessBuilder command(List<String> command) {
|
public IRemoteProcessBuilder command(List<String> command) {
|
||||||
fCommandArgs = command;
|
fCommandArgs = command;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteProcessBuilder#command(java.lang.String
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcessBuilder command(String... command) {
|
public IRemoteProcessBuilder command(String... command) {
|
||||||
fCommandArgs = Arrays.asList(command);
|
fCommandArgs = Arrays.asList(command);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessBuilder#directory()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore directory() {
|
public IFileStore directory() {
|
||||||
return fRemoteDir;
|
return fRemoteDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteProcessBuilder#directory(org.eclipse
|
|
||||||
* .core.filesystem.IFileStore)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcessBuilder directory(IFileStore directory) {
|
public IRemoteProcessBuilder directory(IFileStore directory) {
|
||||||
fRemoteDir = directory;
|
fRemoteDir = directory;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessBuilder#environment()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public abstract Map<String, String> environment();
|
public abstract Map<String, String> environment();
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteProcessBuilder#getSupportedFlags()
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public abstract int getSupportedFlags();
|
public abstract int getSupportedFlags();
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteProcessBuilder#redirectErrorStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean redirectErrorStream() {
|
public boolean redirectErrorStream() {
|
||||||
return fRedirectErrorStream;
|
return fRedirectErrorStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteProcessBuilder#redirectErrorStream
|
|
||||||
* (boolean)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcessBuilder redirectErrorStream(boolean redirectErrorStream) {
|
public IRemoteProcessBuilder redirectErrorStream(boolean redirectErrorStream) {
|
||||||
this.fRedirectErrorStream = redirectErrorStream;
|
this.fRedirectErrorStream = redirectErrorStream;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessBuilder#start()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcess start() throws IOException {
|
public IRemoteProcess start() throws IOException {
|
||||||
return start(NONE);
|
return start(NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessBuilder#start(int)
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public abstract IRemoteProcess start(int flags) throws IOException;
|
public abstract IRemoteProcess start(int flags) throws IOException;
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Object#toString()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
StringBuilder res = new StringBuilder();
|
StringBuilder res = new StringBuilder();
|
||||||
|
@ -184,11 +115,6 @@ public abstract class AbstractRemoteProcessBuilder implements IRemoteProcessBuil
|
||||||
return res.toString();
|
return res.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessBuilder#getRemoteConnection()
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -27,62 +27,32 @@ public class RemoteProcessAdapter extends Process {
|
||||||
fProcess = process;
|
fProcess = process;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#destroy()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
fProcess.destroy();
|
fProcess.destroy();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#exitValue()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int exitValue() {
|
public int exitValue() {
|
||||||
return fProcess.exitValue();
|
return fProcess.exitValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getErrorStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getErrorStream() {
|
public InputStream getErrorStream() {
|
||||||
return fProcess.getErrorStream();
|
return fProcess.getErrorStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getInputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getInputStream() {
|
public InputStream getInputStream() {
|
||||||
return fProcess.getInputStream();
|
return fProcess.getInputStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getOutputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public OutputStream getOutputStream() {
|
public OutputStream getOutputStream() {
|
||||||
return fProcess.getOutputStream();
|
return fProcess.getOutputStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#waitFor()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int waitFor() throws InterruptedException {
|
public int waitFor() throws InterruptedException {
|
||||||
return fProcess.waitFor();
|
return fProcess.waitFor();
|
||||||
|
|
|
@ -52,21 +52,11 @@ public class RemoteConnection implements IRemoteConnection {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getConnectionType()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnectionType getConnectionType() {
|
public IRemoteConnectionType getConnectionType() {
|
||||||
return connectionType;
|
return connectionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getService(java.lang.Class)
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public <T extends Service> T getService(Class<T> service) {
|
public <T extends Service> T getService(Class<T> service) {
|
||||||
|
@ -81,21 +71,11 @@ public class RemoteConnection implements IRemoteConnection {
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#hasService(java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends Service> boolean hasService(Class<T> service) {
|
public <T extends Service> boolean hasService(Class<T> service) {
|
||||||
return servicesMap.get(service.getName()) != null || connectionType.hasConnectionService(service);
|
return servicesMap.get(service.getName()) != null || connectionType.hasConnectionService(service);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getName()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
|
@ -146,21 +126,11 @@ public class RemoteConnection implements IRemoteConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getAttribute(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getAttribute(String key) {
|
public String getAttribute(String key) {
|
||||||
return getPreferences().get(key, EMPTY_STRING);
|
return getPreferences().get(key, EMPTY_STRING);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getSecureAttribute(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getSecureAttribute(String key) {
|
public String getSecureAttribute(String key) {
|
||||||
try {
|
try {
|
||||||
|
@ -171,21 +141,11 @@ public class RemoteConnection implements IRemoteConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getWorkingCopy()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnectionWorkingCopy getWorkingCopy() {
|
public IRemoteConnectionWorkingCopy getWorkingCopy() {
|
||||||
return new RemoteConnectionWorkingCopy(this);
|
return new RemoteConnectionWorkingCopy(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getProperty(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getProperty(String key) {
|
public String getProperty(String key) {
|
||||||
IRemoteConnectionPropertyService propertyService = getService(IRemoteConnectionPropertyService.class);
|
IRemoteConnectionPropertyService propertyService = getService(IRemoteConnectionPropertyService.class);
|
||||||
|
@ -196,11 +156,6 @@ public class RemoteConnection implements IRemoteConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#open(org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void open(IProgressMonitor monitor) throws RemoteConnectionException {
|
public void open(IProgressMonitor monitor) throws RemoteConnectionException {
|
||||||
IRemoteConnectionControlService controlService = getService(IRemoteConnectionControlService.class);
|
IRemoteConnectionControlService controlService = getService(IRemoteConnectionControlService.class);
|
||||||
|
@ -209,11 +164,6 @@ public class RemoteConnection implements IRemoteConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#close()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
IRemoteConnectionControlService controlService = getService(IRemoteConnectionControlService.class);
|
IRemoteConnectionControlService controlService = getService(IRemoteConnectionControlService.class);
|
||||||
|
@ -222,11 +172,6 @@ public class RemoteConnection implements IRemoteConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#isOpen()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpen() {
|
public boolean isOpen() {
|
||||||
IRemoteConnectionControlService controlService = getService(IRemoteConnectionControlService.class);
|
IRemoteConnectionControlService controlService = getService(IRemoteConnectionControlService.class);
|
||||||
|
@ -238,36 +183,16 @@ public class RemoteConnection implements IRemoteConnection {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteConnection#addConnectionChangeListener(org.eclipse.remote.core.IRemoteConnectionChangeListener
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void addConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
public void addConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
||||||
fListeners.add(listener);
|
fListeners.add(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteConnection#removeConnectionChangeListener(org.eclipse.remote.core.
|
|
||||||
* IRemoteConnectionChangeListener
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void removeConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
public void removeConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
||||||
fListeners.remove(listener);
|
fListeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#fireConnectionChangeEvent(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void fireConnectionChangeEvent(final int type) {
|
public void fireConnectionChangeEvent(final int type) {
|
||||||
RemoteConnectionChangeEvent event = new RemoteConnectionChangeEvent(this, type);
|
RemoteConnectionChangeEvent event = new RemoteConnectionChangeEvent(this, type);
|
||||||
|
@ -278,11 +203,6 @@ public class RemoteConnection implements IRemoteConnection {
|
||||||
connectionType.getRemoteServicesManager().fireRemoteConnectionChangeEvent(event);
|
connectionType.getRemoteServicesManager().fireRemoteConnectionChangeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Object#toString()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return name + " - " + connectionType.getName(); //$NON-NLS-1$
|
return name + " - " + connectionType.getName(); //$NON-NLS-1$
|
||||||
|
|
|
@ -87,41 +87,21 @@ public class RemoteConnectionType implements IRemoteConnectionType {
|
||||||
return remoteServicesManager.getSecurePreferenceNode().node(id);
|
return remoteServicesManager.getSecurePreferenceNode().node(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#getRemoteServicesManager()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteServicesManager getRemoteServicesManager() {
|
public IRemoteServicesManager getRemoteServicesManager() {
|
||||||
return remoteServicesManager;
|
return remoteServicesManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#getId()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#getName()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#getScheme()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getScheme() {
|
public String getScheme() {
|
||||||
return scheme;
|
return scheme;
|
||||||
|
@ -142,11 +122,6 @@ public class RemoteConnectionType implements IRemoteConnectionType {
|
||||||
return canRemove;
|
return canRemove;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#getService(java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends Service> T getService(Class<T> service) {
|
public <T extends Service> T getService(Class<T> service) {
|
||||||
synchronized (serviceDefinitionMap) {
|
synchronized (serviceDefinitionMap) {
|
||||||
|
@ -177,11 +152,6 @@ public class RemoteConnectionType implements IRemoteConnectionType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#hasService(java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends Service> boolean hasService(Class<T> service) {
|
public <T extends Service> boolean hasService(Class<T> service) {
|
||||||
synchronized (serviceDefinitionMap) {
|
synchronized (serviceDefinitionMap) {
|
||||||
|
@ -224,11 +194,6 @@ public class RemoteConnectionType implements IRemoteConnectionType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#hasConnectionService(java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends IRemoteConnection.Service> boolean hasConnectionService(Class<T> service) {
|
public <T extends IRemoteConnection.Service> boolean hasConnectionService(Class<T> service) {
|
||||||
synchronized (connectionServiceDefinitionMap) {
|
synchronized (connectionServiceDefinitionMap) {
|
||||||
|
@ -270,11 +235,6 @@ public class RemoteConnectionType implements IRemoteConnectionType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#hasProcessService(java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends IRemoteProcess.Service> boolean hasProcessService(Class<T> service) {
|
public <T extends IRemoteProcess.Service> boolean hasProcessService(Class<T> service) {
|
||||||
synchronized (processServiceDefinitionMap) {
|
synchronized (processServiceDefinitionMap) {
|
||||||
|
@ -327,11 +287,6 @@ public class RemoteConnectionType implements IRemoteConnectionType {
|
||||||
remoteServicesManager.fireRemoteConnectionChangeEvent(event);
|
remoteServicesManager.fireRemoteConnectionChangeEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#getConnection(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnection getConnection(String name) {
|
public IRemoteConnection getConnection(String name) {
|
||||||
synchronized (connections) {
|
synchronized (connections) {
|
||||||
|
@ -357,11 +312,6 @@ public class RemoteConnectionType implements IRemoteConnectionType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#getConnections()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<IRemoteConnection> getConnections() {
|
public List<IRemoteConnection> getConnections() {
|
||||||
synchronized (connections) {
|
synchronized (connections) {
|
||||||
|
@ -369,11 +319,6 @@ public class RemoteConnectionType implements IRemoteConnectionType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#newConnection(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnectionWorkingCopy newConnection(String name) throws RemoteConnectionException {
|
public IRemoteConnectionWorkingCopy newConnection(String name) throws RemoteConnectionException {
|
||||||
synchronized (connections) {
|
synchronized (connections) {
|
||||||
|
@ -396,11 +341,6 @@ public class RemoteConnectionType implements IRemoteConnectionType {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionType#removeConnection(org.eclipse.remote.core.IRemoteConnection)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void removeConnection(IRemoteConnection connection) throws RemoteConnectionException {
|
public void removeConnection(IRemoteConnection connection) throws RemoteConnectionException {
|
||||||
synchronized (connections) {
|
synchronized (connections) {
|
||||||
|
|
|
@ -55,11 +55,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
this.connectionType = (RemoteConnectionType) original.getConnectionType();
|
this.connectionType = (RemoteConnectionType) original.getConnectionType();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getName()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
if (newName != null) {
|
if (newName != null) {
|
||||||
|
@ -73,11 +68,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionWorkingCopy#setName(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
// set it only if it's changed
|
// set it only if it's changed
|
||||||
|
@ -86,11 +76,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getAttribute(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getAttribute(String key) {
|
public String getAttribute(String key) {
|
||||||
String value = newAttributes.get(key);
|
String value = newAttributes.get(key);
|
||||||
|
@ -105,11 +90,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
return RemoteConnection.EMPTY_STRING;
|
return RemoteConnection.EMPTY_STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionWorkingCopy#setAttribute(java.lang.String, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setAttribute(String key, String value) {
|
public void setAttribute(String key, String value) {
|
||||||
// set only if it's changed or value is null
|
// set only if it's changed or value is null
|
||||||
|
@ -118,11 +98,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getSecureAttribute(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getSecureAttribute(String key) {
|
public String getSecureAttribute(String key) {
|
||||||
String value = newSecureAttributes.get(key);
|
String value = newSecureAttributes.get(key);
|
||||||
|
@ -137,11 +112,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
return RemoteConnection.EMPTY_STRING;
|
return RemoteConnection.EMPTY_STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionWorkingCopy#setSecureAttribute(java.lang.String, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setSecureAttribute(String key, String value) {
|
public void setSecureAttribute(String key, String value) {
|
||||||
// set only if it's changed or value is null
|
// set only if it's changed or value is null
|
||||||
|
@ -150,13 +120,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteConnection#addConnectionChangeListener(org.eclipse.remote.core.IRemoteConnectionChangeListener
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void addConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
public void addConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
||||||
if (original != null) {
|
if (original != null) {
|
||||||
|
@ -166,13 +129,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteConnection#removeConnectionChangeListener(org.eclipse.remote.core.IRemoteConnectionChangeListener
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void removeConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
public void removeConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
||||||
if (original != null) {
|
if (original != null) {
|
||||||
|
@ -182,11 +138,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#fireConnectionChangeEvent(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void fireConnectionChangeEvent(int type) {
|
public void fireConnectionChangeEvent(int type) {
|
||||||
if (original != null && type != RemoteConnectionChangeEvent.CONNECTION_RENAMED) {
|
if (original != null && type != RemoteConnectionChangeEvent.CONNECTION_RENAMED) {
|
||||||
|
@ -200,41 +151,21 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getConnectionType()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnectionType getConnectionType() {
|
public IRemoteConnectionType getConnectionType() {
|
||||||
return connectionType;
|
return connectionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getWorkingCopy()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnectionWorkingCopy getWorkingCopy() {
|
public IRemoteConnectionWorkingCopy getWorkingCopy() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getService(java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends Service> T getService(Class<T> service) {
|
public <T extends Service> T getService(Class<T> service) {
|
||||||
return connectionType.getConnectionService(this, service);
|
return connectionType.getConnectionService(this, service);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#hasService(java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public <T extends Service> boolean hasService(Class<T> service) {
|
public <T extends Service> boolean hasService(Class<T> service) {
|
||||||
if (original != null) {
|
if (original != null) {
|
||||||
|
@ -244,31 +175,16 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionWorkingCopy#getOriginal()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnection getOriginal() {
|
public IRemoteConnection getOriginal() {
|
||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionWorkingCopy#isDirty()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isDirty() {
|
public boolean isDirty() {
|
||||||
return newName != null || !newAttributes.isEmpty() || !newSecureAttributes.isEmpty();
|
return newName != null || !newAttributes.isEmpty() || !newSecureAttributes.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionWorkingCopy#save()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnection save() throws RemoteConnectionException {
|
public IRemoteConnection save() throws RemoteConnectionException {
|
||||||
if (newName != null && original != null) {
|
if (newName != null && original != null) {
|
||||||
|
@ -336,11 +252,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
return original;
|
return original;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#open(org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void open(IProgressMonitor monitor) throws RemoteConnectionException {
|
public void open(IProgressMonitor monitor) throws RemoteConnectionException {
|
||||||
if (original != null) {
|
if (original != null) {
|
||||||
|
@ -354,11 +265,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#close()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
if (original != null) {
|
if (original != null) {
|
||||||
|
@ -372,11 +278,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#isOpen()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpen() {
|
public boolean isOpen() {
|
||||||
if (original != null) {
|
if (original != null) {
|
||||||
|
@ -392,11 +293,6 @@ public class RemoteConnectionWorkingCopy implements IRemoteConnectionWorkingCopy
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection#getProperty(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getProperty(String key) {
|
public String getProperty(String key) {
|
||||||
if (original != null) {
|
if (original != null) {
|
||||||
|
|
|
@ -100,11 +100,6 @@ public class RemoteCorePlugin extends Plugin {
|
||||||
public RemoteCorePlugin() {
|
public RemoteCorePlugin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
super.start(context);
|
||||||
|
@ -135,11 +130,6 @@ public class RemoteCorePlugin extends Plugin {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
Preferences.savePreferences();
|
Preferences.savePreferences();
|
||||||
|
|
|
@ -50,11 +50,6 @@ public class RemoteDebugOptions implements DebugOptionsListener {
|
||||||
context.registerService(DebugOptionsListener.class.getName(), this, props);
|
context.registerService(DebugOptionsListener.class.getName(), this, props);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.osgi.service.debug.DebugOptionsListener#optionsChanged(org.eclipse.osgi.service.debug.DebugOptions)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void optionsChanged(DebugOptions options) {
|
public void optionsChanged(DebugOptions options) {
|
||||||
fDebugOptions = options;
|
fDebugOptions = options;
|
||||||
|
|
|
@ -36,11 +36,6 @@ public class RemoteProcess extends Process implements IRemoteProcess {
|
||||||
this.builder = builder;
|
this.builder = builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#destroy()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
||||||
|
@ -49,11 +44,6 @@ public class RemoteProcess extends Process implements IRemoteProcess {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#exitValue()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int exitValue() {
|
public int exitValue() {
|
||||||
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
||||||
|
@ -63,11 +53,6 @@ public class RemoteProcess extends Process implements IRemoteProcess {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getErrorStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getErrorStream() {
|
public InputStream getErrorStream() {
|
||||||
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
||||||
|
@ -77,11 +62,6 @@ public class RemoteProcess extends Process implements IRemoteProcess {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getInputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getInputStream() {
|
public InputStream getInputStream() {
|
||||||
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
||||||
|
@ -91,11 +71,6 @@ public class RemoteProcess extends Process implements IRemoteProcess {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getOutputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public OutputStream getOutputStream() {
|
public OutputStream getOutputStream() {
|
||||||
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
||||||
|
@ -130,11 +105,6 @@ public class RemoteProcess extends Process implements IRemoteProcess {
|
||||||
return servicesMap.get(service.getName()) != null || getConnectionType().hasProcessService(service);
|
return servicesMap.get(service.getName()) != null || getConnectionType().hasProcessService(service);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#waitFor()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int waitFor() throws InterruptedException {
|
public int waitFor() throws InterruptedException {
|
||||||
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
||||||
|
@ -144,11 +114,6 @@ public class RemoteProcess extends Process implements IRemoteProcess {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcess#isCompleted()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCompleted() {
|
public boolean isCompleted() {
|
||||||
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
IRemoteProcessControlService controlService = getService(IRemoteProcessControlService.class);
|
||||||
|
@ -161,21 +126,11 @@ public class RemoteProcess extends Process implements IRemoteProcess {
|
||||||
/**
|
/**
|
||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcess#getRemoteConnection()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnection getRemoteConnection() {
|
public IRemoteConnection getRemoteConnection() {
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcess#getProcessBuilder()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcessBuilder getProcessBuilder() {
|
public IRemoteProcessBuilder getProcessBuilder() {
|
||||||
return builder;
|
return builder;
|
||||||
|
|
|
@ -110,54 +110,29 @@ public class RemoteServicesManager implements IRemoteServicesManager {
|
||||||
return SecurePreferencesFactory.getDefault().node(RemoteCorePlugin.getUniqueIdentifier()).node("connections"); //$NON-NLS-1$
|
return SecurePreferencesFactory.getDefault().node(RemoteCorePlugin.getUniqueIdentifier()).node("connections"); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#getConnectionType(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnectionType getConnectionType(String id) {
|
public IRemoteConnectionType getConnectionType(String id) {
|
||||||
init();
|
init();
|
||||||
return connectionTypeMap.get(id);
|
return connectionTypeMap.get(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#getConnectionType(java.net.URI)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnectionType getConnectionType(URI uri) {
|
public IRemoteConnectionType getConnectionType(URI uri) {
|
||||||
init();
|
init();
|
||||||
return schemeMap.get(uri.getScheme());
|
return schemeMap.get(uri.getScheme());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#getLocalConnectionType()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnectionType getLocalConnectionType() {
|
public IRemoteConnectionType getLocalConnectionType() {
|
||||||
return getConnectionType(LOCAL_SERVICES_ID);
|
return getConnectionType(LOCAL_SERVICES_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#getAllConnectionTypes()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<IRemoteConnectionType> getAllConnectionTypes() {
|
public List<IRemoteConnectionType> getAllConnectionTypes() {
|
||||||
init();
|
init();
|
||||||
return new ArrayList<IRemoteConnectionType>(connectionTypeMap.values());
|
return new ArrayList<IRemoteConnectionType>(connectionTypeMap.values());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#getConnectionTypesSupporting(java.lang.Class[])
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
@SafeVarargs
|
@SafeVarargs
|
||||||
public final List<IRemoteConnectionType> getConnectionTypesSupporting(Class<? extends IRemoteConnection.Service>... services) {
|
public final List<IRemoteConnectionType> getConnectionTypesSupporting(Class<? extends IRemoteConnection.Service>... services) {
|
||||||
|
@ -173,11 +148,6 @@ public class RemoteServicesManager implements IRemoteServicesManager {
|
||||||
return connTypes;
|
return connTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#getConnectionTypesByService(java.lang.Class[])
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
@SafeVarargs
|
@SafeVarargs
|
||||||
public final List<IRemoteConnectionType> getConnectionTypesByService(Class<? extends IRemoteConnectionType.Service>... services) {
|
public final List<IRemoteConnectionType> getConnectionTypesByService(Class<? extends IRemoteConnectionType.Service>... services) {
|
||||||
|
@ -193,11 +163,6 @@ public class RemoteServicesManager implements IRemoteServicesManager {
|
||||||
return connTypes;
|
return connTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#getRemoteConnectionTypes()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<IRemoteConnectionType> getRemoteConnectionTypes() {
|
public List<IRemoteConnectionType> getRemoteConnectionTypes() {
|
||||||
init();
|
init();
|
||||||
|
@ -211,11 +176,6 @@ public class RemoteServicesManager implements IRemoteServicesManager {
|
||||||
return connTypes;
|
return connTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#getAllRemoteConnections()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<IRemoteConnection> getAllRemoteConnections() {
|
public List<IRemoteConnection> getAllRemoteConnections() {
|
||||||
List<IRemoteConnection> connections = new ArrayList<>();
|
List<IRemoteConnection> connections = new ArrayList<>();
|
||||||
|
@ -225,12 +185,6 @@ public class RemoteServicesManager implements IRemoteServicesManager {
|
||||||
return connections;
|
return connections;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#addRemoteConnectionChangeListener(org.eclipse.remote.core.
|
|
||||||
* IRemoteConnectionChangeListener)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void addRemoteConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
public void addRemoteConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
||||||
synchronized (listeners) {
|
synchronized (listeners) {
|
||||||
|
@ -238,12 +192,6 @@ public class RemoteServicesManager implements IRemoteServicesManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#removeRemoteConnectionChangeListener(org.eclipse.remote.core.
|
|
||||||
* IRemoteConnectionChangeListener)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void removeRemoteConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
public void removeRemoteConnectionChangeListener(IRemoteConnectionChangeListener listener) {
|
||||||
synchronized (listeners) {
|
synchronized (listeners) {
|
||||||
|
@ -251,12 +199,6 @@ public class RemoteServicesManager implements IRemoteServicesManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteServicesManager#fireRemoteConnectionChangeEvent(org.eclipse.remote.core.
|
|
||||||
* RemoteConnectionChangeEvent)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void fireRemoteConnectionChangeEvent(RemoteConnectionChangeEvent event) {
|
public void fireRemoteConnectionChangeEvent(RemoteConnectionChangeEvent event) {
|
||||||
List<IRemoteConnectionChangeListener> iListeners;
|
List<IRemoteConnectionChangeListener> iListeners;
|
||||||
|
|
|
@ -36,12 +36,6 @@ public class LocalProcess implements IRemoteProcessControlService, IRemoteProces
|
||||||
private volatile boolean isCompleted;
|
private volatile boolean isCompleted;
|
||||||
|
|
||||||
public static class Factory implements IRemoteProcess.Service.Factory {
|
public static class Factory implements IRemoteProcess.Service.Factory {
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcess.Service.Factory#getService(org.eclipse.remote.core.IRemoteProcess,
|
|
||||||
* java.lang.Class)
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public <T extends IRemoteProcess.Service> T getService(IRemoteProcess remoteProcess, Class<T> service) {
|
public <T extends IRemoteProcess.Service> T getService(IRemoteProcess remoteProcess, Class<T> service) {
|
||||||
|
@ -161,71 +155,36 @@ public class LocalProcess implements IRemoteProcessControlService, IRemoteProces
|
||||||
completedChecker.start();
|
completedChecker.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#destroy()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
localProcess.destroy();
|
localProcess.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#exitValue()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int exitValue() {
|
public int exitValue() {
|
||||||
return localProcess.exitValue();
|
return localProcess.exitValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getErrorStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getErrorStream() {
|
public InputStream getErrorStream() {
|
||||||
return procStderr;
|
return procStderr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getInputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getInputStream() {
|
public InputStream getInputStream() {
|
||||||
return procStdout;
|
return procStdout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getOutputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public OutputStream getOutputStream() {
|
public OutputStream getOutputStream() {
|
||||||
return localProcess.getOutputStream();
|
return localProcess.getOutputStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#waitFor()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int waitFor() throws InterruptedException {
|
public int waitFor() throws InterruptedException {
|
||||||
return localProcess.waitFor();
|
return localProcess.waitFor();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.RemoteProcess#isCompleted()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCompleted() {
|
public boolean isCompleted() {
|
||||||
return isCompleted;
|
return isCompleted;
|
||||||
|
|
|
@ -59,11 +59,6 @@ public class LocalProcessBuilder extends AbstractRemoteProcessBuilder {
|
||||||
this(connection, Arrays.asList(command));
|
this(connection, Arrays.asList(command));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.AbstractRemoteProcessBuilder#directory()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore directory() {
|
public IFileStore directory() {
|
||||||
IFileStore dir = super.directory();
|
IFileStore dir = super.directory();
|
||||||
|
@ -77,34 +72,16 @@ public class LocalProcessBuilder extends AbstractRemoteProcessBuilder {
|
||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.AbstractRemoteProcessBuilder#environment()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> environment() {
|
public Map<String, String> environment() {
|
||||||
return fRemoteEnv;
|
return fRemoteEnv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.AbstractRemoteProcessBuilder#getSupportedFlags
|
|
||||||
* ()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getSupportedFlags() {
|
public int getSupportedFlags() {
|
||||||
return NONE;
|
return NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessBuilder#start(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcess start(int flags) throws IOException {
|
public IRemoteProcess start(int flags) throws IOException {
|
||||||
String commandArray[] = command().toArray(new String[0]);
|
String commandArray[] = command().toArray(new String[0]);
|
||||||
|
|
|
@ -24,41 +24,21 @@ public class LocalResource implements IRemoteResource {
|
||||||
fResource = resource;
|
fResource = resource;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteResource#getDefaultLocationURI(org.eclipse.core.resources.IResource)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public URI getActiveLocationURI() {
|
public URI getActiveLocationURI() {
|
||||||
return fResource.getLocationURI();
|
return fResource.getLocationURI();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteResource#getResource()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IResource getResource() {
|
public IResource getResource() {
|
||||||
return fResource;
|
return fResource;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteResource#refresh(org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void refresh(IProgressMonitor monitor) throws CoreException {
|
public void refresh(IProgressMonitor monitor) throws CoreException {
|
||||||
fResource.refreshLocal(IResource.DEPTH_INFINITE, monitor);
|
fResource.refreshLocal(IResource.DEPTH_INFINITE, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteResource#setResource(org.eclipse.core.resources.IResource)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setResource(IResource resource) {
|
public void setResource(IResource resource) {
|
||||||
fResource = resource;
|
fResource = resource;
|
||||||
|
|
|
@ -94,13 +94,6 @@ public class Activator extends Plugin {
|
||||||
return fJSchService;
|
return fJSchService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
super.start(context);
|
||||||
|
@ -109,13 +102,6 @@ public class Activator extends Plugin {
|
||||||
fJSchService = context.getService(reference);
|
fJSchService = context.getService(reference);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
plugin = null;
|
plugin = null;
|
||||||
|
|
|
@ -34,12 +34,6 @@ public class JSchCommandShellService implements IRemoteCommandShellService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Factory implements IRemoteConnection.Service.Factory {
|
public static class Factory implements IRemoteConnection.Service.Factory {
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection.Service.Factory#getService(org.eclipse.remote.core.IRemoteConnection,
|
|
||||||
* java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public <T extends IRemoteConnection.Service> T getService(IRemoteConnection connection, Class<T> service) {
|
public <T extends IRemoteConnection.Service> T getService(IRemoteConnection connection, Class<T> service) {
|
||||||
|
|
|
@ -106,23 +106,12 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection.Service#getRemoteConnection()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnection getRemoteConnection() {
|
public IRemoteConnection getRemoteConnection() {
|
||||||
return fRemoteConnection;
|
return fRemoteConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Factory implements IRemoteConnection.Service.Factory {
|
public static class Factory implements IRemoteConnection.Service.Factory {
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection.Service.Factory#getService(org.eclipse.remote.core.IRemoteConnection,
|
|
||||||
* java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public <T extends IRemoteConnection.Service> T getService(IRemoteConnection connection, Class<T> service) {
|
public <T extends IRemoteConnection.Service> T getService(IRemoteConnection connection, Class<T> service) {
|
||||||
|
@ -206,11 +195,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
fSessions.clear();
|
fSessions.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionControlService#close()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void close() {
|
public synchronized void close() {
|
||||||
cleanup();
|
cleanup();
|
||||||
|
@ -233,11 +217,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
return exec.setCommand(cmd).getResult(monitor).trim();
|
return exec.setCommand(cmd).getResult(monitor).trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemotePortForwardingService#forwardLocalPort(int, java.lang.String, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void forwardLocalPort(int localPort, String fwdAddress, int fwdPort) throws RemoteConnectionException {
|
public void forwardLocalPort(int localPort, String fwdAddress, int fwdPort) throws RemoteConnectionException {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
|
@ -250,12 +229,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemotePortForwardingService#forwardLocalPort(java.lang.String, int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int forwardLocalPort(String fwdAddress, int fwdPort, IProgressMonitor monitor) throws RemoteConnectionException {
|
public int forwardLocalPort(String fwdAddress, int fwdPort, IProgressMonitor monitor) throws RemoteConnectionException {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
|
@ -286,11 +259,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemotePortForwardingService#forwardRemotePort(int, java.lang.String, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void forwardRemotePort(int remotePort, String fwdAddress, int fwdPort) throws RemoteConnectionException {
|
public void forwardRemotePort(int remotePort, String fwdAddress, int fwdPort) throws RemoteConnectionException {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
|
@ -303,12 +271,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemotePortForwardingService#forwardRemotePort(java.lang.String, int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int forwardRemotePort(String fwdAddress, int fwdPort, IProgressMonitor monitor) throws RemoteConnectionException {
|
public int forwardRemotePort(String fwdAddress, int fwdPort, IProgressMonitor monitor) throws RemoteConnectionException {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
|
@ -338,11 +300,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionHostService#getHostname()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getHostname() {
|
public String getHostname() {
|
||||||
return fRemoteConnection.getAttribute(ADDRESS_ATTR);
|
return fRemoteConnection.getAttribute(ADDRESS_ATTR);
|
||||||
|
@ -363,21 +320,11 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessService#getEnv()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> getEnv() {
|
public Map<String, String> getEnv() {
|
||||||
return Collections.unmodifiableMap(fEnv);
|
return Collections.unmodifiableMap(fEnv);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessService#getEnv(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getEnv(String name) {
|
public String getEnv(String name) {
|
||||||
return getEnv().get(name);
|
return getEnv().get(name);
|
||||||
|
@ -423,22 +370,12 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
return fRemoteConnection.getSecureAttribute(PASSWORD_ATTR);
|
return fRemoteConnection.getSecureAttribute(PASSWORD_ATTR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionHostService#getPort()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getPort() {
|
public int getPort() {
|
||||||
String portStr = fRemoteConnection.getAttribute(PORT_ATTR);
|
String portStr = fRemoteConnection.getAttribute(PORT_ATTR);
|
||||||
return !portStr.isEmpty() ? Integer.parseInt(portStr) : DEFAULT_PORT;
|
return !portStr.isEmpty() ? Integer.parseInt(portStr) : DEFAULT_PORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessService#getProcessBuilder(java.util.List)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcessBuilder getProcessBuilder(List<String> command) {
|
public IRemoteProcessBuilder getProcessBuilder(List<String> command) {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
|
@ -447,11 +384,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
return new JSchProcessBuilder(getRemoteConnection(), command);
|
return new JSchProcessBuilder(getRemoteConnection(), command);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessService#getProcessBuilder(java.lang.String[])
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcessBuilder getProcessBuilder(String... command) {
|
public IRemoteProcessBuilder getProcessBuilder(String... command) {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
|
@ -460,11 +392,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
return new JSchProcessBuilder(getRemoteConnection(), command);
|
return new JSchProcessBuilder(getRemoteConnection(), command);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionPropertyService#getProperty(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getProperty(String key) {
|
public String getProperty(String key) {
|
||||||
return fProperties.get(key);
|
return fProperties.get(key);
|
||||||
|
@ -564,21 +491,11 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
return !str.isEmpty() ? Integer.parseInt(str) : DEFAULT_TIMEOUT;
|
return !str.isEmpty() ? Integer.parseInt(str) : DEFAULT_TIMEOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionHostService#getUsername()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
return fRemoteConnection.getAttribute(USERNAME_ATTR);
|
return fRemoteConnection.getAttribute(USERNAME_ATTR);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessService#getWorkingDirectory()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getWorkingDirectory() {
|
public String getWorkingDirectory() {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
|
@ -608,11 +525,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
return hasOpenSession;
|
return hasOpenSession;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionControlService#isOpen()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpen() {
|
public boolean isOpen() {
|
||||||
return hasOpenSession() && isFullySetup;
|
return hasOpenSession() && isFullySetup;
|
||||||
|
@ -804,11 +716,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionControlService#open(org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void open(IProgressMonitor monitor) throws RemoteConnectionException {
|
public void open(IProgressMonitor monitor) throws RemoteConnectionException {
|
||||||
open(monitor, true);
|
open(monitor, true);
|
||||||
|
@ -871,11 +778,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemotePortForwardingService#removeLocalPortForwarding(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void removeLocalPortForwarding(int port) throws RemoteConnectionException {
|
public void removeLocalPortForwarding(int port) throws RemoteConnectionException {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
|
@ -888,11 +790,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemotePortForwardingService#removeRemotePortForwarding(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void removeRemotePortForwarding(int port) throws RemoteConnectionException {
|
public void removeRemotePortForwarding(int port) throws RemoteConnectionException {
|
||||||
if (!isOpen()) {
|
if (!isOpen()) {
|
||||||
|
@ -905,11 +802,6 @@ public class JSchConnection implements IRemoteConnectionControlService, IRemoteC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessService#setWorkingDirectory(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setWorkingDirectory(String path) {
|
public void setWorkingDirectory(String path) {
|
||||||
if (RemoteServicesUtils.posixPath(path).isAbsolute()) {
|
if (RemoteServicesUtils.posixPath(path).isAbsolute()) {
|
||||||
|
|
|
@ -58,21 +58,11 @@ public class JSchConnectionProxyFactory {
|
||||||
this.monitor = monitor;
|
this.monitor = monitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.Proxy#close()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
process.destroy();
|
process.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.Proxy#connect(com.jcraft.jsch.SocketFactory, java.lang.String, int, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void connect(SocketFactory socket_factory, String host, int port, int timeout) throws IOException {
|
public void connect(SocketFactory socket_factory, String host, int port, int timeout) throws IOException {
|
||||||
assert !connectCalled : "connect should only be called once"; //$NON-NLS-1$
|
assert !connectCalled : "connect should only be called once"; //$NON-NLS-1$
|
||||||
|
@ -167,31 +157,16 @@ public class JSchConnectionProxyFactory {
|
||||||
}.start();
|
}.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.Proxy#getInputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getInputStream() {
|
public InputStream getInputStream() {
|
||||||
return process.getInputStream();
|
return process.getInputStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.Proxy#getOutputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public OutputStream getOutputStream() {
|
public OutputStream getOutputStream() {
|
||||||
return process.getOutputStream();
|
return process.getOutputStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.Proxy#getSocket()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Socket getSocket() {
|
public Socket getSocket() {
|
||||||
return null;
|
return null;
|
||||||
|
@ -212,21 +187,11 @@ public class JSchConnectionProxyFactory {
|
||||||
this.monitor = monitor;
|
this.monitor = monitor;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.Proxy#close()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
channel.disconnect();
|
channel.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.Proxy#connect(com.jcraft.jsch.SocketFactory, java.lang.String, int, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void connect(SocketFactory socket_factory, String host, int port, int timeout) throws Exception {
|
public void connect(SocketFactory socket_factory, String host, int port, int timeout) throws Exception {
|
||||||
assert !connectCalled : "connect should only be called once"; //$NON-NLS-1$
|
assert !connectCalled : "connect should only be called once"; //$NON-NLS-1$
|
||||||
|
@ -244,11 +209,6 @@ public class JSchConnectionProxyFactory {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.Proxy#getInputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getInputStream() {
|
public InputStream getInputStream() {
|
||||||
try {
|
try {
|
||||||
|
@ -259,11 +219,6 @@ public class JSchConnectionProxyFactory {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.Proxy#getOutputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public OutputStream getOutputStream() {
|
public OutputStream getOutputStream() {
|
||||||
try {
|
try {
|
||||||
|
@ -274,11 +229,6 @@ public class JSchConnectionProxyFactory {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.Proxy#getSocket()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Socket getSocket() {
|
public Socket getSocket() {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -68,53 +68,27 @@ public class JSchFileSystem extends FileSystem {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.IFileSystem#attributes()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int attributes() {
|
public int attributes() {
|
||||||
// Attributes supported by JSch IFileService
|
// Attributes supported by JSch IFileService
|
||||||
return EFS.ATTRIBUTE_READ_ONLY | EFS.ATTRIBUTE_EXECUTABLE | EFS.ATTRIBUTE_SYMLINK | EFS.ATTRIBUTE_LINK_TARGET;
|
return EFS.ATTRIBUTE_READ_ONLY | EFS.ATTRIBUTE_EXECUTABLE | EFS.ATTRIBUTE_SYMLINK | EFS.ATTRIBUTE_LINK_TARGET;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileSystem#canDelete()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canDelete() {
|
public boolean canDelete() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileSystem#canWrite()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canWrite() {
|
public boolean canWrite() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileSystem#getStore(org.eclipse.core.runtime.IPath)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore getStore(IPath path) {
|
public IFileStore getStore(IPath path) {
|
||||||
return EFS.getNullFileSystem().getStore(path);
|
return EFS.getNullFileSystem().getStore(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.core.filesystem.provider.FileSystem#getStore(java.net.URI)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore getStore(URI uri) {
|
public IFileStore getStore(URI uri) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -44,12 +44,6 @@ public class JSchProcess implements IRemoteProcessControlService, IRemoteProcess
|
||||||
private Thread fStderrReader;
|
private Thread fStderrReader;
|
||||||
|
|
||||||
public static class Factory implements IRemoteProcess.Service.Factory {
|
public static class Factory implements IRemoteProcess.Service.Factory {
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcess.Service.Factory#getService(org.eclipse.remote.core.IRemoteProcess,
|
|
||||||
* java.lang.Class)
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public <T extends IRemoteProcess.Service> T getService(IRemoteProcess remoteProcess, Class<T> service) {
|
public <T extends IRemoteProcess.Service> T getService(IRemoteProcess remoteProcess, Class<T> service) {
|
||||||
|
@ -146,21 +140,11 @@ public class JSchProcess implements IRemoteProcessControlService, IRemoteProcess
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#destroy()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
fChannel.disconnect();
|
fChannel.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#exitValue()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int exitValue() {
|
public int exitValue() {
|
||||||
if(!isCompleted()) {
|
if(!isCompleted()) {
|
||||||
|
@ -169,31 +153,16 @@ public class JSchProcess implements IRemoteProcessControlService, IRemoteProcess
|
||||||
return fChannel.getExitStatus();
|
return fChannel.getExitStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getErrorStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getErrorStream() {
|
public InputStream getErrorStream() {
|
||||||
return fProcStderr;
|
return fProcStderr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getInputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getInputStream() {
|
public InputStream getInputStream() {
|
||||||
return fProcStdout;
|
return fProcStdout;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getOutputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public OutputStream getOutputStream() {
|
public OutputStream getOutputStream() {
|
||||||
try {
|
try {
|
||||||
|
@ -203,11 +172,6 @@ public class JSchProcess implements IRemoteProcessControlService, IRemoteProcess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#waitFor()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int waitFor() throws InterruptedException {
|
public int waitFor() throws InterruptedException {
|
||||||
while (!isCompleted()) {
|
while (!isCompleted()) {
|
||||||
|
@ -216,31 +180,16 @@ public class JSchProcess implements IRemoteProcessControlService, IRemoteProcess
|
||||||
return exitValue();
|
return exitValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.RemoteProcess#isCompleted()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCompleted() {
|
public boolean isCompleted() {
|
||||||
return fChannel.isClosed();
|
return fChannel.isClosed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcess.Service#getRemoteProcess()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcess getRemoteProcess() {
|
public IRemoteProcess getRemoteProcess() {
|
||||||
return fProcess;
|
return fProcess;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessTerminalService#setTerminalSize(int, int, int, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setTerminalSize(int cols, int rows, int width, int height) {
|
public void setTerminalSize(int cols, int rows, int width, int height) {
|
||||||
if (fChannel instanceof ChannelExec) {
|
if (fChannel instanceof ChannelExec) {
|
||||||
|
@ -250,11 +199,6 @@ public class JSchProcess implements IRemoteProcessControlService, IRemoteProcess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessSignalService#sendSignal(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void sendSignal(int signal) throws RemoteConnectionException {
|
public void sendSignal(int signal) throws RemoteConnectionException {
|
||||||
if (signal >= 0 && signal <= USR2) {
|
if (signal >= 0 && signal <= USR2) {
|
||||||
|
|
|
@ -40,11 +40,6 @@ public class JSchUserInfo implements UserInfo, UIKeyboardInteractive {
|
||||||
this.userAuthenticatorService = userAuthenticatorService;
|
this.userAuthenticatorService = userAuthenticatorService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.UserInfo#getPassphrase()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getPassphrase() {
|
public String getPassphrase() {
|
||||||
if (logging) {
|
if (logging) {
|
||||||
|
@ -53,11 +48,6 @@ public class JSchUserInfo implements UserInfo, UIKeyboardInteractive {
|
||||||
return hostService.getPassphrase();
|
return hostService.getPassphrase();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.UserInfo#getPassword()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
if (logging) {
|
if (logging) {
|
||||||
|
@ -66,12 +56,6 @@ public class JSchUserInfo implements UserInfo, UIKeyboardInteractive {
|
||||||
return hostService.getPassword();
|
return hostService.getPassword();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.UIKeyboardInteractive#promptKeyboardInteractive(java.lang.String, java.lang.String,
|
|
||||||
* java.lang.String, java.lang.String[], boolean[])
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt,
|
||||||
boolean[] echo) {
|
boolean[] echo) {
|
||||||
|
@ -94,11 +78,6 @@ public class JSchUserInfo implements UserInfo, UIKeyboardInteractive {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.UserInfo#promptPassphrase(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean promptPassphrase(String message) {
|
public boolean promptPassphrase(String message) {
|
||||||
if (logging) {
|
if (logging) {
|
||||||
|
@ -120,11 +99,6 @@ public class JSchUserInfo implements UserInfo, UIKeyboardInteractive {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.UserInfo#promptPassword(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean promptPassword(String message) {
|
public boolean promptPassword(String message) {
|
||||||
if (logging) {
|
if (logging) {
|
||||||
|
@ -142,11 +116,6 @@ public class JSchUserInfo implements UserInfo, UIKeyboardInteractive {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.UserInfo#promptYesNo(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean promptYesNo(String message) {
|
public boolean promptYesNo(String message) {
|
||||||
if (logging) {
|
if (logging) {
|
||||||
|
@ -161,11 +130,6 @@ public class JSchUserInfo implements UserInfo, UIKeyboardInteractive {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see com.jcraft.jsch.UserInfo#showMessage(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void showMessage(String message) {
|
public void showMessage(String message) {
|
||||||
if (logging) {
|
if (logging) {
|
||||||
|
|
|
@ -96,12 +96,6 @@ public class JschFileStore extends FileStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#childInfos(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileInfo[] childInfos(int options, IProgressMonitor monitor) throws CoreException {
|
public IFileInfo[] childInfos(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
||||||
|
@ -110,12 +104,6 @@ public class JschFileStore extends FileStore {
|
||||||
return command.getResult(subMon.newChild(9));
|
return command.getResult(subMon.newChild(9));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#childNames(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] childNames(int options, IProgressMonitor monitor) throws CoreException {
|
public String[] childNames(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
||||||
|
@ -127,12 +115,6 @@ public class JschFileStore extends FileStore {
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#delete(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int options, IProgressMonitor monitor) throws CoreException {
|
public void delete(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 20);
|
SubMonitor subMon = SubMonitor.convert(monitor, 20);
|
||||||
|
@ -144,12 +126,6 @@ public class JschFileStore extends FileStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#fetchInfo(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException {
|
public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
||||||
|
@ -158,23 +134,12 @@ public class JschFileStore extends FileStore {
|
||||||
return command.getResult(subMon.newChild(9));
|
return command.getResult(subMon.newChild(9));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.core.filesystem.provider.FileStore#getChild(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore getChild(String name) {
|
public IFileStore getChild(String name) {
|
||||||
URI uri = JSchFileSystem.getURIFor(JSchFileSystem.getConnectionNameFor(fURI), fRemotePath.append(name).toString());
|
URI uri = JSchFileSystem.getURIFor(JSchFileSystem.getConnectionNameFor(fURI), fRemotePath.append(name).toString());
|
||||||
return JschFileStore.getInstance(uri);
|
return JschFileStore.getInstance(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#getName()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return getNameFromPath(fRemotePath);
|
return getNameFromPath(fRemotePath);
|
||||||
|
@ -194,11 +159,6 @@ public class JschFileStore extends FileStore {
|
||||||
return path.lastSegment();
|
return path.lastSegment();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#getParent()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore getParent() {
|
public IFileStore getParent() {
|
||||||
if (fRemotePath.isRoot()) {
|
if (fRemotePath.isRoot()) {
|
||||||
|
@ -211,12 +171,6 @@ public class JschFileStore extends FileStore {
|
||||||
return JschFileStore.getInstance(JSchFileSystem.getURIFor(JSchFileSystem.getConnectionNameFor(fURI), parentPath));
|
return JschFileStore.getInstance(JSchFileSystem.getURIFor(JSchFileSystem.getConnectionNameFor(fURI), parentPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#mkdir(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
|
public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 20);
|
SubMonitor subMon = SubMonitor.convert(monitor, 20);
|
||||||
|
@ -259,12 +213,6 @@ public class JschFileStore extends FileStore {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#openInputStream(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException {
|
public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 30);
|
SubMonitor subMon = SubMonitor.convert(monitor, 30);
|
||||||
|
@ -285,12 +233,6 @@ public class JschFileStore extends FileStore {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#openOutputStream(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
|
public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 30);
|
SubMonitor subMon = SubMonitor.convert(monitor, 30);
|
||||||
|
@ -307,13 +249,6 @@ public class JschFileStore extends FileStore {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.core.filesystem.provider.FileStore#putInfo(org.eclipse.core
|
|
||||||
* .filesystem.IFileInfo, int, org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
|
public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
||||||
|
@ -322,11 +257,6 @@ public class JschFileStore extends FileStore {
|
||||||
command.getResult(subMon.newChild(9));
|
command.getResult(subMon.newChild(9));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#toURI()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public URI toURI() {
|
public URI toURI() {
|
||||||
return fURI;
|
return fURI;
|
||||||
|
|
|
@ -120,11 +120,6 @@ public abstract class AbstractRemoteCommand<T> {
|
||||||
return fPool.submit(this);
|
return fPool.submit(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.util.concurrent.Callable#call()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public abstract T1 call() throws JSchException, IOException, RemoteConnectionException;
|
public abstract T1 call() throws JSchException, IOException, RemoteConnectionException;
|
||||||
|
|
||||||
|
@ -192,11 +187,6 @@ public abstract class AbstractRemoteCommand<T> {
|
||||||
return fPool.submit(this);
|
return fPool.submit(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.util.concurrent.Callable#call()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public abstract T1 call() throws JSchException, SftpException, IOException;
|
public abstract T1 call() throws JSchException, SftpException, IOException;
|
||||||
|
|
||||||
|
|
|
@ -68,11 +68,6 @@ public class GetInputStreamCommand extends AbstractRemoteCommand<InputStream> {
|
||||||
return stream.read();
|
return stream.read();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.io.InputStream#close()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
stream.close();
|
stream.close();
|
||||||
|
@ -85,71 +80,36 @@ public class GetInputStreamCommand extends AbstractRemoteCommand<InputStream> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.io.InputStream#read(byte[])
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int read(byte[] b) throws IOException {
|
public int read(byte[] b) throws IOException {
|
||||||
return stream.read(b);
|
return stream.read(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.io.InputStream#read(byte[], int, int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int read(byte[] b, int off, int len) throws IOException {
|
public int read(byte[] b, int off, int len) throws IOException {
|
||||||
return stream.read(b, off, len);
|
return stream.read(b, off, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.io.InputStream#skip(long)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public long skip(long n) throws IOException {
|
public long skip(long n) throws IOException {
|
||||||
return stream.skip(n);
|
return stream.skip(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.io.InputStream#available()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int available() throws IOException {
|
public int available() throws IOException {
|
||||||
return stream.available();
|
return stream.available();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.io.InputStream#mark(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void mark(int readlimit) {
|
public synchronized void mark(int readlimit) {
|
||||||
stream.mark(readlimit);
|
stream.mark(readlimit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.io.InputStream#reset()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void reset() throws IOException {
|
public synchronized void reset() throws IOException {
|
||||||
stream.reset();
|
stream.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.io.InputStream#markSupported()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean markSupported() {
|
public boolean markSupported() {
|
||||||
return stream.markSupported();
|
return stream.markSupported();
|
||||||
|
|
|
@ -97,13 +97,6 @@ public class Activator extends AbstractUIPlugin {
|
||||||
return fJSchService;
|
return fJSchService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
super.start(context);
|
||||||
|
@ -113,13 +106,6 @@ public class Activator extends AbstractUIPlugin {
|
||||||
getImageRegistry().put(IMG_CONNECTION_TYPE, imageDescriptorFromPlugin(PLUGIN_ID, "/icons/ssh.png")); //$NON-NLS-1$
|
getImageRegistry().put(IMG_CONNECTION_TYPE, imageDescriptorFromPlugin(PLUGIN_ID, "/icons/ssh.png")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
plugin = null;
|
plugin = null;
|
||||||
|
|
|
@ -37,13 +37,6 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.ide.fileSystem.FileSystemContributor;
|
import org.eclipse.ui.ide.fileSystem.FileSystemContributor;
|
||||||
|
|
||||||
public class JSchFileSystemContributor extends FileSystemContributor {
|
public class JSchFileSystemContributor extends FileSystemContributor {
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.ide.fileSystem.FileSystemContributor#browseFileSystem(
|
|
||||||
* java.lang.String, org.eclipse.swt.widgets.Shell)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public URI browseFileSystem(String initialPath, Shell shell) {
|
public URI browseFileSystem(String initialPath, Shell shell) {
|
||||||
IRemoteServicesManager manager = Activator.getService(IRemoteServicesManager.class);
|
IRemoteServicesManager manager = Activator.getService(IRemoteServicesManager.class);
|
||||||
|
@ -61,13 +54,6 @@ public class JSchFileSystemContributor extends FileSystemContributor {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.ide.fileSystem.FileSystemContributor#getURI(java.lang.
|
|
||||||
* String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public URI getURI(String string) {
|
public URI getURI(String string) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -152,11 +152,6 @@ public class JSchConnectionPage extends WizardPage {
|
||||||
fUseLoginShellButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1));
|
fUseLoginShellButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1));
|
||||||
fUseLoginShellButton.addSelectionListener(new SelectionAdapter() {
|
fUseLoginShellButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
validateFields();
|
validateFields();
|
||||||
|
|
|
@ -88,26 +88,12 @@ public class Activator extends Plugin {
|
||||||
return ref != null ? context.getService(ref) : null;
|
return ref != null ? context.getService(ref) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
super.start(context);
|
||||||
plugin = this;
|
plugin = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
plugin = null;
|
plugin = null;
|
||||||
|
|
|
@ -95,23 +95,12 @@ public class ProxyConnection implements IRemoteConnectionControlService,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection.Service#getRemoteConnection()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnection getRemoteConnection() {
|
public IRemoteConnection getRemoteConnection() {
|
||||||
return fRemoteConnection;
|
return fRemoteConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Factory implements IRemoteConnection.Service.Factory {
|
public static class Factory implements IRemoteConnection.Service.Factory {
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnection.Service.Factory#getService(org.eclipse.remote.core.IRemoteConnection,
|
|
||||||
* java.lang.Class)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public <T extends IRemoteConnection.Service> T getService(IRemoteConnection connection, Class<T> service) {
|
public <T extends IRemoteConnection.Service> T getService(IRemoteConnection connection, Class<T> service) {
|
||||||
|
@ -142,11 +131,6 @@ public class ProxyConnection implements IRemoteConnectionControlService,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionControlService#close()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public synchronized void close() {
|
public synchronized void close() {
|
||||||
if (isOpen) {
|
if (isOpen) {
|
||||||
|
@ -156,21 +140,11 @@ public class ProxyConnection implements IRemoteConnectionControlService,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionControlService#isOpen()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpen() {
|
public boolean isOpen() {
|
||||||
return isOpen;
|
return isOpen;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteConnectionControlService#open(org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void open(IProgressMonitor monitor) throws RemoteConnectionException {
|
public void open(IProgressMonitor monitor) throws RemoteConnectionException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, Messages.ProxyConnection_0, 20);
|
SubMonitor subMon = SubMonitor.convert(monitor, Messages.ProxyConnection_0, 20);
|
||||||
|
|
|
@ -92,12 +92,6 @@ public class ProxyFileStore extends FileStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#childInfos(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileInfo[] childInfos(int options, IProgressMonitor monitor) throws CoreException {
|
public IFileInfo[] childInfos(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
||||||
|
@ -110,12 +104,6 @@ public class ProxyFileStore extends FileStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#childNames(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String[] childNames(int options, IProgressMonitor monitor) throws CoreException {
|
public String[] childNames(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
||||||
|
@ -127,12 +115,6 @@ public class ProxyFileStore extends FileStore {
|
||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#delete(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(int options, IProgressMonitor monitor) throws CoreException {
|
public void delete(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 20);
|
SubMonitor subMon = SubMonitor.convert(monitor, 20);
|
||||||
|
@ -149,12 +131,6 @@ public class ProxyFileStore extends FileStore {
|
||||||
subMon.setWorkRemaining(0);
|
subMon.setWorkRemaining(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#fetchInfo(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException {
|
public IFileInfo fetchInfo(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
||||||
|
@ -167,23 +143,12 @@ public class ProxyFileStore extends FileStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.core.filesystem.provider.FileStore#getChild(java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore getChild(String name) {
|
public IFileStore getChild(String name) {
|
||||||
URI uri = ProxyFileSystem.getURIFor(ProxyFileSystem.getConnectionNameFor(fURI), fRemotePath.append(name).toString());
|
URI uri = ProxyFileSystem.getURIFor(ProxyFileSystem.getConnectionNameFor(fURI), fRemotePath.append(name).toString());
|
||||||
return getInstance(uri);
|
return getInstance(uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#getName()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return getNameFromPath(fRemotePath);
|
return getNameFromPath(fRemotePath);
|
||||||
|
@ -203,11 +168,6 @@ public class ProxyFileStore extends FileStore {
|
||||||
return path.lastSegment();
|
return path.lastSegment();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#getParent()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore getParent() {
|
public IFileStore getParent() {
|
||||||
if (fRemotePath.isRoot()) {
|
if (fRemotePath.isRoot()) {
|
||||||
|
@ -220,12 +180,6 @@ public class ProxyFileStore extends FileStore {
|
||||||
return getInstance(ProxyFileSystem.getURIFor(ProxyFileSystem.getConnectionNameFor(fURI), parentPath));
|
return getInstance(ProxyFileSystem.getURIFor(ProxyFileSystem.getConnectionNameFor(fURI), parentPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#mkdir(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
|
public IFileStore mkdir(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 16);
|
SubMonitor subMon = SubMonitor.convert(monitor, 16);
|
||||||
|
@ -269,12 +223,6 @@ public class ProxyFileStore extends FileStore {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#openInputStream(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException {
|
public InputStream openInputStream(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 20);
|
SubMonitor subMon = SubMonitor.convert(monitor, 20);
|
||||||
|
@ -299,12 +247,6 @@ public class ProxyFileStore extends FileStore {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#openOutputStream(int,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
|
public OutputStream openOutputStream(int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 20);
|
SubMonitor subMon = SubMonitor.convert(monitor, 20);
|
||||||
|
@ -325,13 +267,6 @@ public class ProxyFileStore extends FileStore {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.core.filesystem.provider.FileStore#putInfo(org.eclipse.core
|
|
||||||
* .filesystem.IFileInfo, int, org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
|
public void putInfo(IFileInfo info, int options, IProgressMonitor monitor) throws CoreException {
|
||||||
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
SubMonitor subMon = SubMonitor.convert(monitor, 10);
|
||||||
|
@ -344,11 +279,6 @@ public class ProxyFileStore extends FileStore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileStore#toURI()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public URI toURI() {
|
public URI toURI() {
|
||||||
return fURI;
|
return fURI;
|
||||||
|
|
|
@ -52,53 +52,27 @@ public class ProxyFileSystem extends FileSystem {
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.IFileSystem#attributes()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int attributes() {
|
public int attributes() {
|
||||||
// Attributes supported by JSch IFileService
|
// Attributes supported by JSch IFileService
|
||||||
return EFS.ATTRIBUTE_READ_ONLY | EFS.ATTRIBUTE_EXECUTABLE | EFS.ATTRIBUTE_SYMLINK | EFS.ATTRIBUTE_LINK_TARGET;
|
return EFS.ATTRIBUTE_READ_ONLY | EFS.ATTRIBUTE_EXECUTABLE | EFS.ATTRIBUTE_SYMLINK | EFS.ATTRIBUTE_LINK_TARGET;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileSystem#canDelete()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canDelete() {
|
public boolean canDelete() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileSystem#canWrite()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canWrite() {
|
public boolean canWrite() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.filesystem.provider.FileSystem#getStore(org.eclipse.core.runtime.IPath)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore getStore(IPath path) {
|
public IFileStore getStore(IPath path) {
|
||||||
return EFS.getNullFileSystem().getStore(path);
|
return EFS.getNullFileSystem().getStore(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.core.filesystem.provider.FileSystem#getStore(java.net.URI)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IFileStore getStore(URI uri) {
|
public IFileStore getStore(URI uri) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -35,12 +35,6 @@ public class ProxyProcess implements IRemoteProcessControlService, IRemoteProces
|
||||||
private volatile boolean isCompleted;
|
private volatile boolean isCompleted;
|
||||||
|
|
||||||
public static class Factory implements IRemoteProcess.Service.Factory {
|
public static class Factory implements IRemoteProcess.Service.Factory {
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcess.Service.Factory#getService(org.eclipse.remote.core.IRemoteProcess,
|
|
||||||
* java.lang.Class)
|
|
||||||
*/
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
public <T extends IRemoteProcess.Service> T getService(IRemoteProcess remoteProcess, Class<T> service) {
|
public <T extends IRemoteProcess.Service> T getService(IRemoteProcess remoteProcess, Class<T> service) {
|
||||||
|
@ -98,11 +92,6 @@ public class ProxyProcess implements IRemoteProcessControlService, IRemoteProces
|
||||||
cmdThread.start();
|
cmdThread.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#destroy()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
try {
|
try {
|
||||||
|
@ -113,11 +102,6 @@ public class ProxyProcess implements IRemoteProcessControlService, IRemoteProces
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#exitValue()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int exitValue() {
|
public int exitValue() {
|
||||||
if (!isCompleted) {
|
if (!isCompleted) {
|
||||||
|
@ -126,11 +110,6 @@ public class ProxyProcess implements IRemoteProcessControlService, IRemoteProces
|
||||||
return exitValue;
|
return exitValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getErrorStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getErrorStream() {
|
public InputStream getErrorStream() {
|
||||||
if (stdErrChan == null) {
|
if (stdErrChan == null) {
|
||||||
|
@ -149,42 +128,22 @@ public class ProxyProcess implements IRemoteProcessControlService, IRemoteProces
|
||||||
return stdErrChan.getInputStream();
|
return stdErrChan.getInputStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getInputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public InputStream getInputStream() {
|
public InputStream getInputStream() {
|
||||||
return stdIOChan.getInputStream();
|
return stdIOChan.getInputStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#getOutputStream()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public OutputStream getOutputStream() {
|
public OutputStream getOutputStream() {
|
||||||
return stdIOChan.getOutputStream();
|
return stdIOChan.getOutputStream();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see java.lang.Process#waitFor()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int waitFor() throws InterruptedException {
|
public int waitFor() throws InterruptedException {
|
||||||
cmdThread.join();
|
cmdThread.join();
|
||||||
return exitValue;
|
return exitValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.RemoteProcess#isCompleted()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isCompleted() {
|
public boolean isCompleted() {
|
||||||
return isCompleted;
|
return isCompleted;
|
||||||
|
|
|
@ -56,13 +56,6 @@ public class ProxyProcessBuilder extends AbstractRemoteProcessBuilder {
|
||||||
redirectErrorStream(true);
|
redirectErrorStream(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.AbstractRemoteProcessBuilder#environment()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> environment() {
|
public Map<String, String> environment() {
|
||||||
if (remoteEnv == null) {
|
if (remoteEnv == null) {
|
||||||
|
@ -71,23 +64,11 @@ public class ProxyProcessBuilder extends AbstractRemoteProcessBuilder {
|
||||||
return remoteEnv;
|
return remoteEnv;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.AbstractRemoteProcessBuilder#getSupportedFlags
|
|
||||||
* ()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int getSupportedFlags() {
|
public int getSupportedFlags() {
|
||||||
return NONE;
|
return NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.core.IRemoteProcessBuilder#start(int)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteProcess start(int flags) throws IOException {
|
public IRemoteProcess start(int flags) throws IOException {
|
||||||
final ProxyConnection conn = getRemoteConnection().getService(ProxyConnection.class);
|
final ProxyConnection conn = getRemoteConnection().getService(ProxyConnection.class);
|
||||||
|
|
|
@ -88,26 +88,12 @@ public class Activator extends Plugin {
|
||||||
return ref != null ? context.getService(ref) : null;
|
return ref != null ? context.getService(ref) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
super.start(context);
|
||||||
plugin = this;
|
plugin = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
plugin = null;
|
plugin = null;
|
||||||
|
|
|
@ -19,9 +19,6 @@ import org.eclipse.remote.proxy.protocol.core.Protocol;
|
||||||
public class Application implements IApplication {
|
public class Application implements IApplication {
|
||||||
private Server server = new Server();
|
private Server server = new Server();
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.equinox.app.IApplication#start(org.eclipse.equinox.app.IApplicationContext)
|
|
||||||
*/
|
|
||||||
public Object start(IApplicationContext context) throws Exception {
|
public Object start(IApplicationContext context) throws Exception {
|
||||||
String[] args = (String[])context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
|
String[] args = (String[])context.getArguments().get(IApplicationContext.APPLICATION_ARGS);
|
||||||
for (String arg : args) {
|
for (String arg : args) {
|
||||||
|
@ -36,9 +33,6 @@ public class Application implements IApplication {
|
||||||
return IApplication.EXIT_OK;
|
return IApplication.EXIT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.equinox.app.IApplication#stop()
|
|
||||||
*/
|
|
||||||
public void stop() {
|
public void stop() {
|
||||||
// Nothing
|
// Nothing
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,13 +97,6 @@ public class Activator extends AbstractUIPlugin {
|
||||||
return fJSchService;
|
return fJSchService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
super.start(context);
|
||||||
|
@ -113,13 +106,6 @@ public class Activator extends AbstractUIPlugin {
|
||||||
getImageRegistry().put(IMG_CONNECTION_TYPE, imageDescriptorFromPlugin(PLUGIN_ID, "/icons/ssh.png")); //$NON-NLS-1$
|
getImageRegistry().put(IMG_CONNECTION_TYPE, imageDescriptorFromPlugin(PLUGIN_ID, "/icons/ssh.png")); //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
|
|
||||||
* )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
plugin = null;
|
plugin = null;
|
||||||
|
|
|
@ -21,13 +21,6 @@ import org.eclipse.swt.widgets.Shell;
|
||||||
import org.eclipse.ui.ide.fileSystem.FileSystemContributor;
|
import org.eclipse.ui.ide.fileSystem.FileSystemContributor;
|
||||||
|
|
||||||
public class ProxyFileSystemContributor extends FileSystemContributor {
|
public class ProxyFileSystemContributor extends FileSystemContributor {
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.ide.fileSystem.FileSystemContributor#browseFileSystem(
|
|
||||||
* java.lang.String, org.eclipse.swt.widgets.Shell)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public URI browseFileSystem(String initialPath, Shell shell) {
|
public URI browseFileSystem(String initialPath, Shell shell) {
|
||||||
IRemoteServicesManager manager = Activator.getService(IRemoteServicesManager.class);
|
IRemoteServicesManager manager = Activator.getService(IRemoteServicesManager.class);
|
||||||
|
@ -45,13 +38,6 @@ public class ProxyFileSystemContributor extends FileSystemContributor {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ui.ide.fileSystem.FileSystemContributor#getURI(java.lang.
|
|
||||||
* String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public URI getURI(String string) {
|
public URI getURI(String string) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -138,12 +138,6 @@ public class ProxyConnectionPage extends WizardPage {
|
||||||
fDefaultServerButton.setText("Use default server");
|
fDefaultServerButton.setText("Use default server");
|
||||||
fDefaultServerButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1));
|
fDefaultServerButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1));
|
||||||
fDefaultServerButton.addSelectionListener(new SelectionAdapter() {
|
fDefaultServerButton.addSelectionListener(new SelectionAdapter() {
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
validateFields();
|
validateFields();
|
||||||
|
|
|
@ -60,12 +60,6 @@ public class DeferredFileStore implements IDeferredWorkbenchAdapter, IAdaptable
|
||||||
fParent = parent;
|
fParent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#fetchDeferredChildren(java.lang.Object,
|
|
||||||
* org.eclipse.ui.progress.IElementCollector, org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void fetchDeferredChildren(Object object, IElementCollector collector, IProgressMonitor monitor) {
|
public void fetchDeferredChildren(Object object, IElementCollector collector, IProgressMonitor monitor) {
|
||||||
ArrayList<DeferredFileStore> children = new ArrayList<DeferredFileStore>();
|
ArrayList<DeferredFileStore> children = new ArrayList<DeferredFileStore>();
|
||||||
|
@ -175,11 +169,6 @@ public class DeferredFileStore implements IDeferredWorkbenchAdapter, IAdaptable
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.model.IWorkbenchAdapter#getChildren(java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getChildren(Object o) {
|
public Object[] getChildren(Object o) {
|
||||||
try {
|
try {
|
||||||
|
@ -205,11 +194,6 @@ public class DeferredFileStore implements IDeferredWorkbenchAdapter, IAdaptable
|
||||||
return fFileStore;
|
return fFileStore;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.model.IWorkbenchAdapter#getImageDescriptor(java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public ImageDescriptor getImageDescriptor(Object object) {
|
public ImageDescriptor getImageDescriptor(Object object) {
|
||||||
fetchInfo();
|
fetchInfo();
|
||||||
|
@ -229,41 +213,21 @@ public class DeferredFileStore implements IDeferredWorkbenchAdapter, IAdaptable
|
||||||
return fImage;
|
return fImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.model.IWorkbenchAdapter#getLabel(java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String getLabel(Object o) {
|
public String getLabel(Object o) {
|
||||||
return fFileStore.getName();
|
return fFileStore.getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.model.IWorkbenchAdapter#getParent(java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Object getParent(Object o) {
|
public Object getParent(Object o) {
|
||||||
return fParent;
|
return fParent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#getRule(java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public ISchedulingRule getRule(Object object) {
|
public ISchedulingRule getRule(Object object) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#isContainer()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isContainer() {
|
public boolean isContainer() {
|
||||||
fetchInfo();
|
fetchInfo();
|
||||||
|
|
|
@ -14,11 +14,6 @@ import org.eclipse.jface.viewers.IElementComparer;
|
||||||
|
|
||||||
public class DeferredFileStoreComparer implements IElementComparer {
|
public class DeferredFileStoreComparer implements IElementComparer {
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.jface.viewers.IElementComparer#equals(java.lang.Object, java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o1, Object o2) {
|
public boolean equals(Object o1, Object o2) {
|
||||||
if (o1 == o2) {
|
if (o1 == o2) {
|
||||||
|
@ -40,11 +35,6 @@ public class DeferredFileStoreComparer implements IElementComparer {
|
||||||
return c1.getFileStore().equals(c2.getFileStore());
|
return c1.getFileStore().equals(c2.getFileStore());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.jface.viewers.IElementComparer#hashCode(java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode(Object element) {
|
public int hashCode(Object element) {
|
||||||
if (element instanceof DeferredFileStore) {
|
if (element instanceof DeferredFileStore) {
|
||||||
|
|
|
@ -24,12 +24,6 @@ public class RemoteContentProvider extends WorkbenchContentProvider {
|
||||||
private IWorkingSet workingSet;
|
private IWorkingSet workingSet;
|
||||||
private RemoteTreeContentManager manager;
|
private RemoteTreeContentManager manager;
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object,
|
|
||||||
* java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
|
||||||
if (newInput != null) {
|
if (newInput != null) {
|
||||||
|
@ -40,11 +34,6 @@ public class RemoteContentProvider extends WorkbenchContentProvider {
|
||||||
super.inputChanged(viewer, oldInput, newInput);
|
super.inputChanged(viewer, oldInput, newInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.model.BaseWorkbenchContentProvider#hasChildren(java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasChildren(Object element) {
|
public boolean hasChildren(Object element) {
|
||||||
if (manager != null /* && manager.isDeferredAdapter(element) */) {
|
if (manager != null /* && manager.isDeferredAdapter(element) */) {
|
||||||
|
@ -73,11 +62,6 @@ public class RemoteContentProvider extends WorkbenchContentProvider {
|
||||||
return workingSet;
|
return workingSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.model.WorkbenchContentProvider#getChildren(java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public Object[] getChildren(Object element) {
|
public Object[] getChildren(Object element) {
|
||||||
if (manager != null) {
|
if (manager != null) {
|
||||||
|
|
|
@ -30,11 +30,6 @@ public class RemoteResourceComparator extends ViewerComparator {
|
||||||
return ascending;
|
return ascending;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.jface.viewers.ViewerComparator#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public int compare(Viewer viewer, Object o1, Object o2) {
|
public int compare(Viewer viewer, Object o1, Object o2) {
|
||||||
if (o1 instanceof IFileInfo && o2 instanceof IFileInfo) {
|
if (o1 instanceof IFileInfo && o2 instanceof IFileInfo) {
|
||||||
|
|
|
@ -62,11 +62,6 @@ public class RemoteTreeContentManager {
|
||||||
setSystem(true);
|
setSystem(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
while (!fElementQueue.isEmpty() && !monitor.isCanceled()) {
|
while (!fElementQueue.isEmpty() && !monitor.isCanceled()) {
|
||||||
|
@ -104,23 +99,11 @@ public class RemoteTreeContentManager {
|
||||||
fParent = parent;
|
fParent = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.jface.progress.IElementCollector#add(java.lang.Object,
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void add(Object element, IProgressMonitor monitor) {
|
public void add(Object element, IProgressMonitor monitor) {
|
||||||
add(new Object[] { element }, monitor);
|
add(new Object[] { element }, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.jface.progress.IElementCollector#add(java.lang.Object[],
|
|
||||||
* org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void add(Object[] elements, IProgressMonitor monitor) {
|
public void add(Object[] elements, IProgressMonitor monitor) {
|
||||||
Object[] filtered = fViewer.filter(elements);
|
Object[] filtered = fViewer.filter(elements);
|
||||||
|
@ -133,11 +116,6 @@ public class RemoteTreeContentManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.jface.progress.IElementCollector#done()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void done() {
|
public void done() {
|
||||||
prune(fParent, offset);
|
prune(fParent, offset);
|
||||||
|
@ -219,11 +197,6 @@ public class RemoteTreeContentManager {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
WorkbenchJob updateJob = new WorkbenchJob("IncrementalDeferredTreeContentManager") { //$NON-NLS-1$
|
WorkbenchJob updateJob = new WorkbenchJob("IncrementalDeferredTreeContentManager") { //$NON-NLS-1$
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IStatus runInUIThread(IProgressMonitor updateMonitor) {
|
public IStatus runInUIThread(IProgressMonitor updateMonitor) {
|
||||||
// Cancel the job if the tree viewer got closed
|
// Cancel the job if the tree viewer got closed
|
||||||
|
@ -250,11 +223,6 @@ public class RemoteTreeContentManager {
|
||||||
*/
|
*/
|
||||||
protected void prune(final Object parent, final int offset) {
|
protected void prune(final Object parent, final int offset) {
|
||||||
WorkbenchJob updateJob = new WorkbenchJob("DeferredTree") { //$NON-NLS-1$
|
WorkbenchJob updateJob = new WorkbenchJob("DeferredTree") { //$NON-NLS-1$
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IStatus runInUIThread(IProgressMonitor updateMonitor) {
|
public IStatus runInUIThread(IProgressMonitor updateMonitor) {
|
||||||
// Cancel the job if the tree viewer got closed
|
// Cancel the job if the tree viewer got closed
|
||||||
|
@ -282,11 +250,6 @@ public class RemoteTreeContentManager {
|
||||||
}
|
}
|
||||||
// Clear the placeholder if it is still there
|
// Clear the placeholder if it is still there
|
||||||
WorkbenchJob clearJob = new WorkbenchJob("DeferredTreeContentManager_ClearJob") { //$NON-NLS-1$
|
WorkbenchJob clearJob = new WorkbenchJob("DeferredTreeContentManager_ClearJob") { //$NON-NLS-1$
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.IProgressMonitor)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IStatus runInUIThread(IProgressMonitor monitor) {
|
public IStatus runInUIThread(IProgressMonitor monitor) {
|
||||||
if (!placeholder.isRemoved()) {
|
if (!placeholder.isRemoved()) {
|
||||||
|
@ -304,12 +267,6 @@ public class RemoteTreeContentManager {
|
||||||
clearJob.schedule();
|
clearJob.schedule();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.progress.DeferredTreeContentManager#getFetchJobName(java.lang.Object,
|
|
||||||
* org.eclipse.ui.progress.IDeferredWorkbenchAdapter)
|
|
||||||
*/
|
|
||||||
protected String getFetchJobName(Object parent, IDeferredWorkbenchAdapter adapter) {
|
protected String getFetchJobName(Object parent, IDeferredWorkbenchAdapter adapter) {
|
||||||
return "RemoteTreeContentManager"; //$NON-NLS-1$
|
return "RemoteTreeContentManager"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,22 +89,12 @@ public class RemoteUIPlugin extends AbstractUIPlugin {
|
||||||
public RemoteUIPlugin() {
|
public RemoteUIPlugin() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void start(BundleContext context) throws Exception {
|
public void start(BundleContext context) throws Exception {
|
||||||
super.start(context);
|
super.start(context);
|
||||||
plugin = this;
|
plugin = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext )
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void stop(BundleContext context) throws Exception {
|
public void stop(BundleContext context) throws Exception {
|
||||||
plugin = null;
|
plugin = null;
|
||||||
|
|
|
@ -160,12 +160,6 @@ public class ConnectionsPreferencePage extends PreferencePage implements IWorkbe
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private class EventHandler extends SelectionAdapter {
|
private class EventHandler extends SelectionAdapter {
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void widgetSelected(SelectionEvent e) {
|
public void widgetSelected(SelectionEvent e) {
|
||||||
Object source;
|
Object source;
|
||||||
|
|
|
@ -47,13 +47,6 @@ public class LocalUIFileService implements IRemoteUIFileService {
|
||||||
return connectionType;
|
return connectionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteFileManager#browseDirectory(org.eclipse
|
|
||||||
* .swt.widgets.Shell, java.lang.String, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String browseDirectory(Shell shell, String message, String filterPath, int flags) {
|
public String browseDirectory(Shell shell, String message, String filterPath, int flags) {
|
||||||
DirectoryDialog dialog = new DirectoryDialog(shell);
|
DirectoryDialog dialog = new DirectoryDialog(shell);
|
||||||
|
@ -73,13 +66,6 @@ public class LocalUIFileService implements IRemoteUIFileService {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteFileManager#browseFile(org.eclipse
|
|
||||||
* .swt.widgets.Shell, java.lang.String, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String browseFile(Shell shell, String message, String filterPath, int flags) {
|
public String browseFile(Shell shell, String message, String filterPath, int flags) {
|
||||||
FileDialog dialog = new FileDialog(shell, SWT.SINGLE);
|
FileDialog dialog = new FileDialog(shell, SWT.SINGLE);
|
||||||
|
@ -99,13 +85,6 @@ public class LocalUIFileService implements IRemoteUIFileService {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.core.IRemoteFileManager#browseFile(org.eclipse
|
|
||||||
* .swt.widgets.Shell, java.lang.String, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> browseFiles(Shell shell, String message, String filterPath, int flags) {
|
public List<String> browseFiles(Shell shell, String message, String filterPath, int flags) {
|
||||||
FileDialog dialog = new FileDialog(shell, SWT.MULTI);
|
FileDialog dialog = new FileDialog(shell, SWT.MULTI);
|
||||||
|
@ -125,34 +104,16 @@ public class LocalUIFileService implements IRemoteUIFileService {
|
||||||
return Arrays.asList(dialog.getFileNames());
|
return Arrays.asList(dialog.getFileNames());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.remote.ui.IRemoteUIFileManager#getConnection()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnection getConnection() {
|
public IRemoteConnection getConnection() {
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.ui.IRemoteUIFileManager#setConnection(org.eclipse
|
|
||||||
* .remote.core.IRemoteConnection)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setConnection(IRemoteConnection connection) {
|
public void setConnection(IRemoteConnection connection) {
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.remote.ui.IRemoteUIFileManager#showConnections(boolean)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void showConnections(boolean enable) {
|
public void showConnections(boolean enable) {
|
||||||
// Not implemented
|
// Not implemented
|
||||||
|
|
|
@ -50,13 +50,6 @@ public class RemoteUIFileService implements IRemoteUIFileService {
|
||||||
return connectionType;
|
return connectionType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ptp.remote.core.IRemoteFileManager#browseDirectory(org.eclipse
|
|
||||||
* .swt.widgets.Shell, java.lang.String, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String browseDirectory(Shell shell, String message, String filterPath, int flags) {
|
public String browseDirectory(Shell shell, String message, String filterPath, int flags) {
|
||||||
RemoteResourceBrowser browser = new RemoteResourceBrowser(shell, SWT.SINGLE);
|
RemoteResourceBrowser browser = new RemoteResourceBrowser(shell, SWT.SINGLE);
|
||||||
|
@ -76,13 +69,6 @@ public class RemoteUIFileService implements IRemoteUIFileService {
|
||||||
return resource.toURI().getPath();
|
return resource.toURI().getPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ptp.remote.core.IRemoteFileManager#browseFile(org.eclipse
|
|
||||||
* .swt.widgets.Shell, java.lang.String, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public String browseFile(Shell shell, String message, String filterPath, int flags) {
|
public String browseFile(Shell shell, String message, String filterPath, int flags) {
|
||||||
RemoteResourceBrowser browser = new RemoteResourceBrowser(shell, SWT.SINGLE);
|
RemoteResourceBrowser browser = new RemoteResourceBrowser(shell, SWT.SINGLE);
|
||||||
|
@ -102,13 +88,6 @@ public class RemoteUIFileService implements IRemoteUIFileService {
|
||||||
return resource.toURI().getPath();
|
return resource.toURI().getPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ptp.remote.core.IRemoteFileManager#browseFile(org.eclipse
|
|
||||||
* .swt.widgets.Shell, java.lang.String, java.lang.String)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public List<String> browseFiles(Shell shell, String message, String filterPath, int flags) {
|
public List<String> browseFiles(Shell shell, String message, String filterPath, int flags) {
|
||||||
RemoteResourceBrowser browser = new RemoteResourceBrowser(shell, SWT.MULTI);
|
RemoteResourceBrowser browser = new RemoteResourceBrowser(shell, SWT.MULTI);
|
||||||
|
@ -128,34 +107,16 @@ public class RemoteUIFileService implements IRemoteUIFileService {
|
||||||
return paths;
|
return paths;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.ptp.remote.ui.IRemoteUIFileManager#getConnection()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public IRemoteConnection getConnection() {
|
public IRemoteConnection getConnection() {
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ptp.remote.ui.IRemoteUIFileManager#setConnection(org.eclipse
|
|
||||||
* .ptp.remote.core.IRemoteConnection)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setConnection(IRemoteConnection connection) {
|
public void setConnection(IRemoteConnection connection) {
|
||||||
this.connection = connection;
|
this.connection = connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.ptp.remote.ui.IRemoteUIFileManager#showConnections(boolean)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void showConnections(boolean enable) {
|
public void showConnections(boolean enable) {
|
||||||
showConnections = enable;
|
showConnections = enable;
|
||||||
|
|
|
@ -82,13 +82,6 @@ public class RemoteResourceBrowser extends Dialog implements IRunnableContext {
|
||||||
setType(FILE_BROWSER | DIRECTORY_BROWSER);
|
setType(FILE_BROWSER | DIRECTORY_BROWSER);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.jface.dialogs.Dialog#createButton(org.eclipse.swt.widgets
|
|
||||||
* .Composite, int, java.lang.String, boolean)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {
|
protected Button createButton(Composite parent, int id, String label, boolean defaultButton) {
|
||||||
Button button = super.createButton(parent, id, label, defaultButton);
|
Button button = super.createButton(parent, id, label, defaultButton);
|
||||||
|
@ -98,13 +91,6 @@ public class RemoteResourceBrowser extends Dialog implements IRunnableContext {
|
||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.jface.dialogs.Dialog#createContents(org.eclipse.swt.widgets
|
|
||||||
* .Composite)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected Control createContents(Composite parent) {
|
protected Control createContents(Composite parent) {
|
||||||
Control contents = super.createContents(parent);
|
Control contents = super.createContents(parent);
|
||||||
|
@ -127,13 +113,6 @@ public class RemoteResourceBrowser extends Dialog implements IRunnableContext {
|
||||||
return contents;
|
return contents;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see
|
|
||||||
* org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets
|
|
||||||
* .Composite)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected Control createDialogArea(Composite parent) {
|
protected Control createDialogArea(Composite parent) {
|
||||||
Composite main = (Composite) super.createDialogArea(parent);
|
Composite main = (Composite) super.createDialogArea(parent);
|
||||||
|
@ -238,11 +217,6 @@ public class RemoteResourceBrowser extends Dialog implements IRunnableContext {
|
||||||
return new ArrayList<IFileStore>();
|
return new ArrayList<IFileStore>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.jface.operation.IRunnableContext#run(boolean, boolean, org.eclipse.jface.operation.IRunnableWithProgress)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException,
|
public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) throws InvocationTargetException,
|
||||||
InterruptedException {
|
InterruptedException {
|
||||||
|
|
|
@ -558,11 +558,6 @@ public class RemoteConnectionWidget extends Composite {
|
||||||
fWidgetListener.setEnabled(enabled);
|
fWidgetListener.setEnabled(enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.swt.widgets.Control#isEnabled()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isEnabled() {
|
public boolean isEnabled() {
|
||||||
return fEnabled;
|
return fEnabled;
|
||||||
|
@ -626,11 +621,6 @@ public class RemoteConnectionWidget extends Composite {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see org.eclipse.swt.widgets.Control#setEnabled(boolean)
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void setEnabled(boolean enabled) {
|
public void setEnabled(boolean enabled) {
|
||||||
fEnabled = enabled;
|
fEnabled = enabled;
|
||||||
|
|
|
@ -200,11 +200,6 @@ public class FileStoreTests extends TestCase {
|
||||||
assertEquals(expected, fi.getAttribute(EFS.ATTRIBUTE_EXECUTABLE));
|
assertEquals(expected, fi.getAttribute(EFS.ATTRIBUTE_EXECUTABLE));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see junit.framework.TestCase#setUp()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
IRemoteServicesManager manager = Activator.getService(IRemoteServicesManager.class);
|
IRemoteServicesManager manager = Activator.getService(IRemoteServicesManager.class);
|
||||||
|
@ -252,11 +247,6 @@ public class FileStoreTests extends TestCase {
|
||||||
fLocalDir.mkdir(EFS.NONE, null);
|
fLocalDir.mkdir(EFS.NONE, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see junit.framework.TestCase#tearDown()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
fRemoteDir.delete(EFS.NONE, new NullProgressMonitor());
|
fRemoteDir.delete(EFS.NONE, new NullProgressMonitor());
|
||||||
|
|
|
@ -237,11 +237,6 @@ public class FileStoreTests extends TestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see junit.framework.TestCase#setUp()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
if (connection == null) {
|
if (connection == null) {
|
||||||
|
@ -275,11 +270,6 @@ public class FileStoreTests extends TestCase {
|
||||||
localDir.mkdir(EFS.NONE, null);
|
localDir.mkdir(EFS.NONE, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see junit.framework.TestCase#tearDown()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
remoteParent.delete(EFS.NONE, new NullProgressMonitor());
|
remoteParent.delete(EFS.NONE, new NullProgressMonitor());
|
||||||
|
|
|
@ -232,11 +232,6 @@ public class ProcessTests extends TestCase {
|
||||||
assertFalse(p.isAlive());
|
assertFalse(p.isAlive());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see junit.framework.TestCase#setUp()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void setUp() throws Exception {
|
protected void setUp() throws Exception {
|
||||||
if (connection == null) {
|
if (connection == null) {
|
||||||
|
@ -257,11 +252,6 @@ public class ProcessTests extends TestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* (non-Javadoc)
|
|
||||||
*
|
|
||||||
* @see junit.framework.TestCase#tearDown()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue