diff options
author | Michael Rennie | 2009-09-01 16:35:24 +0000 |
---|---|---|
committer | Michael Rennie | 2009-09-01 16:35:24 +0000 |
commit | 4002072b17b1ef2bd955c0eafbbf3718947cc81f (patch) | |
tree | 0e2800bb5d7739e7d8c0114dd3ea2401d482da32 /org.eclipse.debug.ui/ui | |
parent | 813f28e72b5ba79519898baabbb9e19eb111d87f (diff) | |
download | eclipse.platform.debug-4002072b17b1ef2bd955c0eafbbf3718947cc81f.tar.gz eclipse.platform.debug-4002072b17b1ef2bd955c0eafbbf3718947cc81f.tar.xz eclipse.platform.debug-4002072b17b1ef2bd955c0eafbbf3718947cc81f.zip |
Bug 288192 - Competing launch configurationTabGroup contribution should generate warning
Diffstat (limited to 'org.eclipse.debug.ui/ui')
2 files changed, 9 insertions, 5 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java index 92e84b0d5..3ca3eb706 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java @@ -117,10 +117,13 @@ public class LaunchConfigurationPresentationManager { } modes = group.getModes(); if(modes.isEmpty()) { - reportReplacement((LaunchConfigurationTabGroupExtension) map.put("*", group), group); //$NON-NLS-1$ + String mode = "*"; //$NON-NLS-1$ + reportReplacement((LaunchConfigurationTabGroupExtension) map.put(mode, group), group, mode); } + Set ms = null; for(Iterator iter = modes.iterator(); iter.hasNext();) { - reportReplacement((LaunchConfigurationTabGroupExtension) map.put(iter.next(), group), group); + ms = (Set) iter.next(); + reportReplacement((LaunchConfigurationTabGroupExtension) map.put(ms, group), group, ms); } } } @@ -130,15 +133,16 @@ public class LaunchConfigurationPresentationManager { * Reports if a tab group extension has been replaced by another contribution * @param oldext the old tab group extension from the cache * @param newext the new one being cached + * @param mode the mode(s) the group applies to * * @since 3.6 */ - void reportReplacement(LaunchConfigurationTabGroupExtension oldext, LaunchConfigurationTabGroupExtension newext) { + void reportReplacement(LaunchConfigurationTabGroupExtension oldext, LaunchConfigurationTabGroupExtension newext, Object mode) { if(oldext != null) { Status status = new Status(IStatus.ERROR, DebugUIPlugin.getUniqueIdentifier(), NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_0, - new String[]{oldext.getIdentifier(), oldext.getTypeIdentifier(), newext.getIdentifier()})); + new String[]{oldext.getIdentifier(), oldext.getTypeIdentifier(), mode.toString(), newext.getIdentifier()})); DebugUIPlugin.log(status); } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties index b21c15b7f..be41c0a7c 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties @@ -129,7 +129,7 @@ LaunchShortcutSelectionDialog_3=Description not available # or any label of a contributed ILaunchMode. LaunchShortcutSelectionDialog_4=&Select what to {0}: -LaunchConfigurationPresentationManager_0=Tab group extension: {0} for type {1} has been replaced by extension: {2} +LaunchConfigurationPresentationManager_0=Tab group extension: {0} for type {1} for the {2} mode has been replaced by extension: {3} LaunchConfigurationPropertiesDialog_Edit_launch_configuration_properties_1=Edit launch configuration properties LaunchConfigurationPropertiesDialog_Properties_for__0__2=Edit Configuration |