예제 #1
0
  protected void initConsoleTab(@Nullable final String history) {
    getProject()
        .getModelAccess()
        .executeCommand(
            new Runnable() {
              public void run() {
                createConsoleModel();
                addBuiltInImports();
                loadHistory(history);
                createEditor();
                myFileEditor = new ConsoleFileEditor(myEditor);
              }
            });

    this.setLayout(new BorderLayout());

    DefaultActionGroup group = new DefaultActionGroup();
    registerActions(group);
    ActionToolbar toolbar =
        ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, false);
    JPanel toolbarComponent = new JPanel(new BorderLayout());
    toolbarComponent.add(toolbar.getComponent(), BorderLayout.CENTER);

    this.add(toolbarComponent, BorderLayout.WEST);
    this.add(myEditor.getExternalComponent(), BorderLayout.CENTER);

    myHighlighter = check_6q36mf_a0o0ic(myTool.getProject());
    myHighlighter.addAdditionalEditorComponent(myEditor);
  }
예제 #2
0
 protected void createEditor() {
   this.myEditor =
       new UIEditorComponent(
           check_6q36mf_a0a0a0a82(ProjectHelper.toMPSProject(myTool.getProject())), null) {
         @Nullable
         @Override
         public Object getData(@NonNls String key) {
           if (PlatformDataKeys.FILE_EDITOR.is(key)) {
             return myFileEditor;
           }
           if (PlatformDataKeys.PASTE_PROVIDER.is(key)) {
             PasteProvider parentPasteProvider =
                 as_6q36mf_a0a0a1a0a0a0a0cb(super.getData(key), PasteProvider.class);
             return (myTool.getPasteAsRef()
                 ? new BaseConsoleTab.MyPasteProvider(parentPasteProvider)
                 : parentPasteProvider);
           }
           return super.getData(key);
         }
       };
   myEditor.editNode(myRoot);
 }