void () { if (mySegmentHighlighter != null && myEditor != null){ mySegmentHighlighter.dispose(); myEditor.getContentComponent().removeFocusListener(this); myEditor.getCaretModel().removeCaretListener(this); mySegmentHighlighter = null; myEditor = null; } }