mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-184710 No undo (Ctrl+Z) possible in the "Evaluate Expression" edit field after pressing "Evaluate"
This commit is contained in:
+5
-14
@@ -1,6 +1,4 @@
|
||||
/*
|
||||
* Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
*/
|
||||
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.xdebugger.impl.ui;
|
||||
|
||||
import com.intellij.openapi.editor.Document;
|
||||
@@ -102,18 +100,12 @@ public class XDebuggerExpressionComboBox extends XDebuggerEditorBase {
|
||||
}
|
||||
|
||||
private void fillComboBox() {
|
||||
myModel.setSelectedItem(null); // must do this to preserve current editor
|
||||
myModel.replaceAll(getRecentExpressions());
|
||||
if (myComboBox.getItemCount() > 0) {
|
||||
myComboBox.setSelectedIndex(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void doSetText(XExpression text) {
|
||||
if (myComboBox.getItemCount() > 0) {
|
||||
myComboBox.setSelectedIndex(0);
|
||||
}
|
||||
|
||||
//if (myComboBox.isEditable()) {
|
||||
myEditor.setItem(text);
|
||||
//}
|
||||
@@ -189,11 +181,10 @@ public class XDebuggerExpressionComboBox extends XDebuggerEditorBase {
|
||||
|
||||
@Override
|
||||
public void setItem(Object anObject) {
|
||||
if (anObject == null) {
|
||||
anObject = XExpressionImpl.EMPTY_EXPRESSION;
|
||||
if (anObject != null) { // do not reset the editor on null
|
||||
XExpression expression = (XExpression)anObject;
|
||||
myDelegate.getEditorComponent().setNewDocumentAndFileType(getFileType(expression), createDocument(expression));
|
||||
}
|
||||
XExpression expression = (XExpression)anObject;
|
||||
myDelegate.getEditorComponent().setNewDocumentAndFileType(getFileType(expression), createDocument(expression));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user