1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

FIXED - bug 211659: Add FieldAssist to the terminal input field

https://bugs.eclipse.org/bugs/show_bug.cgi?id=211659
This commit is contained in:
Michael Scharf 2008-01-22 20:24:06 +00:00
parent a197fa8c45
commit d75235d2d0

View file

@ -211,8 +211,18 @@ public class CommandInputFieldWithHistory implements ICommandInputField {
}
fInputField.setLayoutData(data);
fInputField.setFont(terminal.getFont());
// register the field assist
new ContentAssistCommandAdapter(
fInputField,
new TextContentAdapter(),
new FieldAssist(),
null,
null,
installDecoration);
fInputField.addKeyListener(new KeyListener(){
public void keyPressed(KeyEvent e) {
if(!e.doit)
return;
if(e.keyCode=='\n' || e.keyCode=='\r') {
e.doit=false;
String line=fInputField.getText();
@ -240,14 +250,6 @@ public class CommandInputFieldWithHistory implements ICommandInputField {
public void keyReleased(KeyEvent e) {
}
});
// register the field assist
new ContentAssistCommandAdapter(
fInputField,
new TextContentAdapter(),
new FieldAssist(),
null,
null,
installDecoration);
}
public void setFont(Font font) {
fInputField.setFont(font);