mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Bug 94770: Breakpoint marker messages need formatting.
This commit is contained in:
parent
e10adfd876
commit
afb99ca2e0
6 changed files with 56 additions and 58 deletions
|
@ -1,3 +1,11 @@
|
|||
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.
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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$
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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$
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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$
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue