@Override public void dispose() { if (myMockTextEditor != null) { EditorFactory.getInstance().releaseEditor(myMockTextEditor); } myPanel.dispose(); }