Exemplo n.º 1
0
  public void dispose() {
    myNodeEditor.dispose();
    myNodeEditor = null;

    myComponent.removeAll();
    myComponent = null;
  }
Exemplo n.º 2
0
  public void recreateEditor() {
    if (myProject.isDisposed() || !isValid()) return;
    // if (myNodeEditor instanceof NodeEditor) return;

    myComponent.removeAll();

    FileEditorState state = myNodeEditor != null ? getState(FileEditorStateLevel.FULL) : null;

    IOperationContext context = createOperationContext();
    Editor oldNodeEditor = myNodeEditor;
    myNodeEditor = new MPSEditorOpener(myProject).createEditorFor(context, myFile.getNode());
    if (oldNodeEditor != null) {
      oldNodeEditor.dispose();
    }

    if (state != null) {
      setState(state);
    }

    myComponent.add(((BaseNodeEditor) myNodeEditor).getComponent(), BorderLayout.CENTER);
    myComponent.validate();
  }
Exemplo n.º 3
0
 public void dispose() {
   myNodeEditor.dispose();
   myComponent.removeAll();
   myDisposed = true;
 }