mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 18:35:32 +02:00
Re-expose setupTerminal in ITerminlaControl. Needed to move a terminal control between different parents
This commit is contained in:
parent
be3bf84586
commit
31b445ff17
4 changed files with 21 additions and 7 deletions
|
@ -74,6 +74,8 @@ public class TerminalConnectorFactoryTest extends TestCase {
|
||||||
public void setTerminalTitle(String title) {
|
public void setTerminalTitle(String title) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setupTerminal(Composite parent) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
static class ConnectorMock extends TerminalConnectorImpl {
|
static class ConnectorMock extends TerminalConnectorImpl {
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,8 @@ public class TerminalConnectorTest extends TestCase {
|
||||||
public void setTerminalTitle(String title) {
|
public void setTerminalTitle(String title) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setupTerminal(Composite parent) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
static class ConnectorMock extends TerminalConnectorImpl {
|
static class ConnectorMock extends TerminalConnectorImpl {
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,7 @@ import java.io.OutputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.SocketException;
|
import java.net.SocketException;
|
||||||
|
|
||||||
|
import org.eclipse.core.runtime.Assert;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
|
@ -545,9 +546,10 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#setupTerminal()
|
* @see org.eclipse.tm.internal.terminal.provisional.api.ITerminalControl#setupTerminal(org.eclipse.swt.widgets.Composite)
|
||||||
*/
|
*/
|
||||||
public void setupTerminal(Composite parent) {
|
public void setupTerminal(Composite parent) {
|
||||||
|
Assert.isNotNull(parent);
|
||||||
fState=TerminalState.CLOSED;
|
fState=TerminalState.CLOSED;
|
||||||
setupControls(parent);
|
setupControls(parent);
|
||||||
setupListeners();
|
setupListeners();
|
||||||
|
|
|
@ -16,6 +16,7 @@ package org.eclipse.tm.internal.terminal.provisional.api;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
|
|
||||||
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Shell;
|
import org.eclipse.swt.widgets.Shell;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -43,6 +44,13 @@ public interface ITerminalControl {
|
||||||
*/
|
*/
|
||||||
void setState(TerminalState state);
|
void setState(TerminalState state);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Setup the terminal control within the given parent composite.
|
||||||
|
*
|
||||||
|
* @param parent The parent composite. Must not be <code>null</code>.
|
||||||
|
*/
|
||||||
|
void setupTerminal(Composite parent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A shell to show dialogs.
|
* A shell to show dialogs.
|
||||||
* @return the shell in which the terminal is shown.
|
* @return the shell in which the terminal is shown.
|
||||||
|
|
Loading…
Add table
Reference in a new issue