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

Add method to obtain a RemoteProcess. Fix version number.

Change-Id: I62a02bccde02d665e1b7f0b58c48b8c30c0acbc0
Signed-off-by: Greg Watson <g.watson@computer.org>
This commit is contained in:
Greg Watson 2018-02-08 10:10:42 -05:00
parent 91e297a83a
commit 272ef8b411
5 changed files with 12 additions and 5 deletions

View file

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2 Bundle-ManifestVersion: 2
Bundle-Name: %pluginName Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.remote.core;singleton:=true Bundle-SymbolicName: org.eclipse.remote.core;singleton:=true
Bundle-Version: 3.0.0.qualifier Bundle-Version: 4.0.0.qualifier
Bundle-Activator: org.eclipse.remote.internal.core.RemoteCorePlugin Bundle-Activator: org.eclipse.remote.internal.core.RemoteCorePlugin
Bundle-Vendor: %pluginProvider Bundle-Vendor: %pluginProvider
Bundle-ActivationPolicy: lazy Bundle-ActivationPolicy: lazy

View file

@ -11,6 +11,6 @@
</parent> </parent>
<artifactId>org.eclipse.remote.core</artifactId> <artifactId>org.eclipse.remote.core</artifactId>
<version>3.0.0-SNAPSHOT</version> <version>4.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging> <packaging>eclipse-plugin</packaging>
</project> </project>

View file

@ -16,6 +16,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.eclipse.core.filesystem.IFileStore; import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.remote.internal.core.RemoteProcess;
/** /**
* Abstract base class for remote process builders. Implementors can use this class to provide a default implementation of a remote * Abstract base class for remote process builders. Implementors can use this class to provide a default implementation of a remote
@ -195,4 +196,11 @@ public abstract class AbstractRemoteProcessBuilder implements IRemoteProcessBuil
public IRemoteConnection getRemoteConnection() { public IRemoteConnection getRemoteConnection() {
return fConnection; return fConnection;
} }
/**
* @since 4.0
*/
protected IRemoteProcess newRemoteProcess() {
return new RemoteProcess(getRemoteConnection(), this);
}
} }

View file

@ -53,7 +53,7 @@ public class RemoteConnectionChangeEvent {
/** /**
* Event indicating the connection attributes had changed. * Event indicating the connection attributes had changed.
* @since 3.0 * @since 4.0
*/ */
public static final int ATTRIBUTES_CHANGED = 1 << 6; public static final int ATTRIBUTES_CHANGED = 1 << 6;

View file

@ -29,7 +29,6 @@ import org.eclipse.remote.core.IRemoteFileService;
import org.eclipse.remote.core.IRemoteProcess; import org.eclipse.remote.core.IRemoteProcess;
import org.eclipse.remote.core.exception.RemoteConnectionException; import org.eclipse.remote.core.exception.RemoteConnectionException;
import org.eclipse.remote.internal.core.RemoteDebugOptions; import org.eclipse.remote.internal.core.RemoteDebugOptions;
import org.eclipse.remote.internal.core.RemoteProcess;
import org.eclipse.remote.internal.jsch.core.messages.Messages; import org.eclipse.remote.internal.jsch.core.messages.Messages;
import com.jcraft.jsch.Channel; import com.jcraft.jsch.Channel;
@ -182,7 +181,7 @@ public class JSchProcessBuilder extends AbstractRemoteProcessBuilder {
} }
fChannel.setXForwarding((flags & FORWARD_X11) == FORWARD_X11); fChannel.setXForwarding((flags & FORWARD_X11) == FORWARD_X11);
fChannel.connect(); fChannel.connect();
return new RemoteProcess(getRemoteConnection(), this); return newRemoteProcess();
} catch (RemoteConnectionException e) { } catch (RemoteConnectionException e) {
throw new IOException(e.getMessage()); throw new IOException(e.getMessage());
} catch (JSchException e) { } catch (JSchException e) {