/** * This is called to ensure that {@link CommandStackListener#commandStackChanged} is called for each listener. */ protected void notifyListeners() { for (CommandStackListener commandStackListener : listeners) { commandStackListener.commandStackChanged(new EventObject(this)); } }