コード例 #1
0
  private void initEditor() {
    myEditor =
        new EditorComboBoxEditor(getProject(), getEditorsProvider().getFileType()) {
          @Override
          public void setItem(Object anObject) {
            if (anObject == null) {
              anObject = XExpressionImpl.EMPTY_EXPRESSION;
            }
            XExpression expression = (XExpression) anObject;
            getEditorComponent()
                .setNewDocumentAndFileType(getFileType(expression), createDocument(expression));
          }

          @Override
          protected void onEditorCreate(EditorEx editor) {
            editor.putUserData(DebuggerCopyPastePreprocessor.REMOVE_NEWLINES_ON_PASTE, true);
            editor.getColorsScheme().setEditorFontSize(myComboBox.getFont().getSize());
          }
        };
    myEditor.getEditorComponent().setFontInheritedFromLAF(false);
    myComboBox.setEditor(myEditor);
    // myEditor.setItem(myExpression);
    myComboBox.setRenderer(new EditorComboBoxRenderer(myEditor));
    myComboBox.setMaximumRowCount(XDebuggerHistoryManager.MAX_RECENT_EXPRESSIONS);
  }
コード例 #2
0
 public JComponent getEditorComponent() {
   return myEditor.getEditorComponent();
 }