public MyTableEditor( Project project, XDebuggerEditorsProvider debuggerEditorsProvider, @Nullable @NonNls String historyId, @Nullable XSourcePosition sourcePosition, @NotNull XExpression text, @NotNull final KeyAdapter actionAdapter) { super( project, debuggerEditorsProvider, EvaluationMode.CODE_FRAGMENT, historyId, sourcePosition); myExpression = XExpressionImpl.changeMode(text, getMode()); myEditorTextField = new EditorTextField( createDocument(myExpression), project, debuggerEditorsProvider.getFileType()) { @Override protected EditorEx createEditor() { final EditorEx editor = super.createEditor(); editor.setVerticalScrollbarVisible(false); editor.setOneLineMode(true); editor.getContentComponent().addKeyListener(actionAdapter); return editor; } @Override protected boolean isOneLineMode() { return true; } }; myEditorTextField.setFontInheritedFromLAF(false); }
@Override public void evaluate( @NotNull final String expression, @NotNull final XEvaluationCallback callback, @Nullable XSourcePosition expressionPosition) { evaluate(XExpressionImpl.fromText(expression), callback, expressionPosition); }