Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2009-09-01 15:24:35 +0000
committerMichael Rennie2009-09-01 15:24:35 +0000
commit225416539077f735a7e1eca9dfb079bd498d2a3d (patch)
tree2593274cf41fc70ad6e78d0fd28660a16f4397d4 /org.eclipse.debug.ui/ui/org
parenteb425eec7928ce0dd6e7673342c3325ae05d85a8 (diff)
downloadeclipse.platform.debug-225416539077f735a7e1eca9dfb079bd498d2a3d.tar.gz
eclipse.platform.debug-225416539077f735a7e1eca9dfb079bd498d2a3d.tar.xz
eclipse.platform.debug-225416539077f735a7e1eca9dfb079bd498d2a3d.zip
Bug 288192 - Competing launch configurationTabGroup contribution should generate warning
Diffstat (limited to 'org.eclipse.debug.ui/ui/org')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationPresentationManager.java30
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationsMessages.properties2
2 files changed, 20 insertions, 12 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 1a683626e..92e84b0d5 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
@@ -107,7 +107,6 @@ 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();
@@ -118,24 +117,33 @@ public class LaunchConfigurationPresentationManager {
}
modes = group.getModes();
if(modes.isEmpty()) {
- 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()}));
- }
+ reportReplacement((LaunchConfigurationTabGroupExtension) map.put("*", group), group); //$NON-NLS-1$
}
for(Iterator iter = modes.iterator(); iter.hasNext();) {
- 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()}));
- }
+ reportReplacement((LaunchConfigurationTabGroupExtension) map.put(iter.next(), group), group);
}
}
}
}
/**
+ * 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
+ *
+ * @since 3.6
+ */
+ void reportReplacement(LaunchConfigurationTabGroupExtension oldext, LaunchConfigurationTabGroupExtension newext) {
+ if(oldext != null) {
+ Status status = new Status(IStatus.ERROR,
+ DebugUIPlugin.getUniqueIdentifier(),
+ NLS.bind(LaunchConfigurationsMessages.LaunchConfigurationPresentationManager_0,
+ new String[]{oldext.getIdentifier(), oldext.getTypeIdentifier(), newext.getIdentifier()}));
+ DebugUIPlugin.log(status);
+ }
+ }
+
+ /**
* This method is used to collect all of the contributed tabs defined by the <code>launchConfigurationTabs</code>
* extension point
*
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 d4d93d97a..b21c15b7f 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=LaunchConfigurationTabGroupExtension {0} for {1} has been replaced by extension {2}
+LaunchConfigurationPresentationManager_0=Tab group extension: {0} for type {1} has been replaced by extension: {2}
LaunchConfigurationPropertiesDialog_Edit_launch_configuration_properties_1=Edit launch configuration properties
LaunchConfigurationPropertiesDialog_Properties_for__0__2=Edit Configuration

Back to the top