*/
private void enableListening(IHookCommand ihc, boolean listen) {
if (ihc instanceof HookCommandModel) { // this test returns false if ihc is null
HookCommandModel hcm = (HookCommandModel) ihc;
if (listen) {
hcm.addListener(listenerHookCommand);
}
else {
hcm.removeListener(listenerHookCommand);
}
}