}
ICommandService service = (ICommandService) PlatformUI.getWorkbench().getAdapter(
ICommandService.class);
Command command = service.getCommand("org.locationtech.udig.tool.edit.clearAction"); //$NON-NLS-1$
command.setHandler(clearEditBlackboardHandler);
if(clearEditBlackboardCommandListener == null){
clearEditBlackboardCommandListener = new ICommandListener(){
public void commandChanged( CommandEvent commandEvent ) {
if (commandEvent.isHandledChanged()) {
commandEvent.getCommand().removeCommandListener(this);
clearEditBlackboardCommandListener = null;
IMap map = ApplicationGIS.getActiveMap();
resetBlackboards(map);
}
}
};
command.addCommandListener(clearEditBlackboardCommandListener);
}
}