Forráskód Böngészése

when using single line, text editor should not close after ENTER if proposal window is open

Andreas Mülder 14 éve
szülő
commit
d314c879b9

+ 11 - 11
de.itemis.xtext.utils/plugins/de.itemis.xtext.utils.jface/src/de/itemis/xtext/utils/jface/viewers/XtextCellEditor.java

@@ -59,17 +59,17 @@ public class XtextCellEditor extends StyledTextCellEditor {
 	private final KeyListener keyListener = new KeyListener() {
 
 		public void keyPressed(KeyEvent e) {
-			if (e.keyCode == SWT.CR && ((text.getStyle() & SWT.MULTI) == 0 || 
-					(e.stateMask & SWT.CTRL) != 0)) {
-				// apply value to cell editor and finish editing
-				XtextCellEditor.this.fireApplyEditorValue();
-			} else if (e.keyCode == SWT.ESC) {
-				// cancel editor
-				XtextCellEditor.this.fireCancelEditor();
-			} else {
-				// notify cell editor about changes
-				XtextCellEditor.this.valueChanged(true, true);
-			}
+//			if (e.keyCode == SWT.CR && ((text.getStyle() & SWT.MULTI) == 0 || 
+//					(e.stateMask & SWT.CTRL) != 0)) {
+//				// apply value to cell editor and finish editing
+//				XtextCellEditor.this.fireApplyEditorValue();
+//			} else if (e.keyCode == SWT.ESC) {
+//				// cancel editor
+//				XtextCellEditor.this.fireCancelEditor();
+//			} else {
+//				// notify cell editor about changes
+//				XtextCellEditor.this.valueChanged(true, true);
+//			}
 		}
 
 		public void keyReleased(KeyEvent e) {