1
0
Fork 0
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:
Mikhail Khodjaiants 2005-07-11 20:18:06 +00:00
parent e10adfd876
commit afb99ca2e0
6 changed files with 56 additions and 58 deletions

View file

@ -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 2005-07-11 Mikhail Khodjaiants
Bug 102077: The DebugLabelViewDecorato asking info out of context. Bug 102077: The DebugLabelViewDecorato asking info out of context.
Added a new flag to CVariable indicate the disposed state and prevent target requests. Added a new flag to CVariable indicate the disposed state and prevent target requests.

View file

@ -8,16 +8,34 @@
# Contributors: # Contributors:
# QNX Software Systems - initial API and implementation # 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.1=\ [ignore count: {0}]
CBreakpoint.2=\ if {0} CBreakpoint.2=\ if {0}
CFunctionBreakpoint.2=Function breakpoint:
CFunctionBreakpoint.3=\ [function: {0}] # The marker message of a function breakpoint.
CLineBreakpoint.1=Line breakpoint: # Format: Function breakpoint: <file name>[function: <function name>] <condition>
CLineBreakpoint.2=\ [line: {0}] CFunctionBreakpoint.0=Function breakpoint:{0}[function: {1}]{2}
CWatchpoint.1=Write watchpoint
CWatchpoint.2=Read watchpoint # The marker message of a line breakpoint.
CWatchpoint.3=Access watchpoint # Format: Line breakpoint: <file name>[line: <line number>] <condition>
CWatchpoint.4=Watchpoint CLineBreakpoint.0=Line breakpoint:{0}[line: {1}]
CWatchpoint.5=\ at \'{0}\'
# 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}

View file

@ -50,18 +50,10 @@ public class CAddressBreakpoint extends AbstractLineBreakpoint implements ICAddr
* @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage() * @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage()
*/ */
protected String getMarkerMessage() throws CoreException { protected String getMarkerMessage() throws CoreException {
StringBuffer sb = new StringBuffer( BreakpointMessages.getString( "CAddressBreakpoint.1" ) ); //$NON-NLS-1$ String fileName = ensureMarker().getResource().getName();
String name = ensureMarker().getResource().getName(); if ( fileName != null && fileName.length() > 0 ) {
if ( name != null && name.length() > 0 ) { fileName = ' ' + fileName + ' ';
sb.append( ' ' );
sb.append( name );
} }
try { return MessageFormat.format( BreakpointMessages.getString( "CAddressBreakpoint.0" ), new String[] { fileName, getAddress(), getConditionText() } ); //$NON-NLS-1$
sb.append( MessageFormat.format( BreakpointMessages.getString( "CAddressBreakpoint.2" ), new String[] { getAddress() } ) ); //$NON-NLS-1$
}
catch( NumberFormatException e ) {
}
sb.append( getConditionText() );
return sb.toString();
} }
} }

View file

@ -48,17 +48,10 @@ public class CFunctionBreakpoint extends AbstractLineBreakpoint implements ICFun
* @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage() * @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage()
*/ */
protected String getMarkerMessage() throws CoreException { protected String getMarkerMessage() throws CoreException {
StringBuffer sb = new StringBuffer( BreakpointMessages.getString( "CFunctionBreakpoint.2" ) ); //$NON-NLS-1$ String fileName = ensureMarker().getResource().getName();
String name = ensureMarker().getResource().getName(); if ( fileName != null && fileName.length() > 0 ) {
if ( name != null && name.length() > 0 ) { fileName = ' ' + fileName + ' ';
sb.append( ' ' );
sb.append( name );
} }
String function = getFunction(); return MessageFormat.format( BreakpointMessages.getString( "CFunctionBreakpoint.0" ), new String[] { fileName, getFunction(), getConditionText() } ); //$NON-NLS-1$
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();
} }
} }

View file

@ -48,17 +48,10 @@ public class CLineBreakpoint extends AbstractLineBreakpoint {
* @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage() * @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage()
*/ */
protected String getMarkerMessage() throws CoreException { protected String getMarkerMessage() throws CoreException {
StringBuffer sb = new StringBuffer( BreakpointMessages.getString( "CLineBreakpoint.1" ) ); //$NON-NLS-1$
String fileName = ensureMarker().getResource().getName(); String fileName = ensureMarker().getResource().getName();
if ( fileName != null && fileName.length() > 0 ) { if ( fileName != null && fileName.length() > 0 ) {
sb.append( ' ' ); fileName = ' ' + fileName + ' ';
sb.append( fileName );
} }
int lineNumber = getLineNumber(); return MessageFormat.format( BreakpointMessages.getString( "CLineBreakpoint.0" ), new Object[] { fileName, new Integer( getLineNumber() ), getConditionText() } ); //$NON-NLS-1$
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();
} }
} }

View file

@ -69,27 +69,21 @@ public class CWatchpoint extends CBreakpoint implements ICWatchpoint {
* @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage() * @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage()
*/ */
protected String getMarkerMessage() throws CoreException { 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(); String fileName = ensureMarker().getResource().getName();
if ( fileName != null && fileName.length() > 0 ) { if ( fileName != null && fileName.length() > 0 ) {
sb.append( ' ' ); fileName = ' ' + fileName + ' ';
sb.append( fileName );
} }
String expression = getExpression(); String expression = getExpression();
if ( expression != null && expression.length() > 0 ) { 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() ); if ( isWriteType() && !isReadType() )
return sb.toString(); 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) /* (non-Javadoc)