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:
parent
a197fa8c45
commit
d75235d2d0
1 changed files with 10 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue