Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2013-10-16 18:15:15 +0000
committerEugene Tarassov2013-10-16 18:15:15 +0000
commitb1b4b25a5a98c20352f1459c1f284fd359d1ff71 (patch)
tree6fbb960d83e1717d296280de2423dbb532e52048 /plugins
parent58467c11fab14d62f97db98bfc274f51e9abc61d (diff)
downloadorg.eclipse.tcf-b1b4b25a5a98c20352f1459c1f284fd359d1ff71.tar.gz
org.eclipse.tcf-b1b4b25a5a98c20352f1459c1f284fd359d1ff71.tar.xz
org.eclipse.tcf-b1b4b25a5a98c20352f1459c1f284fd359d1ff71.zip
TCF Core: new command ProcessesV1.setWinSize - set process sudo-tty window size
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java21
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcessesV1.java12
-rw-r--r--plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ITerminals.java11
3 files changed, 32 insertions, 12 deletions
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java
index 152c0f45c..9680ba478 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/internal/services/remote/ProcessesV1Proxy.java
@@ -27,9 +27,7 @@ public class ProcessesV1Proxy extends ProcessesProxy implements IProcessesV1 {
return IProcessesV1.NAME;
}
- /* (non-Javadoc)
- * @see org.eclipse.tcf.services.IProcessesV1#start(java.lang.String, java.lang.String, java.lang.String[], java.util.Map, java.util.Map, org.eclipse.tcf.services.IProcesses.DoneStart)
- */
+ @Override
public IToken start(String directory, String file,
String[] command_line, Map<String,String> environment,
Map<String,Object> params, final DoneStart done) {
@@ -50,9 +48,20 @@ public class ProcessesV1Proxy extends ProcessesProxy implements IProcessesV1 {
}.token;
}
- /* (non-Javadoc)
- * @see org.eclipse.tcf.services.IProcessesV1#getCapabilities(java.lang.String, org.eclipse.tcf.services.IProcessesV1.DoneGetCapabilities)
- */
+ @Override
+ public IToken setWinSize(String id, int col, int row, final DoneCommand done) {
+ return new Command(channel, this, "setWinSize", new Object[]{ id, col, row }) { //$NON-NLS-1$
+ @Override
+ public void done(Exception error, Object[] args) {
+ if (error == null) {
+ assert args.length == 1;
+ error = toError(args[0]);
+ }
+ done.doneCommand(token, error);
+ }
+ }.token;
+ }
+
@Override
public IToken getCapabilities(final String id, final DoneGetCapabilities done) {
return new Command(channel, this, "getCapabilities", new Object[]{ id }) { //$NON-NLS-1$
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcessesV1.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcessesV1.java
index 4cc6d104c..a6e41f4eb 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcessesV1.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/IProcessesV1.java
@@ -70,6 +70,17 @@ public interface IProcessesV1 extends IProcesses {
Map<String,Object> params, DoneStart done);
/**
+ * Set the process TTY widow size.
+ * Applicable only when the process is started with START_USE_TERMINAL.
+ * @param id - process context ID.
+ * @param col - number of columns.
+ * @param row - number of rows.
+ * @param done - call back interface called when operation is completed.
+ * @return pending command handle, can be used to cancel the command.
+ */
+ IToken setWinSize(String id, int col, int row, DoneCommand done);
+
+ /**
* The command reports the ProcessesV1 service capabilities to clients so they can adjust
* to different implementations of the service. When called with a null ("") context
* ID the global capabilities are returned, otherwise context specific capabilities
@@ -79,5 +90,4 @@ public interface IProcessesV1 extends IProcesses {
* @param done The call back interface called when the operation is completed. Must not be <code>null</code>.
*/
public IToken getCapabilities(String id, DoneGetCapabilities done);
-
}
diff --git a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ITerminals.java b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ITerminals.java
index 96b32ab51..4aa41fdcd 100644
--- a/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ITerminals.java
+++ b/plugins/org.eclipse.tcf.core/src/org/eclipse/tcf/services/ITerminals.java
@@ -181,20 +181,21 @@ public interface ITerminals extends IService {
/**
* Set the terminal widow size
- * @param context_id - context ID.
- * @param signal - signal code.
+ * @param id - context ID.
+ * @param col - number of columns.
+ * @param row - number of rows.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
*/
- IToken setWinSize(String context_id, int newWidth, int newHeight, DoneCommand done);
+ IToken setWinSize(String id, int col, int row, DoneCommand done);
/**
* Exit a terminal.
- * @param context_id - context ID.
+ * @param id - context ID.
* @param done - call back interface called when operation is completed.
* @return pending command handle, can be used to cancel the command.
*/
- IToken exit(String context_id, DoneCommand done);
+ IToken exit(String id, DoneCommand done);
/**
* Add terminals service event listener.

Back to the top