void (boolean b) { if (b) { if (!myListeningSelection) { getEditor().getSelectionModel().addSelectionListener(mySelectionListener); } } else { if (myListeningSelection) { getEditor().getSelectionModel().removeSelectionListener(mySelectionListener); } } myListeningSelection = b; }