[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-patch] Externalized strings in debug core plugin
|
Here's the patch to externalize strings
in the core debug plugin.
Cheers,
Tanya
Index: ChangeLog
===================================================================
retrieving revision 1.295
diff -u -r1.295 ChangeLog
--- ChangeLog 9 Mar 2004 20:41:52 -0000 1.295
+++ ChangeLog 10 Mar 2004 16:55:08 -0000
@@ -1,3 +1,13 @@
+2004-03-10 Tanya Wolff
+ Externalized strings and marked non-translatable strings
+ Packages affected:
+ org.eclipse.cdt.debug.core
+ org.eclipse.cdt.debug.core.cdi
+ org.eclipse.cdt.debug.internal.core
+ org.eclipse.cdt.debug.internal.core.breakpoints
+ org.eclipse.cdt.debug.internal.core.model
+ org.eclipse.cdt.debug.internal.core.sourcelookup
+
2004-03-09 David Inglis
Added PLATFORM_NATIVE const to ICDebugCongifuration
ICDebugConfiguration.java
Index: src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java
===================================================================
retrieving revision 1.14
diff -u -r1.14 CDebugCorePlugin.java
--- src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java 23 Oct 2003 17:35:37 -0000 1.14
+++ src/org/eclipse/cdt/debug/core/CDebugCorePlugin.java 10 Mar 2004 16:55:08 -0000
@@ -6,7 +6,10 @@
package org.eclipse.cdt.debug.core;
+import java.text.MessageFormat;
import java.util.HashMap;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
import org.eclipse.cdt.debug.core.sourcelookup.ICSourceLocation;
import org.eclipse.cdt.debug.internal.core.DebugConfiguration;
@@ -26,6 +29,7 @@
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IBreakpointManager;
import org.eclipse.debug.core.model.IBreakpoint;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/**
* The main plugin class to be used in the desktop.
@@ -39,13 +43,21 @@
//The shared instance.
private static CDebugCorePlugin plugin;
+ private static ResourceBundle fgResourceBundle;
private HashMap fDebugConfigurations;
private IAsyncExecutor fAsyncExecutor = null;
private SessionManager fSessionManager = null;
-
+
+ static {
+ try {
+ fgResourceBundle = ResourceBundle.getBundle("org.eclipse.cdt.debug.core.CDebugCorePluginResources"); //$NON-NLS-1$
+ } catch (MissingResourceException x) {
+ fgResourceBundle = null;
+ }
+ }
/**
* The constructor.
*/
@@ -92,6 +104,27 @@
return getDefault().getDescriptor().getUniqueIdentifier();
}
+ public static String getResourceString(String key) {
+ try {
+ return fgResourceBundle.getString(key);
+ } catch (MissingResourceException e) {
+ return "!" + key + "!"; //$NON-NLS-1$ //$NON-NLS-2$
+ } catch (NullPointerException e) {
+ return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ public static String getFormattedString(String key, String arg) {
+ return MessageFormat.format(getResourceString(key), new String[] { arg });
+ }
+
+ public static String getFormattedString(String key, String[] args) {
+ return MessageFormat.format(getResourceString(key), args);
+ }
+
+ public static ResourceBundle getResourceBundle() {
+ return fgResourceBundle;
+ }
+
/**
* Logs the specified throwable with this plug-in's log.
*
@@ -140,7 +173,7 @@
private void initializeDebugConfiguration() {
IPluginDescriptor descriptor= getDefault().getDescriptor();
- IExtensionPoint extensionPoint= descriptor.getExtensionPoint("CDebugger");
+ IExtensionPoint extensionPoint= descriptor.getExtensionPoint("CDebugger"); //$NON-NLS-1$
IConfigurationElement[] infos= extensionPoint.getConfigurationElements();
fDebugConfigurations = new HashMap(infos.length);
for (int i= 0; i < infos.length; i++) {
@@ -163,7 +196,7 @@
}
ICDebugConfiguration dbgCfg = (ICDebugConfiguration) fDebugConfigurations.get(id);
if ( dbgCfg == null ) {
- IStatus status = new Status(IStatus.ERROR, getUniqueIdentifier(), 100, "No such debugger", null);
+ IStatus status = new Status(IStatus.ERROR, getUniqueIdentifier(), 100, CDebugCorePlugin.getResourceString("core.CDebugCorePlugin.No_such_debugger"), null); //$NON-NLS-1$
throw new CoreException(status);
}
return dbgCfg;
Index: src/org/eclipse/cdt/debug/core/CDebugModel.java
===================================================================
retrieving revision 1.50
diff -u -r1.50 CDebugModel.java
--- src/org/eclipse/cdt/debug/core/CDebugModel.java 26 Nov 2003 16:18:27 -0000 1.50
+++ src/org/eclipse/cdt/debug/core/CDebugModel.java 10 Mar 2004 16:55:09 -0000
@@ -659,14 +659,15 @@
private static void stopInMain( CDebugTarget target ) throws DebugException
{
- ICDILocation location = target.getCDISession().getBreakpointManager().createLocation( "", "main", 0 );
+ ICDILocation location = target.getCDISession().getBreakpointManager().createLocation( "", "main", 0 ); //$NON-NLS-1$ //$NON-NLS-2$
try
{
target.setInternalTemporaryBreakpoint( location );
}
catch( DebugException e )
{
- String message = MessageFormat.format( "Unable to set temporary breakpoint in main.\nReason: {0}\nContinue?", new String[] { e.getStatus().getMessage() } );
+ //String message = MessageFormat.format( "Unable to set temporary breakpoint in main.\nReason: {0}\nContinue?", new String[] { e.getStatus().getMessage() } );
+ String message = CDebugCorePlugin.getFormattedString("core.CDebugCorePlugin.Unable_to_set_temp_brkpt", new String[] { e.getStatus().getMessage() } ); //$NON-NLS-1$
IStatus newStatus = new Status( IStatus.WARNING,
e.getStatus().getPlugin(),
ICDebugInternalConstants.STATUS_CODE_QUESTION,
Index: src/org/eclipse/cdt/debug/core/CDebugUtils.java
===================================================================
retrieving revision 1.6
diff -u -r1.6 CDebugUtils.java
--- src/org/eclipse/cdt/debug/core/CDebugUtils.java 26 Nov 2003 16:18:27 -0000 1.6
+++ src/org/eclipse/cdt/debug/core/CDebugUtils.java 10 Mar 2004 16:55:09 -0000
@@ -93,7 +93,7 @@
{
String addressString = Long.toHexString( address );
StringBuffer sb = new StringBuffer( 10 );
- sb.append( "0x" );
+ sb.append( "0x" ); //$NON-NLS-1$
for ( int i = 0; i < 8 - addressString.length(); ++i )
{
sb.append( '0' );
@@ -276,7 +276,7 @@
OutputFormat format = new OutputFormat();
format.setIndenting( true );
format.setLineSeparator( lineSeparator ); //$NON-NLS-1$
- Serializer serializer = SerializerFactory.getSerializerFactory( Method.XML ).makeSerializer( new OutputStreamWriter( s, "UTF8" ), format );
+ Serializer serializer = SerializerFactory.getSerializerFactory( Method.XML ).makeSerializer( new OutputStreamWriter( s, "UTF8" ), format ); //$NON-NLS-1$
serializer.asDOMSerializer().serialize( doc );
return s.toString( "UTF8" ); //$NON-NLS-1$
}
@@ -294,7 +294,7 @@
OutputFormat format = new OutputFormat();
format.setIndenting( true );
format.setLineSeparator( System.getProperty( "line.separator" ) ); //$NON-NLS-1$
- Serializer serializer = SerializerFactory.getSerializerFactory( Method.XML ).makeSerializer( new OutputStreamWriter( s, "UTF8" ), format );
+ Serializer serializer = SerializerFactory.getSerializerFactory( Method.XML ).makeSerializer( new OutputStreamWriter( s, "UTF8" ), format ); //$NON-NLS-1$
serializer.asDOMSerializer().serialize( doc );
return s.toString( "UTF8" ); //$NON-NLS-1$
}
@@ -316,13 +316,13 @@
{
String functionName = function.getElementName();
StringBuffer name = new StringBuffer( functionName );
- if ( functionName.indexOf( "::" ) != -1 )
+ if ( functionName.indexOf( "::" ) != -1 ) //$NON-NLS-1$
{
String[] params = function.getParameterTypes();
name.append( '(' );
if ( params.length == 0 )
{
- name.append( "void" );
+ name.append( "void" ); //$NON-NLS-1$
}
else
{
Index: src/org/eclipse/cdt/debug/core/ICDTLaunchConfigurationConstants.java
===================================================================
retrieving revision 1.5
diff -u -r1.5 ICDTLaunchConfigurationConstants.java
--- src/org/eclipse/cdt/debug/core/ICDTLaunchConfigurationConstants.java 11 Sep 2003 17:44:39 -0000 1.5
+++ src/org/eclipse/cdt/debug/core/ICDTLaunchConfigurationConstants.java 10 Mar 2004 16:55:09 -0000
@@ -1,4 +1,5 @@
package org.eclipse.cdt.debug.core;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/*
* (c) Copyright QNX Software System 2002.
@@ -8,12 +9,12 @@
public interface ICDTLaunchConfigurationConstants {
- public static final String CDT_LAUNCH_ID = "org.eclipse.cdt.launch";
+ public static final String CDT_LAUNCH_ID = "org.eclipse.cdt.launch"; //$NON-NLS-1$
/**
* This is the launch type id.
*/
- public static final String ID_LAUNCH_C_APP = "org.eclipse.cdt.launch.localCLaunch";
+ public static final String ID_LAUNCH_C_APP = "org.eclipse.cdt.launch.localCLaunch"; //$NON-NLS-1$
/**
* Launch configuration attribute key. The value is a name of
@@ -105,19 +106,21 @@
* Launch configuration attribute value. The key is ATTR_DEBUGGER_START_MODE.
* Startup debugger running the program.
*/
- public static String DEBUGGER_MODE_RUN = "run";
+ public static String DEBUGGER_MODE_RUN = "run"; //$NON-NLS-1$
/**
* Launch configuration attribute value. The key is ATTR_DEBUGGER_START_MODE.
* Startup debugger and attach to running process.
*/
- public static String DEBUGGER_MODE_ATTACH = "attach";
+ public static String DEBUGGER_MODE_ATTACH = "attach"; //$NON-NLS-1$
+
/**
* Launch configuration attribute value. The key is ATTR_DEBUGGER_START_MODE.
* Startup debugger to view a core file.
*/
- public static String DEBUGGER_MODE_CORE = "core";
+ public static String DEBUGGER_MODE_CORE = "core"; //$NON-NLS-1$
+
/**
* Status code indicating that the Eclipse runtime does not support
Index: src/org/eclipse/cdt/debug/core/cdi/CDIException.java
===================================================================
retrieving revision 1.3
diff -u -r1.3 CDIException.java
--- src/org/eclipse/cdt/debug/core/cdi/CDIException.java 5 Dec 2002 16:02:18 -0000 1.3
+++ src/org/eclipse/cdt/debug/core/cdi/CDIException.java 10 Mar 2004 16:55:09 -0000
@@ -14,7 +14,7 @@
*/
public class CDIException extends Exception {
- String details = "";
+ String details = ""; //$NON-NLS-1$
public CDIException() {
super();
Index: src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java
===================================================================
retrieving revision 1.6
diff -u -r1.6 CBreakpointManager.java
--- src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java 10 Nov 2003 23:15:04 -0000 1.6
+++ src/org/eclipse/cdt/debug/internal/core/CBreakpointManager.java 10 Mar 2004 16:55:11 -0000
@@ -333,15 +333,15 @@
}
catch( CoreException e )
{
- requestFailed( "Set breakpoint failed. Reason: " + e.getMessage(), e );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.CBreakpointManager.Set_breakpoint_failed") + e.getMessage(), e ); //$NON-NLS-1$
}
catch( NumberFormatException e )
{
- requestFailed( "Set breakpoint failed. Reason: " + e.getMessage(), e );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.CBreakpointManager.Set_breakpoint_failed") + e.getMessage(), e ); //$NON-NLS-1$
}
catch( CDIException e )
{
- targetRequestFailed( "Set breakpoint failed. Reason: " + e.getMessage(), e );
+ targetRequestFailed( CDebugCorePlugin.getResourceString("internal.core.CBreakpointManager.Set_breakpoint_failed") + e.getMessage(), e ); //$NON-NLS-1$
}
}
@@ -375,7 +375,7 @@
}
catch( CDIException e )
{
- targetRequestFailed( "Delete breakpoint failed. Reason: " + e.getMessage(), e );
+ targetRequestFailed( CDebugCorePlugin.getResourceString("internal.core.CBreakpointManager.Delete_breakpoint_failed") + e.getMessage(), e ); //$NON-NLS-1$
}
}
}
@@ -411,7 +411,7 @@
int ignoreCount = breakpoint.getIgnoreCount();
int oldIgnoreCount = delta.getAttribute( ICBreakpoint.IGNORE_COUNT, 0 );
String condition = breakpoint.getCondition();
- String oldCondition = delta.getAttribute( ICBreakpoint.CONDITION, "" );
+ String oldCondition = delta.getAttribute( ICBreakpoint.CONDITION, "" ); //$NON-NLS-1$
if ( enabled != oldEnabled )
{
cdiBreakpoint.setEnabled( enabled );
@@ -424,11 +424,11 @@
}
catch( CoreException e )
{
- requestFailed( "Change breakpoint properties failed. Reason: " + e.getMessage(), e );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.CBreakpointManager.Change_brkpt_properties_failed") + e.getMessage(), e ); //$NON-NLS-1$
}
catch( CDIException e )
{
- targetRequestFailed( "Change breakpoint properties failed. Reason: " + e.getMessage(), e );
+ targetRequestFailed( CDebugCorePlugin.getResourceString("internal.core.CBreakpointManager.Change_brkpt_properties_failed") + e.getMessage(), e ); //$NON-NLS-1$
}
}
@@ -631,7 +631,7 @@
{
ICDIBreakpointManager bm = getCDIBreakpointManager();
String function = breakpoint.getFunction();
- String fileName = ( function != null && function.indexOf( "::" ) == -1 ) ? breakpoint.getFileName() : null;
+ String fileName = ( function != null && function.indexOf( "::" ) == -1 ) ? breakpoint.getFileName() : null; //$NON-NLS-1$
ICDILocation location = bm.createLocation( fileName, function, -1 );
ICDIBreakpoint cdiBreakpoint = bm.setLocationBreakpoint( ICDIBreakpoint.REGULAR, location, null, null, true );
getBreakpointMap().put( breakpoint, cdiBreakpoint );
Index: src/org/eclipse/cdt/debug/internal/core/CRegisterManager.java
===================================================================
retrieving revision 1.3
diff -u -r1.3 CRegisterManager.java
--- src/org/eclipse/cdt/debug/internal/core/CRegisterManager.java 26 Nov 2003 16:18:27 -0000 1.3
+++ src/org/eclipse/cdt/debug/internal/core/CRegisterManager.java 10 Mar 2004 16:55:11 -0000
@@ -124,7 +124,7 @@
}
if ( regObjects != null )
{
- fRegisterGroups.add( new CRegisterGroup( getDebugTarget(), "Main", regObjects ) );
+ fRegisterGroups.add( new CRegisterGroup( getDebugTarget(), "Main", regObjects ) ); //$NON-NLS-1$
}
}
Index: src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java
===================================================================
retrieving revision 1.6
diff -u -r1.6 DebugConfiguration.java
--- src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java 28 Jul 2003 13:36:24 -0000 1.6
+++ src/org/eclipse/cdt/debug/internal/core/DebugConfiguration.java 10 Mar 2004 16:55:11 -0000
@@ -13,6 +13,7 @@
import org.eclipse.core.boot.BootLoader;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
public class DebugConfiguration implements ICDebugConfiguration {
/**
@@ -21,7 +22,7 @@
private IConfigurationElement fElement;
private HashSet fModes;
private HashSet fCPUs;
- public static final String NATIVE = "native";
+ public static final String NATIVE = "native"; //$NON-NLS-1$
public DebugConfiguration(IConfigurationElement element) {
fElement = element;
@@ -32,12 +33,12 @@
}
public ICDebugger getDebugger() throws CoreException {
- return (ICDebugger) getConfigurationElement().createExecutableExtension("class");
+ return (ICDebugger) getConfigurationElement().createExecutableExtension("class"); //$NON-NLS-1$
}
public String getName() {
String name = getConfigurationElement().getAttribute("name"); //$NON-NLS-1$
- return name != null ? name : "";
+ return name != null ? name : ""; //$NON-NLS-1$
}
public String getID() {
@@ -45,7 +46,7 @@
}
public String getPlatform() {
- String platform = getConfigurationElement().getAttribute("platform");
+ String platform = getConfigurationElement().getAttribute("platform"); //$NON-NLS-1$
if (platform == null) {
return NATIVE;
}
Index: src/org/eclipse/cdt/debug/internal/core/DisassemblyStorage.java
===================================================================
retrieving revision 1.10
diff -u -r1.10 DisassemblyStorage.java
--- src/org/eclipse/cdt/debug/internal/core/DisassemblyStorage.java 28 Jul 2003 19:40:22 -0000 1.10
+++ src/org/eclipse/cdt/debug/internal/core/DisassemblyStorage.java 10 Mar 2004 16:55:11 -0000
@@ -20,6 +20,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IDebugTarget;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/**
* Enter type comment.
@@ -110,7 +111,8 @@
{
// ignore
}
- return "disassembly";
+ return CDebugCorePlugin.getResourceString("internal.core.DisassemblyStorage.disassembly"); //$NON-NLS-1$
+
}
/* (non-Javadoc)
@@ -206,7 +208,7 @@
sb.append( '+' );
sb.append( instruction.getOffset() );
}
- sb.append( ">:" );
+ sb.append( ">:" ); //$NON-NLS-1$
sb.append( spaces, 0, instrPosition - sb.length() );
}
sb.append( instruction.getOpcode() );
Index: src/org/eclipse/cdt/debug/internal/core/breakpoints/CAddressBreakpoint.java
===================================================================
retrieving revision 1.9
diff -u -r1.9 CAddressBreakpoint.java
--- src/org/eclipse/cdt/debug/internal/core/breakpoints/CAddressBreakpoint.java 28 Jul 2003 19:40:22 -0000 1.9
+++ src/org/eclipse/cdt/debug/internal/core/breakpoints/CAddressBreakpoint.java 10 Mar 2004 16:55:12 -0000
@@ -13,6 +13,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugException;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/**
*
@@ -92,7 +93,7 @@
*/
protected String getMarkerMessage() throws CoreException
{
- StringBuffer sb = new StringBuffer( "Address breakpoint:" );
+ StringBuffer sb = new StringBuffer( CDebugCorePlugin.getResourceString("internal.core.breakpoints.CAddressBreakpoint.Address_breakpoint") ); //$NON-NLS-1$
String name = ensureMarker().getResource().getName();
if ( name != null && name.length() > 0 )
{
@@ -102,7 +103,7 @@
try
{
long address = Long.parseLong( getAddress() );
- sb.append( " [address: " );
+ sb.append( CDebugCorePlugin.getResourceString("internal.core.breakpoints.CAddressBreakpoint.address") ); //$NON-NLS-1$
sb.append( CDebugUtils.toHexAddressString( address ) );
sb.append( ']' );
}
Index: src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java
===================================================================
retrieving revision 1.14
diff -u -r1.14 CBreakpoint.java
--- src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java 10 Nov 2003 23:11:18 -0000 1.14
+++ src/org/eclipse/cdt/debug/internal/core/breakpoints/CBreakpoint.java 10 Mar 2004 16:55:12 -0000
@@ -21,6 +21,7 @@
import org.eclipse.debug.core.DebugPlugin;
import org.eclipse.debug.core.IDebugEventSetListener;
import org.eclipse.debug.core.model.Breakpoint;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/**
*
@@ -107,7 +108,7 @@
*/
public String getCondition() throws CoreException
{
- return ensureMarker().getAttribute( CONDITION, "" );
+ return ensureMarker().getAttribute( CONDITION, "" ); //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -265,8 +266,8 @@
int ignoreCount = getIgnoreCount();
if ( ignoreCount > 0 )
{
- sb.append( " [" );
- sb.append( "ignore count:" );
+ sb.append( " [" ); //$NON-NLS-1$
+ sb.append( CDebugCorePlugin.getResourceString("internal.core.breakpoints.CBreakpoint.ignore_count") ); //$NON-NLS-1$
sb.append( ' ' );
sb.append( ignoreCount );
sb.append( ']' );
@@ -274,7 +275,7 @@
String condition = getCondition();
if ( condition != null && condition.length() > 0 )
{
- sb.append( " if " );
+ sb.append( CDebugCorePlugin.getResourceString("internal.core.breakpoints.CBreakpoint.if") ); //$NON-NLS-1$
sb.append( condition );
}
return sb.toString();
Index: src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java
===================================================================
retrieving revision 1.9
diff -u -r1.9 CFunctionBreakpoint.java
--- src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java 6 May 2003 16:28:55 -0000 1.9
+++ src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java 10 Mar 2004 16:55:12 -0000
@@ -13,6 +13,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugException;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/**
*
@@ -112,7 +113,7 @@
*/
protected String getMarkerMessage() throws CoreException
{
- StringBuffer sb = new StringBuffer( "Function breakpoint:" );
+ StringBuffer sb = new StringBuffer( CDebugCorePlugin.getResourceString("internal.core.breakpoints.CFunctionBreakpoint.Function_breakpoint") ); //$NON-NLS-1$
String name = ensureMarker().getResource().getName();
if ( name != null && name.length() > 0 )
{
@@ -122,8 +123,8 @@
String function = getFunction();
if ( function != null && function.trim().length() > 0 )
{
- sb.append( " [" );
- sb.append( "function:" );
+ sb.append( " [" ); //$NON-NLS-1$
+ sb.append( CDebugCorePlugin.getResourceString("internal.core.breakpoints.CFunctionBreakpoint.function") ); //$NON-NLS-1$
sb.append( ' ' );
sb.append( function.trim() );
sb.append( ']' );
Index: src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java
===================================================================
retrieving revision 1.8
diff -u -r1.8 CLineBreakpoint.java
--- src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java 6 May 2003 16:28:55 -0000 1.8
+++ src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java 10 Mar 2004 16:55:12 -0000
@@ -12,6 +12,7 @@
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.DebugException;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/**
*
@@ -75,7 +76,7 @@
*/
protected String getMarkerMessage() throws CoreException
{
- StringBuffer sb = new StringBuffer( "Line breakpoint:" );
+ StringBuffer sb = new StringBuffer( CDebugCorePlugin.getResourceString("internal.core.breakpoints.CLineBreakpoint.Line_breakpoint") ); //$NON-NLS-1$
String fileName = ensureMarker().getResource().getName();
if ( fileName != null && fileName.length() > 0 )
{
@@ -85,8 +86,8 @@
int lineNumber = getLineNumber();
if ( lineNumber > 0 )
{
- sb.append( " [" );
- sb.append( "line:" );
+ sb.append( " [" ); //$NON-NLS-1$
+ sb.append( CDebugCorePlugin.getResourceString("internal.core.breakpoints.CLineBreakpoint.line") ); //$NON-NLS-1$
sb.append( ' ' );
sb.append( lineNumber );
sb.append( ']' );
Index: src/org/eclipse/cdt/debug/internal/core/model/CArrayPartition.java
===================================================================
retrieving revision 1.11
diff -u -r1.11 CArrayPartition.java
--- src/org/eclipse/cdt/debug/internal/core/model/CArrayPartition.java 11 Sep 2003 20:57:22 -0000 1.11
+++ src/org/eclipse/cdt/debug/internal/core/model/CArrayPartition.java 10 Mar 2004 16:55:13 -0000
@@ -18,6 +18,7 @@
import org.eclipse.cdt.debug.core.model.ICType;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IValue;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/**
*
@@ -69,7 +70,7 @@
StringBuffer name = new StringBuffer();
name.append( '[' );
name.append( fStart );
- name.append( ".." );
+ name.append( ".." ); //$NON-NLS-1$
name.append( fEnd );
name.append( ']' );
return name.toString();
@@ -177,7 +178,7 @@
}
catch (CDIException e)
{
- requestFailed( "Type is not available.", e );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.model.CArrayPartition.Type_not_available"), e ); //$NON-NLS-1$
}
}
return fType;
@@ -207,7 +208,7 @@
}
catch( CDIException e )
{
- requestFailed( "Qualified name is not available.", e );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.model.CArrayPartition.Qualified_name_not_available"), e ); //$NON-NLS-1$
}
}
return fQualifiedName;
Index: src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java
===================================================================
retrieving revision 1.12
diff -u -r1.12 CDebugElement.java
--- src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java 10 Feb 2004 23:00:21 -0000 1.12
+++ src/org/eclipse/cdt/debug/internal/core/model/CDebugElement.java 10 Mar 2004 16:55:13 -0000
@@ -249,7 +249,7 @@
*/
public void targetRequestFailed( String message, CDIException e ) throws DebugException
{
- requestFailed( "Target request failed: " + message, e, DebugException.TARGET_REQUEST_FAILED );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.model.CDebugElement.Target_request_failed") + message, e, DebugException.TARGET_REQUEST_FAILED ); //$NON-NLS-1$
}
/**
@@ -274,7 +274,7 @@
*/
public void targetRequestFailed( String message, Throwable e ) throws DebugException
{
- throwDebugException( "Target request failed: " + message, DebugException.TARGET_REQUEST_FAILED, e );
+ throwDebugException( CDebugCorePlugin.getResourceString("internal.core.model.CDebugElement.Target_request_failed") + message, DebugException.TARGET_REQUEST_FAILED, e ); //$NON-NLS-1$
}
/**
Index: src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java
===================================================================
retrieving revision 1.119
diff -u -r1.119 CDebugTarget.java
--- src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java 23 Feb 2004 18:56:28 -0000 1.119
+++ src/org/eclipse/cdt/debug/internal/core/model/CDebugTarget.java 10 Mar 2004 16:55:14 -0000
@@ -856,7 +856,7 @@
if ( !canDisconnect() )
{
- notSupported( "Session does not support \'disconnect\'" );
+ notSupported( CDebugCorePlugin.getResourceString("internal.core.model.CDebugTarget.Disconnect_session_unsupported") ); //$NON-NLS-1$
}
try
@@ -1108,7 +1108,7 @@
try
{
- ICDILocation location = getCDISession().getBreakpointManager().createLocation( "", "main", 0 );
+ ICDILocation location = getCDISession().getBreakpointManager().createLocation( "", "main", 0 ); //$NON-NLS-1$ //$NON-NLS-2$
setInternalTemporaryBreakpoint( location );
getCDITarget().restart();
restarted();
@@ -1529,9 +1529,8 @@
{
MultiStatus status = new MultiStatus( CDebugCorePlugin.getUniqueIdentifier(),
ICDebugInternalConstants.STATUS_CODE_ERROR,
- "The execution of program is suspended because of error.",
- null );
- StringTokenizer st = new StringTokenizer( info.getDetailMessage(), "\n\r" );
+ CDebugCorePlugin.getResourceString("internal.core.model.CDebugTarget.Execution_suspended_because_of_error"), null ); //$NON-NLS-1$
+ StringTokenizer st = new StringTokenizer( info.getDetailMessage(), "\n\r" ); //$NON-NLS-1$
while( st.hasMoreTokens() )
{
String token = st.nextToken();
@@ -2061,7 +2060,7 @@
public IPath getPath()
{
- IPath path = new Path("");
+ IPath path = new Path(""); //$NON-NLS-1$
ICElement parent = var.getParent();
if ( parent instanceof IBinaryModule )
{
@@ -2372,7 +2371,7 @@
*/
public String toString()
{
- String result = "";
+ String result = ""; //$NON-NLS-1$
try
{
result = getName();
Index: src/org/eclipse/cdt/debug/internal/core/model/CDummyStackFrame.java
===================================================================
retrieving revision 1.2
diff -u -r1.2 CDummyStackFrame.java
--- src/org/eclipse/cdt/debug/internal/core/model/CDummyStackFrame.java 2 Dec 2002 23:22:22 -0000 1.2
+++ src/org/eclipse/cdt/debug/internal/core/model/CDummyStackFrame.java 10 Mar 2004 16:55:14 -0000
@@ -87,7 +87,7 @@
*/
public String getName() throws DebugException
{
- return "...";
+ return "..."; //$NON-NLS-1$
}
/* (non-Javadoc)
Index: src/org/eclipse/cdt/debug/internal/core/model/CGlobalVariable.java
===================================================================
retrieving revision 1.3
diff -u -r1.3 CGlobalVariable.java
--- src/org/eclipse/cdt/debug/internal/core/model/CGlobalVariable.java 13 Aug 2003 18:19:53 -0000 1.3
+++ src/org/eclipse/cdt/debug/internal/core/model/CGlobalVariable.java 10 Mar 2004 16:55:14 -0000
@@ -49,7 +49,7 @@
}
catch( CDIException e )
{
- requestFailed( "", e );
+ requestFailed( "", e ); //$NON-NLS-1$
}
int[] dims = getType().getArrayDimensions();
if ( dims.length > 0 && dims[0] > 0 )
Index: src/org/eclipse/cdt/debug/internal/core/model/CModificationVariable.java
===================================================================
retrieving revision 1.14
diff -u -r1.14 CModificationVariable.java
--- src/org/eclipse/cdt/debug/internal/core/model/CModificationVariable.java 20 Jun 2003 21:16:16 -0000 1.14
+++ src/org/eclipse/cdt/debug/internal/core/model/CModificationVariable.java 10 Mar 2004 16:55:14 -0000
@@ -12,6 +12,7 @@
import org.eclipse.cdt.debug.core.cdi.model.ICDIVariableObject;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IValue;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/**
*
@@ -69,7 +70,7 @@
if ( cdiVariable != null )
cdiVariable.setValue( newExpression );
else
- requestFailed( "Unable to set value.", null );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.model.CModificationVariable.Unable_to_set_value"), null ); //$NON-NLS-1$
}
catch( CDIException e )
@@ -93,7 +94,7 @@
if ( cdiVariable != null )
cdiVariable.setValue( value );
else
- requestFailed( "Unable to set value.", null );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.model.CModificationVariable.Unable_to_set_value"), null ); //$NON-NLS-1$
}
catch( CDIException e )
{
Index: src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java
===================================================================
retrieving revision 1.22
diff -u -r1.22 CStackFrame.java
--- src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java 23 Jun 2003 19:35:34 -0000 1.22
+++ src/org/eclipse/cdt/debug/internal/core/model/CStackFrame.java 10 Mar 2004 16:55:14 -0000
@@ -6,6 +6,7 @@
package org.eclipse.cdt.debug.internal.core.model;
+import java.text.NumberFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -205,16 +206,26 @@
public String getName() throws DebugException
{
ICDILocation location = getCDIStackFrame().getLocation();
- String name = new String();
+
+ String func = ""; //$NON-NLS-1$
+ String file = ""; //$NON-NLS-1$
+ String line = ""; //$NON-NLS-1$
+
if ( location.getFunction() != null && location.getFunction().trim().length() > 0 )
- name += location.getFunction() + "() ";
- if ( location.getFile() != null && location.getFile().trim().length() > 0 )
- {
- name += "at " + location.getFile() + ":" ;
- if ( location.getLineNumber() != 0 )
- name += location.getLineNumber();
- }
- return name.toString();
+ func += location.getFunction() + "() "; //$NON-NLS-1$
+
+ if ( location.getFile() != null && location.getFile().trim().length() > 0 )
+ {
+ file = location.getFile();
+
+ if ( location.getLineNumber() != 0 ) {
+ line = NumberFormat.getInstance().format(new Integer(location.getLineNumber()));
+ }
+ } else {
+ return func;
+ }
+ return CDebugCorePlugin.getFormattedString("internal.core.model.CStackFrame.function_at_file", new String[] {func, file}) + line; //$NON-NLS-1$
+
}
/* (non-Javadoc)
Index: src/org/eclipse/cdt/debug/internal/core/model/CThread.java
===================================================================
retrieving revision 1.39
diff -u -r1.39 CThread.java
--- src/org/eclipse/cdt/debug/internal/core/model/CThread.java 17 Feb 2004 19:05:42 -0000 1.39
+++ src/org/eclipse/cdt/debug/internal/core/model/CThread.java 10 Mar 2004 16:55:15 -0000
@@ -45,6 +45,7 @@
import org.eclipse.debug.core.model.IBreakpoint;
import org.eclipse.debug.core.model.IStackFrame;
import org.eclipse.debug.core.model.IThread;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/**
*
@@ -274,7 +275,7 @@
}
catch( CDIException e )
{
- setStatus( ICDebugElementErrorStatus.WARNING, "Stack is not available: " + e.getMessage() );
+ setStatus( ICDebugElementErrorStatus.WARNING, CDebugCorePlugin.getResourceString("internal.core.model.CThread.Stack_not_available") + e.getMessage() ); //$NON-NLS-1$
targetRequestFailed( e.getMessage(), null );
}
return new ICDIStackFrame[0];
@@ -1103,7 +1104,7 @@
}
catch( CDIException e )
{
- setStatus( ICDebugElementErrorStatus.WARNING, "Stack is not available: " + e.getMessage() );
+ setStatus( ICDebugElementErrorStatus.WARNING, CDebugCorePlugin.getResourceString("internal.core.model.CThread.Stack_not_available") + e.getMessage() ); //$NON-NLS-1$
}
return depth;
}
@@ -1184,7 +1185,7 @@
*/
public String toString()
{
- String result = "";
+ String result = ""; //$NON-NLS-1$
try
{
result = getName();
Index: src/org/eclipse/cdt/debug/internal/core/model/CValue.java
===================================================================
retrieving revision 1.37
diff -u -r1.37 CValue.java
--- src/org/eclipse/cdt/debug/internal/core/model/CValue.java 29 Sep 2003 19:05:49 -0000 1.37
+++ src/org/eclipse/cdt/debug/internal/core/model/CValue.java 10 Mar 2004 16:55:15 -0000
@@ -33,6 +33,7 @@
import org.eclipse.cdt.debug.core.model.ICValue;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.model.IVariable;
+import org.eclipse.cdt.debug.core.CDebugCorePlugin;
/**
*
@@ -186,7 +187,7 @@
}
catch( CDIException e )
{
- requestFailed( "not available: ", e );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.model.CValue.Not_available"), e ); //$NON-NLS-1$
}
return Arrays.asList( vars );
}
@@ -260,7 +261,7 @@
byteValue != '\t' &&
byteValue != '\n' &&
byteValue != '\f' &&
- byteValue != '\r' ) || byteValue < 0 ) ? "" : new String( new byte[] { '\'', byteValue, '\'' } );
+ byteValue != '\r' ) || byteValue < 0 ) ? "" : new String( new byte[] { '\'', byteValue, '\'' } ); //$NON-NLS-1$
}
case ICDIFormat.DECIMAL:
{
@@ -269,7 +270,7 @@
}
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
String stringValue = ( isUnsigned() ) ? Integer.toHexString( value.shortValue() ) : Integer.toHexString( (byte)value.byteValue() );
sb.append( ( stringValue.length() > 2 ) ? stringValue.substring( stringValue.length() - 2 ) : stringValue );
return sb.toString();
@@ -287,7 +288,7 @@
return ( isUnsigned() ) ? Integer.toString( value.intValue() ) : Short.toString( value.shortValue() );
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
String stringValue = Integer.toHexString( ( isUnsigned() ) ? value.intValue() : value.shortValue() );
sb.append( ( stringValue.length() > 4 ) ? stringValue.substring( stringValue.length() - 4 ) : stringValue );
return sb.toString();
@@ -305,7 +306,7 @@
return ( isUnsigned() ) ? Long.toString( value.longValue() ) : Integer.toString( value.intValue() );
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
String stringValue = ( isUnsigned() ) ? Long.toHexString( value.longValue() ) : Integer.toHexString( value.intValue() );
sb.append( ( stringValue.length() > 8 ) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
return sb.toString();
@@ -323,7 +324,7 @@
return ( isUnsigned() ) ? Long.toString( value.longValue() ) : Integer.toString( value.intValue() );
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
String stringValue = Long.toHexString( ( isUnsigned() ) ? value.longValue() : value.intValue() );
sb.append( ( stringValue.length() > 8 ) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
return sb.toString();
@@ -349,7 +350,7 @@
}
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
if ( isUnsigned() )
{
@@ -369,7 +370,7 @@
float floatValue = value.floatValue();
Float flt = new Float( floatValue );
if ( flt.isNaN() || flt.isInfinite() )
- return "";
+ return ""; //$NON-NLS-1$
long longValue = flt.longValue();
switch( getParentVariable().getFormat() )
{
@@ -379,7 +380,7 @@
return Long.toString( longValue );
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
String stringValue = Long.toHexString( longValue );
sb.append( ( stringValue.length() > 8 ) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
return sb.toString();
@@ -393,7 +394,7 @@
double doubleValue = value.doubleValue();
Double dbl = new Double( doubleValue );
if ( dbl.isNaN() || dbl.isInfinite() )
- return "";
+ return ""; //$NON-NLS-1$
long longValue = dbl.longValue();
switch( getParentVariable().getFormat() )
{
@@ -403,7 +404,7 @@
return Long.toString( longValue );
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
String stringValue = Long.toHexString( longValue );
sb.append( ( stringValue.length() > 16 ) ? stringValue.substring( stringValue.length() - 16 ) : stringValue );
return sb.toString();
@@ -422,7 +423,7 @@
case ICDIFormat.NATURAL:
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
String stringValue = Long.toHexString( longValue );
sb.append( ( stringValue.length() > 8 ) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
return sb.toString();
@@ -441,7 +442,7 @@
case ICDIFormat.NATURAL:
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
String stringValue = Long.toHexString( longValue );
sb.append( ( stringValue.length() > 8 ) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
return sb.toString();
@@ -464,7 +465,7 @@
return ( isUnsigned() ) ? Integer.toString( value.intValue() ) : Short.toString( value.shortValue() );
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
String stringValue = Integer.toHexString( ( isUnsigned() ) ? value.intValue() : value.shortValue() );
sb.append( ( stringValue.length() > 4 ) ? stringValue.substring( stringValue.length() - 4 ) : stringValue );
return sb.toString();
@@ -480,7 +481,7 @@
return ( isUnsigned() ) ? Long.toString( value.longValue() ) : Integer.toString( value.intValue() );
case ICDIFormat.HEXADECIMAL:
{
- StringBuffer sb = new StringBuffer( "0x" );
+ StringBuffer sb = new StringBuffer( "0x" ); //$NON-NLS-1$
String stringValue = ( isUnsigned() ) ? Long.toHexString( value.longValue() ) : Integer.toHexString( value.intValue() );
sb.append( ( stringValue.length() > 8 ) ? stringValue.substring( stringValue.length() - 8 ) : stringValue );
return sb.toString();
Index: src/org/eclipse/cdt/debug/internal/core/model/CVariable.java
===================================================================
retrieving revision 1.61
diff -u -r1.61 CVariable.java
--- src/org/eclipse/cdt/debug/internal/core/model/CVariable.java 17 Feb 2004 19:05:42 -0000 1.61
+++ src/org/eclipse/cdt/debug/internal/core/model/CVariable.java 10 Mar 2004 16:55:15 -0000
@@ -80,7 +80,7 @@
*/
public String getName()
{
- return ( fVariableObject != null ) ? fVariableObject.getName() : "";
+ return ( fVariableObject != null ) ? fVariableObject.getName() : ""; //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -88,7 +88,7 @@
*/
public String getTypeName() throws CDIException
{
- return ( fVariableObject != null ) ? fVariableObject.getTypeName() : "";
+ return ( fVariableObject != null ) ? fVariableObject.getTypeName() : ""; //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -207,7 +207,7 @@
{
fCDIVariable = new ErrorVariable( getCDIVariableObject(), e );
setStatus( ICDebugElementErrorStatus.ERROR,
- MessageFormat.format( "not available: {0}", new String[] { e.getMessage() } ) );
+ CDebugCorePlugin.getFormattedString( "internal.core.model.CVariable.not_available", new String[] { e.getMessage() } ) ); //$NON-NLS-1$
}
}
return fCDIVariable;
@@ -412,7 +412,7 @@
fShadow = null;
if ( cdiVariableObject instanceof ErrorVariable )
setStatus( ICDebugElementErrorStatus.ERROR,
- MessageFormat.format( "not available: {0}", new String[] { ((ErrorVariable)cdiVariableObject).getException().getMessage() } ) );
+ CDebugCorePlugin.getFormattedString( "internal.core.model.CVariable.not_available", new String[] { ((ErrorVariable)cdiVariableObject).getException().getMessage() } ) ); //$NON-NLS-1$
fFormat = CDebugCorePlugin.getDefault().getPluginPreferences().getInt( ICDebugConstants.PREF_DEFAULT_VARIABLE_FORMAT );
getCDISession().getEventManager().addEventListener( this );
}
@@ -453,7 +453,7 @@
}
catch( CDIException e )
{
- requestFailed( "", e );
+ requestFailed( "", e ); //$NON-NLS-1$
}
int[] dims = type.getArrayDimensions();
if ( dims.length > 0 && dims[0] > 0 )
@@ -482,7 +482,7 @@
*/
public void setValue( String expression ) throws DebugException
{
- notSupported( "Variable does not support value modification." );
+ notSupported( CDebugCorePlugin.getResourceString("internal.core.model.CVariable.Value_modification_unsupported") ); //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -490,7 +490,7 @@
*/
public void setValue( IValue value ) throws DebugException
{
- notSupported( "Variable does not support value modification." );
+ notSupported( CDebugCorePlugin.getResourceString("internal.core.model.CVariable.Value_modification_unsupported") ); //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -774,7 +774,7 @@
{
logError( e );
}
- return "";
+ return ""; //$NON-NLS-1$
}
/* (non-Javadoc)
@@ -931,7 +931,7 @@
}
catch( CDIException e )
{
- requestFailed( "Qualified name is not available.", e );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.model.CVariable.Qualified_name_unavailable"), e ); //$NON-NLS-1$
}
return result;
}
@@ -952,7 +952,7 @@
}
catch( CDIException e )
{
- requestFailed( "Type is not available.", e );
+ requestFailed( CDebugCorePlugin.getResourceString("internal.core.model.CVariable.Type_unavailable"), e ); //$NON-NLS-1$
}
}
return type;
Index: src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java
===================================================================
retrieving revision 1.18
diff -u -r1.18 CDirectorySourceLocation.java
--- src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java 29 Oct 2003 21:06:04 -0000 1.18
+++ src/org/eclipse/cdt/debug/internal/core/sourcelookup/CDirectorySourceLocation.java 10 Mar 2004 16:55:15 -0000
@@ -47,10 +47,10 @@
*/
public class CDirectorySourceLocation implements IDirectorySourceLocation
{
- private static final String ELEMENT_NAME = "cDirectorySourceLocation";
- private static final String ATTR_DIRECTORY = "directory";
- private static final String ATTR_ASSOCIATION = "association";
- private static final String ATTR_SEARCH_SUBFOLDERS = "searchSubfolders";
+ private static final String ELEMENT_NAME = "cDirectorySourceLocation"; //$NON-NLS-1$
+ private static final String ATTR_DIRECTORY = "directory"; //$NON-NLS-1$
+ private static final String ATTR_ASSOCIATION = "association"; //$NON-NLS-1$
+ private static final String ATTR_SEARCH_SUBFOLDERS = "searchSubfolders"; //$NON-NLS-1$
/**
* The root directory of this source location
@@ -302,11 +302,11 @@
node.setAttribute( ATTR_SEARCH_SUBFOLDERS, new Boolean( searchSubfolders() ).toString() );
try
{
- return CDebugUtils.serializeDocument( doc, " " );
+ return CDebugUtils.serializeDocument( doc, " " ); //$NON-NLS-1$
}
catch( IOException e )
{
- abort( MessageFormat.format( "Unable to create memento for C/C++ directory source location {0}", new String[] { getDirectory().toOSString() } ), e );
+ abort( MessageFormat.format( CDebugCorePlugin.getResourceString("internal.core.sourcelookup.CDirectorySourceLocation.Unable_to_create_memento"), new String[] { getDirectory().toOSString() } ), e ); //$NON-NLS-1$
}
// execution will not reach here
return null;
@@ -329,7 +329,7 @@
String dir = root.getAttribute( ATTR_DIRECTORY );
if ( isEmpty( dir ) )
{
- abort( "Unable to initialize source location - missing directory path", null );
+ abort( CDebugCorePlugin.getResourceString("internal.core.sourcelookup.CDirectorySourceLocation.Unable_to_initialize_src_location_no_dir"), null ); //$NON-NLS-1$
}
else
{
@@ -340,7 +340,7 @@
}
else
{
- abort( MessageFormat.format( "Unable to initialize source location - invalid directory path {0}", new String[] { dir } ), null );
+ abort( MessageFormat.format( CDebugCorePlugin.getResourceString("internal.core.sourcelookup.CDirectorySourceLocation.Unable_to_initialize_src_location_invalid_dir"), new String[] { dir } ), null ); //$NON-NLS-1$
}
}
dir = root.getAttribute( ATTR_ASSOCIATION );
@@ -375,7 +375,7 @@
{
ex = e;
}
- abort( "Exception occurred initializing source location.", ex );
+ abort( CDebugCorePlugin.getResourceString("internal.core.sourcelookup.CDirectorySourceLocation.Exception_initializing_src_location"), ex ); //$NON-NLS-1$
}
/**
@@ -506,7 +506,7 @@
*/
public String toString()
{
- return ( getDirectory() != null ) ? getDirectory().toOSString() : "";
+ return ( getDirectory() != null ) ? getDirectory().toOSString() : ""; //$NON-NLS-1$
}
/* (non-Javadoc)
Index: src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java
===================================================================
retrieving revision 1.19
diff -u -r1.19 CProjectSourceLocation.java
--- src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java 29 Oct 2003 21:19:42 -0000 1.19
+++ src/org/eclipse/cdt/debug/internal/core/sourcelookup/CProjectSourceLocation.java 10 Mar 2004 16:55:16 -0000
@@ -8,7 +8,6 @@
import java.io.File;
import java.io.IOException;
import java.io.StringReader;
-import java.text.MessageFormat;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
@@ -46,9 +45,9 @@
*/
public class CProjectSourceLocation implements IProjectSourceLocation
{
- private static final String ELEMENT_NAME = "cProjectSourceLocation";
- private static final String ATTR_PROJECT = "project";
- private static final String ATTR_GENERIC = "generic";
+ private static final String ELEMENT_NAME = "cProjectSourceLocation"; //$NON-NLS-1$
+ private static final String ATTR_PROJECT = "project"; //$NON-NLS-1$
+ private static final String ATTR_GENERIC = "generic"; //$NON-NLS-1$
/**
* The project associated with this source location
@@ -234,11 +233,11 @@
node.setAttribute( ATTR_GENERIC, new Boolean( isGeneric() ).toString() );
try
{
- return CDebugUtils.serializeDocument( doc, " " );
+ return CDebugUtils.serializeDocument( doc, " " ); //$NON-NLS-1$
}
catch( IOException e )
{
- abort( MessageFormat.format( "Unable to create memento for C/C++ project source location {0}.", new String[] { getProject().getName() } ), e );
+ abort( CDebugCorePlugin.getFormattedString("internal.core.sourcelookup.CProjectSourceLocation.Unable_to_create_memento_for_src_location", new String[] { getProject().getName() } ), e ); //$NON-NLS-1$
}
// execution will not reach here
return null;
@@ -261,7 +260,7 @@
String name = root.getAttribute( ATTR_PROJECT );
if ( isEmpty( name ) )
{
- abort( "Unable to initialize source location - missing project name", null );
+ abort( CDebugCorePlugin.getResourceString("internal.core.sourcelookup.CProjectSourceLocation.Unable_to_initialize_src_location_no_project_name"), null ); //$NON-NLS-1$
}
else
{
@@ -286,7 +285,7 @@
{
ex = e;
}
- abort( "Exception occurred initializing source location.", ex );
+ abort( CDebugCorePlugin.getResourceString("internal.core.sourcelookup.CProjectSourceLocation.Exception_intializing_src_location"), ex ); //$NON-NLS-1$
}
/**
@@ -391,6 +390,6 @@
public String toString()
{
- return ( getProject() != null ) ? fProject.toString() : "";
+ return ( getProject() != null ) ? fProject.toString() : ""; //$NON-NLS-1$
}
}
Index: src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java
===================================================================
retrieving revision 1.23
diff -u -r1.23 CSourceLocator.java
--- src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java 27 Oct 2003 20:06:46 -0000 1.23
+++ src/org/eclipse/cdt/debug/internal/core/sourcelookup/CSourceLocator.java 10 Mar 2004 16:55:16 -0000
@@ -58,14 +58,14 @@
public class CSourceLocator implements ICSourceLocator, IPersistableSourceLocator, IResourceChangeListener
{
- private static final String SOURCE_LOCATOR_NAME = "cSourceLocator";
- private static final String DISABLED_GENERIC_PROJECT_NAME = "disabledGenericProject";
- private static final String ADDITIONAL_SOURCE_LOCATION_NAME = "additionalSourceLocation";
- private static final String SOURCE_LOCATION_NAME = "cSourceLocation";
- private static final String ATTR_CLASS = "class";
- private static final String ATTR_MEMENTO = "memento";
- private static final String ATTR_PROJECT_NAME = "projectName";
- private static final String ATTR_DUPLICATE_FILES = "duplicateFiles";
+ private static final String SOURCE_LOCATOR_NAME = "cSourceLocator"; //$NON-NLS-1$
+ private static final String DISABLED_GENERIC_PROJECT_NAME = "disabledGenericProject"; //$NON-NLS-1$
+ private static final String ADDITIONAL_SOURCE_LOCATION_NAME = "additionalSourceLocation"; //$NON-NLS-1$
+ private static final String SOURCE_LOCATION_NAME = "cSourceLocation"; //$NON-NLS-1$
+ private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
+ private static final String ATTR_MEMENTO = "memento"; //$NON-NLS-1$
+ private static final String ATTR_PROJECT_NAME = "projectName"; //$NON-NLS-1$
+ private static final String ATTR_DUPLICATE_FILES = "duplicateFiles"; //$NON-NLS-1$
/**
* The project associated with this locator.
@@ -301,11 +301,11 @@
node.setAttribute( ATTR_DUPLICATE_FILES, new Boolean( searchForDuplicateFiles() ).toString() );
try
{
- return CDebugUtils.serializeDocument( doc, " " );
+ return CDebugUtils.serializeDocument( doc, " " ); //$NON-NLS-1$
}
catch( IOException e )
{
- abort( "Unable to create memento for C/C++ source locator.", e );
+ abort( CDebugCorePlugin.getResourceString("internal.core.sourcelookup.CSourceLocator.Unable_to_create_memento"), e ); //$NON-NLS-1$
}
// execution will not reach here
return null;
@@ -335,7 +335,7 @@
if ( !root.getNodeName().equalsIgnoreCase( SOURCE_LOCATOR_NAME ) )
{
- abort( "Unable to restore C/C++ source locator - invalid format.", null );
+ abort( CDebugCorePlugin.getResourceString("internal.core.sourcelookup.CSourceLocator.Unable_to_restore_src_locator"), null ); //$NON-NLS-1$
}
List sourceLocations = new ArrayList();
@@ -367,7 +367,7 @@
{
ex = e;
}
- abort( "Exception occurred initializing source locator.", ex );
+ abort( CDebugCorePlugin.getResourceString("internal.core.sourcelookup.CSourceLocator.Exception_initializing_src_locator"), ex ); //$NON-NLS-1$
}
private void removeDisabledLocations( Element root, List sourceLocations ) throws CoreException
@@ -387,7 +387,7 @@
String projectName = entry.getAttribute( ATTR_PROJECT_NAME );
if ( isEmpty( projectName ) )
{
- CDebugCorePlugin.log( "Unable to restore C/C++ source locator - invalid format." );
+ CDebugCorePlugin.log( "Unable to restore C/C++ source locator - invalid format." ); //$NON-NLS-1$
}
disabledProjects.add( projectName.trim() );
}
@@ -409,7 +409,7 @@
MultiStatus status = new MultiStatus( CDebugCorePlugin.getUniqueIdentifier(),
CDebugCorePlugin.INTERNAL_ERROR,
- "Error initializing directory source location.",
+ CDebugCorePlugin.getResourceString("internal.core.sourcelookup.CSourceLocator.Error_initializing_src_location"), //$NON-NLS-1$
null );
NodeList list = root.getChildNodes();
int length = list.getLength();
@@ -426,7 +426,7 @@
String data = entry.getAttribute( ATTR_MEMENTO );
if ( isEmpty( className ) )
{
- CDebugCorePlugin.log( "Unable to restore C/C++ source locator - invalid format." );
+ CDebugCorePlugin.log( "Unable to restore C/C++ source locator - invalid format." ); //$NON-NLS-1$
continue;
}
Class clazz = null;
@@ -436,7 +436,7 @@
}
catch( ClassNotFoundException e )
{
- CDebugCorePlugin.log( MessageFormat.format( "Unable to restore source location - class not found {0}", new String[] { className } ) );
+ CDebugCorePlugin.log( MessageFormat.format( "Unable to restore source location - class not found {0}", new String[] { className } ) ); //$NON-NLS-1$
continue;
}
@@ -447,12 +447,12 @@
}
catch( IllegalAccessException e )
{
- CDebugCorePlugin.log( "Unable to restore source location." );
+ CDebugCorePlugin.log( "Unable to restore source location." ); //$NON-NLS-1$
continue;
}
catch( InstantiationException e )
{
- CDebugCorePlugin.log( "Unable to restore source location." );
+ CDebugCorePlugin.log( "Unable to restore source location." ); //$NON-NLS-1$
continue;
}
try
@@ -490,7 +490,7 @@
String data = entry.getAttribute( ATTR_MEMENTO );
if ( isEmpty( className ) )
{
- CDebugCorePlugin.log( "Unable to restore C/C++ source locator - invalid format." );
+ CDebugCorePlugin.log( "Unable to restore C/C++ source locator - invalid format." ); //$NON-NLS-1$
continue;
}
Class clazz = null;
@@ -500,7 +500,7 @@
}
catch( ClassNotFoundException e )
{
- CDebugCorePlugin.log( MessageFormat.format( "Unable to restore source location - class not found {0}", new String[] { className } ) );
+ CDebugCorePlugin.log( MessageFormat.format( "Unable to restore source location - class not found {0}", new String[] { className } ) ); //$NON-NLS-1$
continue;
}
@@ -511,12 +511,12 @@
}
catch( IllegalAccessException e )
{
- CDebugCorePlugin.log( "Unable to restore source location." );
+ CDebugCorePlugin.log( "Unable to restore source location." ); //$NON-NLS-1$
continue;
}
catch( InstantiationException e )
{
- CDebugCorePlugin.log( "Unable to restore source location." );
+ CDebugCorePlugin.log( "Unable to restore source location." ); //$NON-NLS-1$
continue;
}
location.initializeFrom( data );
Index: src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java
===================================================================
retrieving revision 1.2
diff -u -r1.2 SourceUtils.java
--- src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java 7 Nov 2003 21:40:39 -0000 1.2
+++ src/org/eclipse/cdt/debug/internal/core/sourcelookup/SourceUtils.java 10 Mar 2004 16:55:16 -0000
@@ -37,10 +37,10 @@
*/
public class SourceUtils
{
- private static final String NAME_COMMON_SOURCE_LOCATIONS = "commonSourceLocations";
- private static final String NAME_SOURCE_LOCATION = "sourceLocation";
- private static final String ATTR_CLASS = "class";
- private static final String ATTR_MEMENTO = "memento";
+ private static final String NAME_COMMON_SOURCE_LOCATIONS = "commonSourceLocations"; //$NON-NLS-1$
+ private static final String NAME_SOURCE_LOCATION = "sourceLocation"; //$NON-NLS-1$
+ private static final String ATTR_CLASS = "class"; //$NON-NLS-1$
+ private static final String ATTR_MEMENTO = "memento"; //$NON-NLS-1$
public static String getCommonSourceLocationsMemento( ICSourceLocation[] locations )
{
@@ -51,11 +51,11 @@
saveSourceLocations( doc, node, locations );
try
{
- return CDebugUtils.serializeDocument( doc, " " );
+ return CDebugUtils.serializeDocument( doc, " " ); //$NON-NLS-1$
}
catch( IOException e )
{
- CDebugCorePlugin.log( new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), 0, "Error saving common source settings.", e ) );
+ CDebugCorePlugin.log( new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), 0, "Error saving common source settings.", e ) ); //$NON-NLS-1$
}
return null;
}
@@ -96,15 +96,15 @@
}
catch( ParserConfigurationException e )
{
- CDebugCorePlugin.log( new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), 0, "Error initializing common source settings.", e ) );
+ CDebugCorePlugin.log( new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), 0, "Error initializing common source settings.", e ) ); //$NON-NLS-1$
}
catch( SAXException e )
{
- CDebugCorePlugin.log( new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), 0, "Error initializing common source settings.", e ) );
+ CDebugCorePlugin.log( new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), 0, "Error initializing common source settings.", e ) ); //$NON-NLS-1$
}
catch( IOException e )
{
- CDebugCorePlugin.log( new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), 0, "Error initializing common source settings.", e ) );
+ CDebugCorePlugin.log( new Status( IStatus.ERROR, CDebugCorePlugin.getUniqueIdentifier(), 0, "Error initializing common source settings.", e ) ); //$NON-NLS-1$
}
}
return result;
@@ -130,7 +130,7 @@
String data = entry.getAttribute( ATTR_MEMENTO );
if ( className == null || className.trim().length() == 0 )
{
- CDebugCorePlugin.log( "Unable to restore common source locations - invalid format." );
+ CDebugCorePlugin.log( "Unable to restore common source locations - invalid format." ); //$NON-NLS-1$
continue;
}
Class clazz = null;
@@ -140,7 +140,7 @@
}
catch( ClassNotFoundException e )
{
- CDebugCorePlugin.log( MessageFormat.format( "Unable to restore source location - class not found {0}", new String[] { className } ) );
+ CDebugCorePlugin.log( MessageFormat.format( "Unable to restore source location - class not found {0}", new String[] { className } ) ); //$NON-NLS-1$
continue;
}
@@ -151,12 +151,12 @@
}
catch( IllegalAccessException e )
{
- CDebugCorePlugin.log( "Unable to restore source location: " + e.getMessage() );
+ CDebugCorePlugin.log( "Unable to restore source location: " + e.getMessage() ); //$NON-NLS-1$
continue;
}
catch( InstantiationException e )
{
- CDebugCorePlugin.log( "Unable to restore source location: " + e.getMessage() );
+ CDebugCorePlugin.log( "Unable to restore source location: " + e.getMessage() ); //$NON-NLS-1$
continue;
}
try
@@ -166,7 +166,7 @@
}
catch( CoreException e )
{
- CDebugCorePlugin.log( "Unable to restore source location: " + e.getMessage() );
+ CDebugCorePlugin.log( "Unable to restore source location: " + e.getMessage() ); //$NON-NLS-1$
}
}
}
Index: src/org/eclipse/cdt/debug/core/CDebugCorePluginResources.properties
===================================================================
RCS file: src/org/eclipse/cdt/debug/core/CDebugCorePluginResources.properties
diff -N src/org/eclipse/cdt/debug/core/CDebugCorePluginResources.properties
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ src/org/eclipse/cdt/debug/core/CDebugCorePluginResources.properties 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,46 @@
+core.CDebugCorePlugin.No_such_debugger=No such debugger
+core.CDebugCorePlugin.Unable_to_set_temp_brkpt=Unable to set temporary breakpoint in main.\nReason: {0}\nContinue?
+
+internal.core.sourcelookup.CSourceLocator.Unable_to_create_memento=Unable to create memento for C/C++ source locator.
+internal.core.sourcelookup.CSourceLocator.Unable_to_restore_src_locator=Unable to restore C/C++ source locator - invalid format.
+internal.core.sourcelookup.CSourceLocator.Exception_initializing_src_locator=Exception occurred initializing source locator.
+internal.core.sourcelookup.CSourceLocator.Error_initializing_src_location=Error initializing directory source location.
+
+internal.core.sourcelookup.CProjectSourceLocation.Unable_to_initialize_src_location_no_project_name=Unable to initialize source location - missing project name
+internal.core.sourcelookup.CProjectSourceLocation.Exception_intializing_src_location=Exception occurred initializing source location.
+internal.core.sourcelookup.CProjectSourceLocation.Unable_to_create_memento_for_src_location=Unable to create memento for C/C++ project source location {0}.
+
+internal.core.sourcelookup.CDirectorySourceLocation.Unable_to_create_memento=Unable to create memento for C/C++ directory source location {0}
+internal.core.sourcelookup.CDirectorySourceLocation.Unable_to_initialize_src_location_no_dir=Unable to initialize source location - missing directory path
+internal.core.sourcelookup.CDirectorySourceLocation.Unable_to_initialize_src_location_invalid_dir=Unable to initialize source location - invalid directory path {0}
+internal.core.sourcelookup.CDirectorySourceLocation.Exception_initializing_src_location=Exception occurred initializing source location.
+internal.core.CBreakpointManager.Set_breakpoint_failed=Set breakpoint failed. Reason:
+internal.core.CBreakpointManager.Delete_breakpoint_failed=Delete breakpoint failed. Reason:
+internal.core.CBreakpointManager.Change_brkpt_properties_failed=Change breakpoint properties failed. Reason:
+internal.core.breakpoints.CLineBreakpoint.Line_breakpoint=Line breakpoint:
+internal.core.breakpoints.CLineBreakpoint.line=line:
+internal.core.breakpoints.CBreakpoint.ignore_count=ignore count:
+internal.core.breakpoints.CWatchpoint.Read=Read
+internal.core.breakpoints.CWatchpoint.Write=Write
+internal.core.breakpoints.CWatchpoint.Access=Access
+internal.core.breakpoints.CWatchpoint.watchpoint=watchpoint:
+internal.core.breakpoints.CWatchpoint.at=at
+internal.core.breakpoints.CAddressBreakpoint.Address_breakpoint=Address breakpoint:
+internal.core.breakpoints.CAddressBreakpoint.address=\ [address:
+internal.core.breakpoints.CFunctionBreakpoint.Function_breakpoint=Function breakpoint:
+internal.core.breakpoints.CFunctionBreakpoint.function=function:
+internal.core.breakpoints.CBreakpoint.if=\ if
+internal.core.model.CStackFrame.function_at_file={0} at {1}:
+internal.core.model.CArrayPartition.Type_not_available=Type is not available.
+internal.core.model.CArrayPartition.Qualified_name_not_available=Qualified name is not available.
+internal.core.model.CVariable.Value_modification_unsupported=Variable does not support value modification.
+internal.core.model.CVariable.Qualified_name_unavailable=Qualified name is not available.
+internal.core.model.CVariable.Type_unavailable=Type is not available.
+internal.core.model.CVariable.not_available=not available: {0}
+internal.core.model.CValue.Not_available=not available:
+internal.core.model.CModificationVariable.Unable_to_set_value=Unable to set value.
+internal.core.model.CThread.Stack_not_available=Stack is not available:
+internal.core.model.CDebugTarget.Disconnect_session_unsupported=Session does not support \'disconnect\'
+internal.core.model.CDebugTarget.Execution_suspended_because_of_error=The execution of program is suspended because of error.
+internal.core.model.CDebugElement.Target_request_failed=Target request failed:
+internal.core.DisassemblyStorage.disassembly=disassembly