Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2009-11-03 15:08:15 +0000
committerDarin Wright2009-11-03 15:08:15 +0000
commit6c67ce7ea655cfa6854f56a91deb0e11519b841a (patch)
treedaf0d95c90fd25df2a442d00b9b4513879efb869
parente09fd1e6cb632a2cbcd0f96c9becd315573327c8 (diff)
downloadeclipse.platform.debug-6c67ce7ea655cfa6854f56a91deb0e11519b841a.tar.gz
eclipse.platform.debug-6c67ce7ea655cfa6854f56a91deb0e11519b841a.tar.xz
eclipse.platform.debug-6c67ce7ea655cfa6854f56a91deb0e11519b841a.zip
[r352] Bug 293928 - Need ability to disable status handlers
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java7
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugPreferenceInitializer.java3
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java16
3 files changed, 23 insertions, 3 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
index 9e37f3c88..cd9e34105 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/DebugPlugin.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2008 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
@@ -59,6 +59,7 @@ import org.eclipse.debug.internal.core.DebugCoreMessages;
import org.eclipse.debug.internal.core.DebugOptions;
import org.eclipse.debug.internal.core.ExpressionManager;
import org.eclipse.debug.internal.core.IConfigurationElementConstants;
+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
import org.eclipse.debug.internal.core.LaunchManager;
import org.eclipse.debug.internal.core.LogicalStructureManager;
import org.eclipse.debug.internal.core.MemoryBlockManager;
@@ -536,6 +537,10 @@ public class DebugPlugin extends Plugin {
* @since 2.0
*/
public IStatusHandler getStatusHandler(IStatus status) {
+ boolean enabled = getPluginPreferences().getBoolean(IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS);
+ if (!enabled) {
+ return null;
+ }
StatusHandlerKey key = new StatusHandlerKey(status.getPlugin(), status.getCode());
if (fStatusHandlers == null) {
initializeStatusHandlers();
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugPreferenceInitializer.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugPreferenceInitializer.java
index 2ef4d7fef..269c74cb2 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugPreferenceInitializer.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugPreferenceInitializer.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 IBM Corporation and others.
+ * Copyright (c) 2006, 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
@@ -29,6 +29,7 @@ public class DebugPreferenceInitializer extends AbstractPreferenceInitializer {
// Step filter preferences
prefs.setDefault(StepFilterManager.PREF_USE_STEP_FILTERS, false);
prefs.setDefault(LaunchManager.PREF_DELETE_CONFIGS_ON_PROJECT_DELETE, true);
+ prefs.setDefault(IInternalDebugCoreConstants.PREF_ENABLE_STATUS_HANDLERS, true);
}
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java
index ec6a7c2f2..cbcf068ab 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 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
@@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.debug.internal.core;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.debug.core.DebugPlugin;
+
/**
* Contains constants to be used internally in all debug components
*
@@ -21,5 +24,16 @@ public interface IInternalDebugCoreConstants {
* Represents the empty string
*/
public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+ /**
+ * Boolean preference controlling whether status handler extensions
+ * are enabled. Default value is <code>true</code>. When disabled
+ * any call to {@link DebugPlugin#getStatusHandler(IStatus)} will return <code>null</code>.
+ *
+ * @since 3.4.2
+ */
+ public static final String PREF_ENABLE_STATUS_HANDLERS = DebugPlugin.getUniqueIdentifier() + ".PREF_ENABLE_STATUS_HANDLERS"; //$NON-NLS-1$
+
+
}

Back to the top