Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2005-07-11 20:18:06 +0000
committerMikhail Khodjaiants2005-07-11 20:18:06 +0000
commitafb99ca2e026e59a5c617d28c46944e1e46b3fda (patch)
treebdeb122ac6c3cb6a7fadf13d207e4ad2266f554d
parente10adfd876671f1d7f7f7c0b97dd59aa219f3b6c (diff)
downloadorg.eclipse.cdt-afb99ca2e026e59a5c617d28c46944e1e46b3fda.tar.gz
org.eclipse.cdt-afb99ca2e026e59a5c617d28c46944e1e46b3fda.tar.xz
org.eclipse.cdt-afb99ca2e026e59a5c617d28c46944e1e46b3fda.zip
Bug 94770: Breakpoint marker messages need formatting.
-rw-r--r--debug/org.eclipse.cdt.debug.core/ChangeLog8
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/BreakpointMessages.properties40
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CAddressBreakpoint.java16
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java15
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java11
-rw-r--r--debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CWatchpoint.java24
6 files changed, 56 insertions, 58 deletions
diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog
index 282f5ea0e43..7ffc1216905 100644
--- a/debug/org.eclipse.cdt.debug.core/ChangeLog
+++ b/debug/org.eclipse.cdt.debug.core/ChangeLog
@@ -1,4 +1,12 @@
2005-07-11 Mikhail Khodjaiants
+ Bug 94770: Breakpoint marker messages need formatting.
+ * BreakpointMessages.properties
+ * CAddressBreakpoint.java
+ * CFunctionBreakpoint.java
+ * CLineBreakpoint.java
+ * CWatchpoint.java
+
+2005-07-11 Mikhail Khodjaiants
Bug 102077: The DebugLabelViewDecorato asking info out of context.
Added a new flag to CVariable indicate the disposed state and prevent target requests.
* CExpression.java
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/BreakpointMessages.properties b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/BreakpointMessages.properties
index d0b726bbb6b..4483df52aad 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/BreakpointMessages.properties
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/BreakpointMessages.properties
@@ -8,16 +8,34 @@
# Contributors:
# QNX Software Systems - initial API and implementation
###############################################################################
-CAddressBreakpoint.1=Address breakpoint:
-CAddressBreakpoint.2=[address: {0}]
+
+# The marker message of an address breakpoint.
+# Format: Address breakpoint: <file name>[address: <address>] <condition>
+CAddressBreakpoint.0=Address breakpoint:{0}[address: {1}]{2}
+
CBreakpoint.1=\ [ignore count: {0}]
CBreakpoint.2=\ if {0}
-CFunctionBreakpoint.2=Function breakpoint:
-CFunctionBreakpoint.3=\ [function: {0}]
-CLineBreakpoint.1=Line breakpoint:
-CLineBreakpoint.2=\ [line: {0}]
-CWatchpoint.1=Write watchpoint
-CWatchpoint.2=Read watchpoint
-CWatchpoint.3=Access watchpoint
-CWatchpoint.4=Watchpoint
-CWatchpoint.5=\ at \'{0}\'
+
+# The marker message of a function breakpoint.
+# Format: Function breakpoint: <file name>[function: <function name>] <condition>
+CFunctionBreakpoint.0=Function breakpoint:{0}[function: {1}]{2}
+
+# The marker message of a line breakpoint.
+# Format: Line breakpoint: <file name>[line: <line number>] <condition>
+CLineBreakpoint.0=Line breakpoint:{0}[line: {1}]
+
+# The marker message of a write watchpoint.
+# Format: Write watchpoint: <file name> at <expression> <condition>
+CWatchpoint.0=Write watchpoint{0}at{1}{2}
+
+# The marker message of a read watchpoint.
+# Format: Read watchpoint: <file name> at <expression> <condition>
+CWatchpoint.1=Read watchpoint{0}at{1}{2}
+
+# The marker message of an access watchpoint.
+# Format: Access watchpoint: <file name> at <expression> <condition>
+CWatchpoint.2=Access watchpoint{0}at{1}{2}
+
+# The marker message of a watchpoint.
+# Format: Watchpoint: <file name> at <expression> <condition>
+CWatchpoint.3=Watchpoint{0}at{1}{2}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CAddressBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CAddressBreakpoint.java
index 29e1ef53511..3893f03ec95 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CAddressBreakpoint.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CAddressBreakpoint.java
@@ -50,18 +50,10 @@ public class CAddressBreakpoint extends AbstractLineBreakpoint implements ICAddr
* @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage()
*/
protected String getMarkerMessage() throws CoreException {
- StringBuffer sb = new StringBuffer( BreakpointMessages.getString( "CAddressBreakpoint.1" ) ); //$NON-NLS-1$
- String name = ensureMarker().getResource().getName();
- if ( name != null && name.length() > 0 ) {
- sb.append( ' ' );
- sb.append( name );
+ String fileName = ensureMarker().getResource().getName();
+ if ( fileName != null && fileName.length() > 0 ) {
+ fileName = ' ' + fileName + ' ';
}
- try {
- sb.append( MessageFormat.format( BreakpointMessages.getString( "CAddressBreakpoint.2" ), new String[] { getAddress() } ) ); //$NON-NLS-1$
- }
- catch( NumberFormatException e ) {
- }
- sb.append( getConditionText() );
- return sb.toString();
+ return MessageFormat.format( BreakpointMessages.getString( "CAddressBreakpoint.0" ), new String[] { fileName, getAddress(), getConditionText() } ); //$NON-NLS-1$
}
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java
index 389ad7b6abc..bc66e62205e 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CFunctionBreakpoint.java
@@ -48,17 +48,10 @@ public class CFunctionBreakpoint extends AbstractLineBreakpoint implements ICFun
* @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage()
*/
protected String getMarkerMessage() throws CoreException {
- StringBuffer sb = new StringBuffer( BreakpointMessages.getString( "CFunctionBreakpoint.2" ) ); //$NON-NLS-1$
- String name = ensureMarker().getResource().getName();
- if ( name != null && name.length() > 0 ) {
- sb.append( ' ' );
- sb.append( name );
+ String fileName = ensureMarker().getResource().getName();
+ if ( fileName != null && fileName.length() > 0 ) {
+ fileName = ' ' + fileName + ' ';
}
- String function = getFunction();
- if ( function != null && function.trim().length() > 0 ) {
- sb.append( MessageFormat.format( BreakpointMessages.getString( "CFunctionBreakpoint.3" ), new String[] { function.trim() } ) ); //$NON-NLS-1$
- }
- sb.append( getConditionText() );
- return sb.toString();
+ return MessageFormat.format( BreakpointMessages.getString( "CFunctionBreakpoint.0" ), new String[] { fileName, getFunction(), getConditionText() } ); //$NON-NLS-1$
}
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java
index 437990603f7..3a604925629 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CLineBreakpoint.java
@@ -48,17 +48,10 @@ public class CLineBreakpoint extends AbstractLineBreakpoint {
* @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage()
*/
protected String getMarkerMessage() throws CoreException {
- StringBuffer sb = new StringBuffer( BreakpointMessages.getString( "CLineBreakpoint.1" ) ); //$NON-NLS-1$
String fileName = ensureMarker().getResource().getName();
if ( fileName != null && fileName.length() > 0 ) {
- sb.append( ' ' );
- sb.append( fileName );
+ fileName = ' ' + fileName + ' ';
}
- int lineNumber = getLineNumber();
- if ( lineNumber > 0 ) {
- sb.append( MessageFormat.format( BreakpointMessages.getString( "CLineBreakpoint.2" ), new Integer[] { new Integer( lineNumber ) } ) ); //$NON-NLS-1$
- }
- sb.append( getConditionText() );
- return sb.toString();
+ return MessageFormat.format( BreakpointMessages.getString( "CLineBreakpoint.0" ), new Object[] { fileName, new Integer( getLineNumber() ), getConditionText() } ); //$NON-NLS-1$
}
}
diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CWatchpoint.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CWatchpoint.java
index e5766f714d3..5f4cfecf26c 100644
--- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CWatchpoint.java
+++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/internal/core/breakpoints/CWatchpoint.java
@@ -69,27 +69,21 @@ public class CWatchpoint extends CBreakpoint implements ICWatchpoint {
* @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage()
*/
protected String getMarkerMessage() throws CoreException {
- StringBuffer sb = new StringBuffer();
- if ( isWriteType() && !isReadType() )
- sb.append( BreakpointMessages.getString( "CWatchpoint.1" ) ); //$NON-NLS-1$
- else if ( !isWriteType() && isReadType() )
- sb.append( BreakpointMessages.getString( "CWatchpoint.2" ) ); //$NON-NLS-1$
- else if ( isWriteType() && isReadType() )
- sb.append( BreakpointMessages.getString( "CWatchpoint.3" ) ); //$NON-NLS-1$
- else
- sb.append( BreakpointMessages.getString( "CWatchpoint.4" ) ); //$NON-NLS-1$
- sb.append( ' ' );
String fileName = ensureMarker().getResource().getName();
if ( fileName != null && fileName.length() > 0 ) {
- sb.append( ' ' );
- sb.append( fileName );
+ fileName = ' ' + fileName + ' ';
}
String expression = getExpression();
if ( expression != null && expression.length() > 0 ) {
- sb.append( MessageFormat.format( BreakpointMessages.getString( "CWatchpoint.5" ), new String[]{ expression } ) ); //$NON-NLS-1$
+ expression = " '" + expression + "' "; //$NON-NLS-1$ //$NON-NLS-2$
}
- sb.append( getConditionText() );
- return sb.toString();
+ if ( isWriteType() && !isReadType() )
+ return MessageFormat.format( BreakpointMessages.getString( "CWatchpoint.0" ), new String[] { fileName, expression, getConditionText() } ); //$NON-NLS-1$
+ else if ( !isWriteType() && isReadType() )
+ return MessageFormat.format( BreakpointMessages.getString( "CWatchpoint.1" ), new String[] { fileName, expression, getConditionText() } ); //$NON-NLS-1$
+ else if ( isWriteType() && isReadType() )
+ return MessageFormat.format( BreakpointMessages.getString( "CWatchpoint.2" ), new String[] { fileName, expression, getConditionText() } ); //$NON-NLS-1$
+ return MessageFormat.format( BreakpointMessages.getString( "CWatchpoint.3" ), new String[] { fileName, expression, getConditionText() } ); //$NON-NLS-1$
}
/* (non-Javadoc)

Back to the top