@Override public void apply() throws ConfigurationException { myEditor.apply(); if (myModifiableModel.isChanged()) { ApplicationManager.getApplication().runWriteAction(() -> myModifiableModel.commit()); myEditor.disposeUIResources(); myTopPanel.remove(myEditor.getComponent()); createEditor(); } }
@Override public void disposeUIResources() { if (myEditor != null) { myEditor.disposeUIResources(); myTopPanel.remove(myEditor.getComponent()); myEditor = null; } if (myModifiableModel != null) { myModifiableModel.dispose(); myModifiableModel = null; } }