Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2001-09-25 17:31:34 +0000
committerDarin Wright2001-09-25 17:31:34 +0000
commit2aea0f40ee1aabcdb6c0ac8937d6b8a1454c343c (patch)
treec8337732e947c0de6119b0188ea9bd74d140a470
parentf887134aa017003846f799c8758635e2a83b5dbe (diff)
downloadeclipse.platform.debug-2aea0f40ee1aabcdb6c0ac8937d6b8a1454c343c.tar.gz
eclipse.platform.debug-2aea0f40ee1aabcdb6c0ac8937d6b8a1454c343c.tar.xz
eclipse.platform.debug-2aea0f40ee1aabcdb6c0ac8937d6b8a1454c343c.zip
NLS
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java9
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java28
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java26
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties7
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreResources.properties70
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreUtils.java50
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java6
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/LaunchManager.java6
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java14
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java5
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ProcessMonitor.java5
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RuntimeProcess.java7
12 files changed, 59 insertions, 174 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java b/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java
index a2539668e..505e68db7 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/core/Launch.java
@@ -5,7 +5,11 @@ package org.eclipse.debug.core;
* All Rights Reserved.
*/
-import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.debug.core.model.*; import org.eclipse.debug.internal.core.DebugCoreUtils;
+import java.util.*;
+
+import org.eclipse.core.runtime.*;
+import org.eclipse.debug.core.model.*;
+import org.eclipse.debug.internal.core.DebugCoreMessages;
/**
* An implementation of <code>ILaunch</code>.
@@ -30,7 +34,6 @@ import java.util.*; import org.eclipse.core.runtime.*; import org.eclipse.debug.
public class Launch extends PlatformObject implements ILaunch {
- private final String TERMINATE_FAILED= "launch.terminate_failed";
/**
* Shared, immutable empty collection used for efficiency.
*/
@@ -201,7 +204,7 @@ public class Launch extends PlatformObject implements ILaunch {
*/
public final void terminate() throws DebugException {
MultiStatus status=
- new MultiStatus(DebugPlugin.getDefault().getDescriptor().getUniqueIdentifier(), IDebugStatusConstants.REQUEST_FAILED, DebugCoreUtils.getResourceString(TERMINATE_FAILED), null);
+ new MultiStatus(DebugPlugin.getDefault().getDescriptor().getUniqueIdentifier(), IDebugStatusConstants.REQUEST_FAILED, DebugCoreMessages.getString("Launch.terminate_failed"), null); //$NON-NLS-1$
IProcess[] ps= getProcesses();
// terminate the system processes
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
index cb3cce4e4..16e3ba7c9 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/BreakpointManager.java
@@ -5,12 +5,14 @@ package org.eclipse.debug.internal.core;
* All Rights Reserved.
*/
+import java.text.MessageFormat;
import java.util.*;
import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.*;
import org.eclipse.debug.core.*;
-import org.eclipse.debug.core.model.*;
+import org.eclipse.debug.core.model.Breakpoint;
+import org.eclipse.debug.core.model.IBreakpoint;
/**
* The breakpoint manager manages all registered breakpoints
@@ -19,24 +21,6 @@ import org.eclipse.debug.core.model.*;
* @see IBreakpointManager
*/
public class BreakpointManager implements IBreakpointManager, IResourceChangeListener {
-
- private final static String PREFIX= "breakpoint_manager.";
- private final static String ERROR= PREFIX + "error.";
- private final static String OLD_MARKER= ERROR + "old_marker";
- private final static String ADAPTER= ERROR + "adapter";
- private final static String LABEL_PROPERTY= ERROR + "label_property";
- private final static String EXTENSION= ERROR + "extension";
- private final static String ASSOCIATED_RESOURCE= ERROR + "associated_resource";
- private final static String REQUIRED_ATTRIBUTES= ERROR + "required_attributes";
- private final static String MISSING_BREAKPOINT_DEFINITION= ERROR + "missing_breakpoint_definition";
- private final static String LINE_NUMBER= ERROR + "line_number";
- private final static String CREATION_FAILED= ERROR + "creation_failed";
- private final static String UNSUPPORTED_EXTENSION= ERROR + "unsupported_extension";
- private final static String INSTALLATION_FAILED= ERROR + "installation_failed";
- private final static String REMOVE_FAILED= ERROR + "remove_failed";
- private final static String ENABLE= ERROR + "enable";
- private final static String HIT_COUNT= ERROR + "hit_count";
- private final static String TARGET= ERROR + "target";
/**
* Constants for breakpoint add/remove/change updates
@@ -206,9 +190,9 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
IConfigurationElement config = (IConfigurationElement)fBreakpointExtensions.get(marker.getType());
if (config == null) {
throw new DebugException(new Status(IStatus.ERROR, DebugPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
- IDebugStatusConstants.CONFIGURATION_INVALID, DebugCoreUtils.getFormattedString(MISSING_BREAKPOINT_DEFINITION, marker.getType()), null));
+ IDebugStatusConstants.CONFIGURATION_INVALID, MessageFormat.format(DebugCoreMessages.getString("BreakpointManager.Missing_breakpoint_definition"), new String[] {marker.getType()}), null)); //$NON-NLS-1$
}
- IBreakpoint bp = (IBreakpoint)config.createExecutableExtension("class");
+ IBreakpoint bp = (IBreakpoint)config.createExecutableExtension("class"); //$NON-NLS-1$
bp.setMarker(marker);
addBreakpoint(bp);
return bp;
@@ -238,7 +222,7 @@ public class BreakpointManager implements IBreakpointManager, IResourceChangeLis
String id= breakpoint.getModelIdentifier();
if (id == null) {
throw new DebugException(new Status(IStatus.ERROR, DebugPlugin.getDefault().getDescriptor().getUniqueIdentifier(),
- IDebugStatusConstants.CONFIGURATION_INVALID, DebugCoreUtils.getResourceString(REQUIRED_ATTRIBUTES), null));
+ IDebugStatusConstants.CONFIGURATION_INVALID, DebugCoreMessages.getString("BreakpointManager.Missing_model_identifier"), null)); //$NON-NLS-1$
}
} catch (CoreException e) {
throw new DebugException(e.getStatus());
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
new file mode 100644
index 000000000..4953856fc
--- /dev/null
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.java
@@ -0,0 +1,26 @@
+/*
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved.
+ */
+package org.eclipse.debug.internal.core;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class DebugCoreMessages {
+
+ private static final String RESOURCE_BUNDLE= "org.eclipse.debug.internal.core.DebugCoreMessages";//$NON-NLS-1$
+
+ private static ResourceBundle fgResourceBundle= ResourceBundle.getBundle(RESOURCE_BUNDLE);
+
+ private DebugCoreMessages() {
+ }
+
+ public static String getString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!";//$NON-NLS-2$ //$NON-NLS-1$
+ }
+ }
+}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
new file mode 100644
index 000000000..6e5c43209
--- /dev/null
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreMessages.properties
@@ -0,0 +1,7 @@
+BreakpointManager.Missing_breakpoint_definition=Missing breakpoint definition for marker type {0}
+BreakpointManager.Missing_model_identifier=Breakpoint missing debug model identifier
+InputStreamMonitor.label=Input Stream Monitor
+OutputStreamMonitor.label=Output Stream Monitor
+ProcessMonitor.label=Process Monitor
+RuntimeProcess.terminate_failed=Terminate failed
+Launch.terminate_failed=Terminate failed
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreResources.properties b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreResources.properties
deleted file mode 100644
index 740e6a084..000000000
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreResources.properties
+++ /dev/null
@@ -1,70 +0,0 @@
-##############################################################
-# (c) Copyright IBM Corp. 2000, 2001.
-# All Rights Reserved.
-##############################################################
-
-##############################################################
-# BreakpointManager
-##############################################################
-breakpoint_manager.error.adapter=IDesktopElement adapter required to set a breakpoint.
-breakpoint_manager.error.label_property=Label property required to set a breakpoint.
-breakpoint_manager.error.extension=File extension required to set a breakpoint.
-breakpoint_manager.error.associated_resource=Breakpoint creator did not specify associated resource.
-breakpoint_manager.error.required_attributes= Breakpoint creator did not configure required attributes.
-breakpoint_manager.error.missing_breakpoint_definition= Missing breakpoint definition for marker type {0}.
-breakpoint_manager.error.line_number=Breakpoint already exists at line number {0}.
-breakpoint_manager.error.creation_failed=Breakpoint creation failed.
-breakpoint_manager.error.unsupported_extension=Unsupported file extension {0}.
-breakpoint_manager.error.installation_failed=Breakpoint installation failed - attempt to re-install breakpoint.
-breakpoint_manager.error.remove_failed=Breakpoint remove failed.
-breakpoint_manager.error.enable=Attempt to enable breakpoint that does not exist.
-breakpoint_manager.error.hitcount=Attempt to set hit count on a breakpoint that does not exist.
-breakpoint_manager.error.target=Debug target breakpoint set failed.
-
-##############################################################
-# ExceptionManager
-##############################################################
-exception_manager.error.state=Illegal value for exception state.
-exception_manager.error.duplicate=Failed to create exception - it already exists.
-exception_manager.error.persisting=Error persisting exceptions.
-exception_manager.error.restoring=Error restoring exceptions.
-
-##############################################################
-# InputStreamMonitor
-##############################################################
-input_stream_monitor.label=Input Stream Monitor
-
-##############################################################
-# OutputStreamMonitor
-##############################################################
-output_stream_monitor.label=Output Stream Monitor
-
-##############################################################
-# Launch
-##############################################################
-launch.terminate_failed=Terminate failed
-
-##############################################################
-# LaunchManager
-##############################################################
-launch_manager.error.termination=Unable to terminate launch.
-
-##############################################################
-# ProcessMonitor
-##############################################################
-process_monitor.label=Process Monitor
-
-##############################################################
-# RuntimeProcess
-##############################################################
-runtime_process.error.terminate_failed=Terminate failed.
-
-##############################################################
-# SourceLocation
-##############################################################
-source_location.undetermined=undetermined
-
-##############################################################
-# TargetException
-##############################################################
-target_exception.error.state=Illegal value for exception state \ No newline at end of file
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreUtils.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreUtils.java
index 67a66b862..2e0a80c7d 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreUtils.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/DebugCoreUtils.java
@@ -5,10 +5,6 @@ package org.eclipse.debug.internal.core;
* All Rights Reserved.
*/
-import java.text.MessageFormat;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
import org.eclipse.debug.core.DebugPlugin;
/**
@@ -16,34 +12,6 @@ import org.eclipse.debug.core.DebugPlugin;
*/
public class DebugCoreUtils {
- private static ResourceBundle fgResourceBundle;
-
- /**
- * Utility method
- */
- public static String getResourceString(String key) {
- if (fgResourceBundle == null) {
- fgResourceBundle= getResourceBundle();
- }
- if (fgResourceBundle != null) {
- return fgResourceBundle.getString(key);
- } else {
- return "!" + key + "!";
- }
- }
-
- /**
- * Returns the resource bundle used by the core debug plugin.
- */
- public static ResourceBundle getResourceBundle() {
- try {
- return ResourceBundle.getBundle("org.eclipse.debug.internal.core.DebugCoreResources");
- } catch (MissingResourceException e) {
- logError(e);
- }
- return null;
- }
-
/**
* Convenience method to log internal errors
*/
@@ -51,25 +19,11 @@ public class DebugCoreUtils {
if (DebugPlugin.getDefault().isDebugging()) {
// this message is intentionally not internationalized, as an exception may
// be due to the resource bundle itself
- System.out.println("Internal error logged from debug core: ");
+ System.out.println("Internal error logged from debug core: "); //$NON-NLS-1$
e.printStackTrace();
System.out.println();
}
}
- /**
- * Plug in the single argument to the resource String for the key to get a formatted resource String
- */
- public static String getFormattedString(String key, String arg) {
- String string= getResourceString(key);
- return MessageFormat.format(string, new String[] { arg });
- }
-
- /**
- * Plug in the arguments to the resource String for the key to get a formatted resource String
- */
- public static String getFormattedString(String key, String[] args) {
- String string= getResourceString(key);
- return MessageFormat.format(string, args);
- }
+
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
index 46e45860f..0769de83f 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
@@ -18,10 +18,6 @@ import java.io.InputStream;
* @see IStreamMonitor
*/
public class InputStreamMonitor implements IStreamMonitor {
-
- private final static String PREFIX= "input_stream_monitor.";
- private final static String LABEL= PREFIX + "label";
-
/**
* The input stream being monitored.
*/
@@ -152,7 +148,7 @@ public class InputStreamMonitor implements IStreamMonitor {
public void run() {
read();
}
- }, DebugCoreUtils.getResourceString(LABEL));
+ }, DebugCoreMessages.getString("InputStreamMonitor.label")); //$NON-NLS-1$
fThread.start();
}
}
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 fa79f4762..cb88613e5 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
@@ -18,16 +18,12 @@ import java.util.*;
* @see ILaunchManager
*/
public class LaunchManager extends PlatformObject implements ILaunchManager {
-
- private final static String PREFIX= "launch_manager.";
- private final static String ERROR= PREFIX + "error.";
- private final static String TERMINATION= ERROR + "termination";
/**
* Constant for use as local name part of <code>QualifiedName</code>
* for persisting the default launcher.
*/
- private static final String DEFAULT_LAUNCHER= "launcher";
+ private static final String DEFAULT_LAUNCHER= "launcher"; //$NON-NLS-1$
/**
* Types of notifications
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java
index e27922cc4..ba90299c6 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/Launcher.java
@@ -47,7 +47,7 @@ public class Launcher implements ILauncher {
* @see ILauncher
*/
public String getIdentifier() {
- return fConfigElement.getAttribute("id");
+ return fConfigElement.getAttribute("id"); //$NON-NLS-1$
}
/**
@@ -56,11 +56,11 @@ public class Launcher implements ILauncher {
*/
public Set getModes() {
if (fModes == null) {
- String modes= fConfigElement.getAttribute("modes");
+ String modes= fConfigElement.getAttribute("modes"); //$NON-NLS-1$
if (modes == null) {
return null;
}
- StringTokenizer tokenizer= new StringTokenizer(modes, ",");
+ StringTokenizer tokenizer= new StringTokenizer(modes, ","); //$NON-NLS-1$
fModes = new HashSet(tokenizer.countTokens());
while (tokenizer.hasMoreTokens()) {
fModes.add(tokenizer.nextToken().trim());
@@ -73,14 +73,14 @@ public class Launcher implements ILauncher {
* @see ILauncher.
*/
public String getLabel() {
- return fConfigElement.getAttribute("label");
+ return fConfigElement.getAttribute("label"); //$NON-NLS-1$
}
/**
* @see ILauncher
*/
public String getPerspectiveIdentifier() {
- return fConfigElement.getAttribute("perspective");
+ return fConfigElement.getAttribute("perspective"); //$NON-NLS-1$
}
/**
@@ -89,7 +89,7 @@ public class Launcher implements ILauncher {
public ILauncherDelegate getDelegate() {
if (fDelegate == null) {
try {
- fDelegate = (ILauncherDelegate)fConfigElement.createExecutableExtension("class");
+ fDelegate = (ILauncherDelegate)fConfigElement.createExecutableExtension("class"); //$NON-NLS-1$
} catch (CoreException e) {
//status logged in the #createExecutableExtension code
}
@@ -115,6 +115,6 @@ public class Launcher implements ILauncher {
* @see ILanucher.
*/
public String getIconPath() {
- return fConfigElement.getAttribute("icon");
+ return fConfigElement.getAttribute("icon"); //$NON-NLS-1$
}
} \ No newline at end of file
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
index b05b0104d..65cd9d785 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
@@ -16,9 +16,6 @@ import java.util.Vector;
public class OutputStreamMonitor {
- private final static String PREFIX= "output_stream_monitor.";
- private final static String LABEL= PREFIX + "label";
-
protected OutputStream fStream;
protected Vector fQueue;
protected Thread fThread;
@@ -55,7 +52,7 @@ public class OutputStreamMonitor {
public void run() {
write();
}
- }, DebugCoreUtils.getResourceString(LABEL));
+ }, DebugCoreMessages.getString("OutputStreamMonitor.label")); //$NON-NLS-1$
fThread.start();
}
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ProcessMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ProcessMonitor.java
index e329171ae..befd0c530 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ProcessMonitor.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/ProcessMonitor.java
@@ -13,9 +13,6 @@ import org.eclipse.debug.core.*;
*/
public class ProcessMonitor {
-
- private final static String PREFIX= "process_monitor.";
- private final static String LABEL= PREFIX + "label";
/**
* The <code>IProcess</code> being monitored.
*/
@@ -62,7 +59,7 @@ public class ProcessMonitor {
public void run() {
monitorProcess();
}
- }, DebugCoreUtils.getResourceString(LABEL));
+ }, DebugCoreMessages.getString("ProcessMonitor.label")); //$NON-NLS-1$
fThread.start();
}
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RuntimeProcess.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RuntimeProcess.java
index ce491085e..b886d5724 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RuntimeProcess.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/RuntimeProcess.java
@@ -16,11 +16,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.util.HashMa
* underlying system process for terminataion.
*/
public class RuntimeProcess extends PlatformObject implements IProcess {
-
- private final static String PREFIX= "runtime_process.";
-
- private final static String ERROR = PREFIX + "error.";
- private final static String TERMINATE_FAILED = ERROR + "terminate_failed";
private static final int MAX_WAIT_FOR_DEATH_ATTEMPTS = 10;
@@ -151,7 +146,7 @@ public class RuntimeProcess extends PlatformObject implements IProcess {
}
// clean-up
fMonitor.stopMonitoring();
- IStatus status = new Status(IStatus.ERROR, IDebugConstants.PLUGIN_ID, IDebugStatusConstants.TARGET_REQUEST_FAILED, DebugCoreUtils.getResourceString(TERMINATE_FAILED), null);
+ IStatus status = new Status(IStatus.ERROR, IDebugConstants.PLUGIN_ID, IDebugStatusConstants.TARGET_REQUEST_FAILED, DebugCoreMessages.getString("RuntimeProcess.terminate_failed"), null); //$NON-NLS-1$
throw new DebugException(status);
}
}

Back to the top