Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2011-11-10 12:46:54 -0500
committerUwe Stieber2011-11-10 12:46:54 -0500
commit68913d505d88dd580aaf0eff388ae62c718053cd (patch)
tree4c89566bfd3734955b60fcf9ecfd11ac5a5224c6
parent5232500b7e9c4366ee47f8f6095118713cc16abb (diff)
downloadorg.eclipse.tcf-68913d505d88dd580aaf0eff388ae62c718053cd.tar.gz
org.eclipse.tcf-68913d505d88dd580aaf0eff388ae62c718053cd.tar.xz
org.eclipse.tcf-68913d505d88dd580aaf0eff388ae62c718053cd.zip
Target Explorer: Implement setWinSize(...) for TCF terminal
-rw-r--r--target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnector.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnector.java b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnector.java
index de9801ace..c2d512719 100644
--- a/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnector.java
+++ b/target_explorer/plugins/org.eclipse.tm.te.tcf.terminals.ui/src/org/eclipse/tm/te/tcf/terminals/ui/connector/TerminalsConnector.java
@@ -13,6 +13,7 @@ import org.eclipse.core.runtime.Assert;
import org.eclipse.tm.internal.terminal.provisional.api.ISettingsStore;
import org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl;
import org.eclipse.tm.internal.terminal.provisional.api.TerminalState;
+import org.eclipse.tm.tcf.protocol.IToken;
import org.eclipse.tm.tcf.protocol.Protocol;
import org.eclipse.tm.tcf.services.ITerminals;
import org.eclipse.tm.te.tcf.terminals.core.launcher.TerminalsLauncher;
@@ -96,15 +97,16 @@ public class TerminalsConnector extends AbstractStreamsConnector implements IDis
public void setTerminalSize(final int newWidth, final int newHeight) {
if (fControl.getState() == TerminalState.CONNECTED && settings.getTerminalsLauncher() instanceof TerminalsLauncher) {
final ITerminals service = ((TerminalsLauncher)settings.getTerminalsLauncher()).getSvcTerminals();
- if (service != null) {
+ final ITerminals.TerminalContext context = (ITerminals.TerminalContext)settings.getTerminalsLauncher().getAdapter(ITerminals.TerminalContext.class);
+ if (service != null && context != null) {
Protocol.invokeLater(new Runnable() {
@Override
public void run() {
-// service.setWinSize(context_id, newWidth, newHeight, new ITerminals.DoneCommand() {
-// @Override
-// public void doneCommand(IToken token, Exception error) {
-// }
-// });
+ service.setWinSize(context.getID(), newWidth, newHeight, new ITerminals.DoneCommand() {
+ @Override
+ public void doneCommand(IToken token, Exception error) {
+ }
+ });
}
});
}

Back to the top