void () { myEditor.removeCaretListener(this); if (myDialogComponent != null) { myDialogComponent.removeComponentListener(this); myDialogComponent = null; } if (myPopup != null) { myPopup.cancel(); myPopup = null; } }