Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Rennie2007-08-23 16:08:04 +0000
committerMichael Rennie2007-08-23 16:08:04 +0000
commita6c636680515f047ee9b0148ce3ab6bd4f1ec602 (patch)
tree1d0529bb32a35ab8f4e44c69f54ed6e4badc176a /org.eclipse.debug.core
parent944435bf16a29f497764c75644e342a998f11b65 (diff)
downloadeclipse.platform.debug-a6c636680515f047ee9b0148ce3ab6bd4f1ec602.tar.gz
eclipse.platform.debug-a6c636680515f047ee9b0148ce3ab6bd4f1ec602.tar.xz
eclipse.platform.debug-a6c636680515f047ee9b0148ce3ab6bd4f1ec602.zip
Bug 198545 Debug Core should use EMPTY_STRING constant
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/model/LaunchConfigurationDelegate.java18
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java25
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java17
3 files changed, 36 insertions, 24 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LaunchConfigurationDelegate.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LaunchConfigurationDelegate.java
index 7f18e38f0..d7c9663ac 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LaunchConfigurationDelegate.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/model/LaunchConfigurationDelegate.java
@@ -34,6 +34,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.IStatusHandler;
import org.eclipse.debug.internal.core.DebugCoreMessages;
+import org.eclipse.debug.internal.core.IInternalDebugCoreConstants;
/**
* Default implementation of a launch configuration delegate. Provides
@@ -64,28 +65,21 @@ public abstract class LaunchConfigurationDelegate implements ILaunchConfiguratio
private static final String DEBUG_UI = "org.eclipse.debug.ui"; //$NON-NLS-1$
/**
- * Constant to represent the empty string
- *
- * @since 3.2
- */
- private static final String EMPTY_STRING = ""; //$NON-NLS-1$
-
- /**
* Status code for which a UI prompter is registered.
*/
- protected static final IStatus promptStatus = new Status(IStatus.INFO, DEBUG_UI, 200, EMPTY_STRING, null);
+ protected static final IStatus promptStatus = new Status(IStatus.INFO, DEBUG_UI, 200, IInternalDebugCoreConstants.EMPTY_STRING, null);
/**
* Status code for which a prompter is registered to ask the user if they
* want to launch in debug mode when breakpoints are present.
*/
- protected static final IStatus switchToDebugPromptStatus = new Status(IStatus.INFO, DEBUG_CORE, 201, EMPTY_STRING, null);
+ protected static final IStatus switchToDebugPromptStatus = new Status(IStatus.INFO, DEBUG_CORE, 201, IInternalDebugCoreConstants.EMPTY_STRING, null);
/**
* Status code for which a prompter is registered to ask the user if the
* want to continue launch despite existing compile errors
*/
- protected static final IStatus complileErrorPromptStatus = new Status(IStatus.INFO, DEBUG_CORE, 202, EMPTY_STRING, null);
+ protected static final IStatus complileErrorPromptStatus = new Status(IStatus.INFO, DEBUG_CORE, 202, IInternalDebugCoreConstants.EMPTY_STRING, null);
/**
* Status code for which a prompter will ask the user to save any/all of the dirty editors which have only to do
@@ -93,7 +87,7 @@ public abstract class LaunchConfigurationDelegate implements ILaunchConfiguratio
*
* @since 3.2
*/
- protected static final IStatus saveScopedDirtyEditors = new Status(IStatus.INFO, DEBUG_CORE, 222, EMPTY_STRING, null);
+ protected static final IStatus saveScopedDirtyEditors = new Status(IStatus.INFO, DEBUG_CORE, 222, IInternalDebugCoreConstants.EMPTY_STRING, null);
/**
* Status code for which a prompter is registered to ask the user if the
@@ -103,7 +97,7 @@ public abstract class LaunchConfigurationDelegate implements ILaunchConfiguratio
*
* @since 3.1
*/
- protected static final IStatus complileErrorProjectPromptStatus = new Status(IStatus.INFO, DEBUG_CORE, 203, EMPTY_STRING, null);
+ protected static final IStatus complileErrorProjectPromptStatus = new Status(IStatus.INFO, DEBUG_CORE, 203, IInternalDebugCoreConstants.EMPTY_STRING, null);
/* (non-Javadoc)
* @see org.eclipse.debug.core.model.ILaunchConfigurationDelegate2#getLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
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
new file mode 100644
index 000000000..ec6a7c2f2
--- /dev/null
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/IInternalDebugCoreConstants.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2007 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.debug.internal.core;
+
+/**
+ * Contains constants to be used internally in all debug components
+ *
+ * @since 3.4
+ */
+public interface IInternalDebugCoreConstants {
+
+ /**
+ * Represents the empty string
+ */
+ public static final String EMPTY_STRING = ""; //$NON-NLS-1$
+
+}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
index 160d7d4c4..3290ebcb9 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java
@@ -126,20 +126,13 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
* @since 3.2
*/
private static final String DEBUG_UI = "org.eclipse.debug.ui"; //$NON-NLS-1$
-
- /**
- * Constant to represent the empty string
- *
- * @since 3.2
- */
- protected static final String EMPTY_STRING = ""; //$NON-NLS-1$
/**
* Status code for which a UI prompter is registered.
*
* @since 3.2
*/
- protected static final IStatus promptStatus = new Status(IStatus.INFO, DEBUG_UI, 200, EMPTY_STRING, null);
+ protected static final IStatus promptStatus = new Status(IStatus.INFO, DEBUG_UI, 200, IInternalDebugCoreConstants.EMPTY_STRING, null);
/**
* Step filter manager
@@ -1574,7 +1567,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
fPreferredDelegates = new HashSet();
Preferences prefs = DebugPlugin.getDefault().getPluginPreferences();
String preferred = prefs.getString(LaunchManager.PREF_PREFERRED_DELEGATES);
- if(!EMPTY_STRING.equals(preferred)) {
+ if(!IInternalDebugCoreConstants.EMPTY_STRING.equals(preferred)) {
try {
Element root = DebugPlugin.parseDocument(preferred);
NodeList nodes = root.getElementsByTagName(IConfigurationElementConstants.DELEGATE);
@@ -1600,7 +1593,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
}
}
//take type id, modeset, delegate and create entry
- if(delegate != null & !EMPTY_STRING.equals(typeid) & modeset != null) {
+ if(delegate != null & !IInternalDebugCoreConstants.EMPTY_STRING.equals(typeid) & modeset != null) {
fPreferredDelegates.add(new PreferredDelegate(delegate, typeid, modeset));
}
delegate = null;
@@ -2330,7 +2323,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
Element child = null;
ILaunchDelegate delegate = null;
Set modes = null;
- String modestr = EMPTY_STRING;
+ String modestr = IInternalDebugCoreConstants.EMPTY_STRING;
for(int i = 0; i < types.length; i++) {
preferred = ((LaunchConfigurationType)types[i]).getPreferredDelegates();
if(preferred != null && preferred.size() > 0) {
@@ -2348,7 +2341,7 @@ public class LaunchManager extends PlatformObject implements ILaunchManager, IRe
}
}
child.setAttribute(IConfigurationElementConstants.MODES, modestr);
- modestr = EMPTY_STRING;
+ modestr = IInternalDebugCoreConstants.EMPTY_STRING;
root.appendChild(child);
}
}

Back to the top