diff options
author | Michael Rennie | 2009-09-01 15:12:04 +0000 |
---|---|---|
committer | Michael Rennie | 2009-09-01 15:12:04 +0000 |
commit | eb425eec7928ce0dd6e7673342c3325ae05d85a8 (patch) | |
tree | e76790e09b5bdf07a571ef195ee6b6365d4d10c1 /org.eclipse.debug.ui/ui | |
parent | e6dcd76057bd25dafba9662bb5e833329076c532 (diff) | |
download | eclipse.platform.debug-eb425eec7928ce0dd6e7673342c3325ae05d85a8.tar.gz eclipse.platform.debug-eb425eec7928ce0dd6e7673342c3325ae05d85a8.tar.xz eclipse.platform.debug-eb425eec7928ce0dd6e7673342c3325ae05d85a8.zip |
Bug 288192 - Competing launch configurationTabGroup contribution should generate warning
Diffstat (limited to 'org.eclipse.debug.ui/ui')
3 files changed, 16 insertions, 3 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 8fda9446d..1a683626e 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 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2009 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -37,6 +37,7 @@ import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.LaunchConfigurationTabExtension; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.debug.ui.ILaunchConfigurationTabGroup; +import org.eclipse.osgi.util.NLS; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.activities.IWorkbenchActivitySupport; import org.eclipse.ui.activities.WorkbenchActivityHelper; @@ -106,6 +107,7 @@ public class LaunchConfigurationPresentationManager { String typeId = null; Map map = null; List modes = null; + LaunchConfigurationTabGroupExtension oldext = null; for (int i = 0; i < groups.length; i++) { group = new LaunchConfigurationTabGroupExtension(groups[i]); typeId = group.getTypeIdentifier(); @@ -116,10 +118,18 @@ public class LaunchConfigurationPresentationManager { } modes = group.getModes(); if(modes.isEmpty()) { - map.put("*", group); //$NON-NLS-1$ + oldext = (LaunchConfigurationTabGroupExtension) map.put("*", group); //$NON-NLS-1$ + if(oldext != null) { + DebugUIPlugin.logErrorMessage(NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_0, + new String[]{oldext.getIdentifier(), oldext.getTypeIdentifier(), group.getIdentifier()})); + } } for(Iterator iter = modes.iterator(); iter.hasNext();) { - map.put(iter.next(), group); + oldext = (LaunchConfigurationTabGroupExtension) map.put(iter.next(), group); + if(oldext != null) { + DebugUIPlugin.logErrorMessage(NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_0, + new String[]{oldext.getIdentifier(), oldext.getTypeIdentifier(), group.getIdentifier()})); + } } } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java index 0d085d410..6c88a6bcc 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.java @@ -117,6 +117,8 @@ public class LaunchConfigurationsMessages extends NLS { public static String PerspectiveManager_Unable_to_switch_perpsectives_as_specified_by_launch___0__4; public static String PerspectiveManager_Unable_to_switch_to_perspective___0__2; + public static String LaunchConfigurationPresentationManager_0; + public static String LaunchConfigurationPropertiesDialog_Edit_launch_configuration_properties_1; public static String LaunchConfigurationPropertiesDialog_Properties_for__0__2; 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 71b4daddc..d4d93d97a 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,6 +129,7 @@ LaunchShortcutSelectionDialog_3=Description not available # or any label of a contributed ILaunchMode. LaunchShortcutSelectionDialog_4=&Select what to {0}: +LaunchConfigurationPresentationManager_0=LaunchConfigurationTabGroupExtension {0} for {1} has been replaced by extension {2} LaunchConfigurationPropertiesDialog_Edit_launch_configuration_properties_1=Edit launch configuration properties LaunchConfigurationPropertiesDialog_Properties_for__0__2=Edit Configuration |