Project: Eclipse_Platform_UI
Bug 91994 [Commands] errors: Duplicate log entry for command warnings
Reported: 2005-04-19 17:00:04 | Status: verified fixed

Build: I20050419-1200 When problems occur parsing commands, you get entries in the log like the ones below. The first entry is an ERROR severity, and repeats the same information as the second entry, which is a warning. This duplication occurs because CommandPersistence#readCategoriesFromCommandsExtensionPoint calls the convenience method WorkbenchPlugin.log(String, IStatus), which creates a separate status object for the provided message. In this case the message is identical to the status, so WorkbenchPlugin.log(IStatus) should be used instead to avoid the duplication. !ENTRY org.eclipse.ui 4 4 2005-04-19 16:51:09.442 !MESSAGE Warnings while parsing the commands from the 'org.eclipse.ui.commands' and 'org.eclipse.ui.actionDefinitions' extension points. !ENTRY org.eclipse.ui 1 0 2005-04-19 16:51:09.473 !MESSAGE Warnings while parsing the commands from the 'org.eclipse.ui.commands' and 'org.eclipse.ui.actionDefinitions' extension points. !SUBENTRY 1 org.eclipse.ui 1 0 2005-04-19 16:51:09.473 !MESSAGE Commands should really have a category, not categoryId='': plug-in='org.eclipse.ui.tests', commandId='org.eclipse.ui.tests.commands.categoryLessCommand'.

Files changed in fix:
bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/commands/CommandPersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextPersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerPersistence.java bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/BindingPersistence.java