Bug 331259 [Compatibility] 3.x commands no longer have states available to them
bundles/org.eclipse.e4.ui.workbench/src/org/eclipse/e4/ui/internal/workbench/addons/CommandProcessingAddon.java
import org.osgi.service.event.Event;
import org.osgi.service.event.EventHandler;
/**
 * Process commands in the model, feeding them into the command service.
 */
public class CommandProcessingAddon {
	@Inject
	private ECommandService commandService;
	@Inject
	private MApplication application;
	@Inject
	private IEventBroker broker;
	private Category undefinedCategory;
	private EventHandler additionHandler;
	@PostConstruct
	public void init() {
		Activator.trace(Policy.DEBUG_CMDS, "Initialize commands from model", null); 
		undefinedCategory = commandService.defineCategory(MApplication.class.getName(),
				"Application Category", null); 
		createCategories();
		createCommands();
		registerModelListeners();
	}
	@PreDestroy
	public void dispose() {
		unregsiterModelListeners();
	}
	private void registerModelListeners() {
		additionHandler = new EventHandler() {
			public void handleEvent(Event event) {