diff --git a/debug/org.eclipse.cdt.debug.core/ChangeLog b/debug/org.eclipse.cdt.debug.core/ChangeLog index aa16e0e2835..b20d04dad69 100644 --- a/debug/org.eclipse.cdt.debug.core/ChangeLog +++ b/debug/org.eclipse.cdt.debug.core/ChangeLog @@ -1,3 +1,13 @@ +2006-05-12 Mikhail Khodjaiants + Bug 118274: Condition is not shown in the tooltip of conditional breakpoint. + * CDebugUtils.java + * DebugCoreMessages.properties + * BreakpointMessages.properties + * CAddressBreakpoint.java + * CFunctionBreakpoint.java + * CLineBreakpoint.java + * CWatchpoint.java + 2006-03-27 Mikhail Khodjaiants Moved the extraction of the stop symbol to the launch. * CDIDebugModel.java diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java index b1ee9b405f5..70a1b33ffb9 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/CDebugUtils.java @@ -12,6 +12,7 @@ package org.eclipse.cdt.debug.core; import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.text.MessageFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; @@ -23,13 +24,21 @@ import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import org.eclipse.cdt.debug.core.cdi.CDIException; +import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint; +import org.eclipse.cdt.debug.core.model.ICBreakpoint; +import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint; +import org.eclipse.cdt.debug.core.model.ICLineBreakpoint; import org.eclipse.cdt.debug.core.model.ICValue; +import org.eclipse.cdt.debug.core.model.ICWatchpoint; import org.eclipse.cdt.debug.internal.core.model.CFloatingPointValue; import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.IStatusHandler; +import org.eclipse.debug.core.model.IBreakpoint; import org.w3c.dom.Document; /** @@ -286,4 +295,129 @@ public class CDebugUtils { } } } + + public static String getBreakpointText( IBreakpoint breakpoint, boolean qualified ) throws CoreException { + if ( breakpoint instanceof ICAddressBreakpoint ) { + return getAddressBreakpointText( (ICAddressBreakpoint)breakpoint, qualified ); + } + if ( breakpoint instanceof ICFunctionBreakpoint ) { + return getFunctionBreakpointText( (ICFunctionBreakpoint)breakpoint, qualified ); + } + if ( breakpoint instanceof ICLineBreakpoint ) { + return getLineBreakpointText( (ICLineBreakpoint)breakpoint, qualified ); + } + if ( breakpoint instanceof ICWatchpoint ) { + return getWatchpointText( (ICWatchpoint)breakpoint, qualified ); + } + return ""; //$NON-NLS-1$ + } + + protected static String getLineBreakpointText( ICLineBreakpoint breakpoint, boolean qualified ) throws CoreException { + StringBuffer label = new StringBuffer(); + appendSourceName( breakpoint, label, qualified ); + appendLineNumber( breakpoint, label ); + appendIgnoreCount( breakpoint, label ); + appendCondition( breakpoint, label ); + return label.toString(); + } + + protected static String getWatchpointText( ICWatchpoint watchpoint, boolean qualified ) throws CoreException { + StringBuffer label = new StringBuffer(); + appendSourceName( watchpoint, label, qualified ); + appendWatchExpression( watchpoint, label ); + appendIgnoreCount( watchpoint, label ); + appendCondition( watchpoint, label ); + return label.toString(); + } + + protected static String getAddressBreakpointText( ICAddressBreakpoint breakpoint, boolean qualified ) throws CoreException { + StringBuffer label = new StringBuffer(); + appendSourceName( breakpoint, label, qualified ); + appendAddress( breakpoint, label ); + appendIgnoreCount( breakpoint, label ); + appendCondition( breakpoint, label ); + return label.toString(); + } + + protected static String getFunctionBreakpointText( ICFunctionBreakpoint breakpoint, boolean qualified ) throws CoreException { + StringBuffer label = new StringBuffer(); + appendSourceName( breakpoint, label, qualified ); + appendFunction( breakpoint, label ); + appendIgnoreCount( breakpoint, label ); + appendCondition( breakpoint, label ); + return label.toString(); + } + + protected static StringBuffer appendSourceName( ICBreakpoint breakpoint, StringBuffer label, boolean qualified ) throws CoreException { + String handle = breakpoint.getSourceHandle(); + if ( !isEmpty( handle ) ) { + IPath path = new Path( handle ); + if ( path.isValidPath( handle ) ) { + label.append( qualified ? path.toOSString() : path.lastSegment() ); + } + } + return label; + } + + protected static StringBuffer appendLineNumber( ICLineBreakpoint breakpoint, StringBuffer label ) throws CoreException { + int lineNumber = breakpoint.getLineNumber(); + if ( lineNumber > 0 ) { + label.append( ' ' ); + label.append( MessageFormat.format( DebugCoreMessages.getString( "CDebugUtils.0" ), new String[]{ Integer.toString( lineNumber ) } ) ); //$NON-NLS-1$ + } + return label; + } + + protected static StringBuffer appendAddress( ICAddressBreakpoint breakpoint, StringBuffer label ) throws CoreException { + try { + label.append( ' ' ); + label.append( MessageFormat.format( DebugCoreMessages.getString( "CDebugUtils.1" ), new String[]{ breakpoint.getAddress() } ) ); //$NON-NLS-1$ + } + catch( NumberFormatException e ) { + } + return label; + } + + protected static StringBuffer appendFunction( ICFunctionBreakpoint breakpoint, StringBuffer label ) throws CoreException { + String function = breakpoint.getFunction(); + if ( function != null && function.trim().length() > 0 ) { + label.append( ' ' ); + label.append( MessageFormat.format( DebugCoreMessages.getString( "CDebugUtils.2" ), new String[]{ function.trim() } ) ); //$NON-NLS-1$ + } + return label; + } + + protected static StringBuffer appendIgnoreCount( ICBreakpoint breakpoint, StringBuffer label ) throws CoreException { + int ignoreCount = breakpoint.getIgnoreCount(); + if ( ignoreCount > 0 ) { + label.append( ' ' ); + label.append( MessageFormat.format( DebugCoreMessages.getString( "CDebugUtils.3" ), new String[]{ Integer.toString( ignoreCount ) } ) ); //$NON-NLS-1$ + } + return label; + } + + protected static void appendCondition( ICBreakpoint breakpoint, StringBuffer buffer ) throws CoreException { + String condition = breakpoint.getCondition(); + if ( condition != null && condition.length() > 0 ) { + buffer.append( ' ' ); + buffer.append( DebugCoreMessages.getString( "CDebugUtils.4" ) ); //$NON-NLS-1$ + buffer.append( ' ' ); + buffer.append( condition ); + } + } + + private static void appendWatchExpression( ICWatchpoint watchpoint, StringBuffer label ) throws CoreException { + String expression = watchpoint.getExpression(); + if ( expression != null && expression.length() > 0 ) { + label.append( ' ' ); + label.append( DebugCoreMessages.getString( "CDebugUtils.5" ) ); //$NON-NLS-1$ + label.append( " \'" ); //$NON-NLS-1$ + label.append( expression ); + label.append( '\'' ); + } + } + + private static boolean isEmpty( String string ) { + return ( string == null || string.trim().length() == 0 ); + } } diff --git a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/DebugCoreMessages.properties b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/DebugCoreMessages.properties index 456cc138506..8d3b14eafa0 100644 --- a/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/DebugCoreMessages.properties +++ b/debug/org.eclipse.cdt.debug.core/src/org/eclipse/cdt/debug/core/DebugCoreMessages.properties @@ -10,4 +10,10 @@ ############################################################################### CDebugCorePlugin.0=No such debugger CDebugModel.0=Unable to set temporary breakpoint in main.\nReason: {0}\nContinue? +CDebugUtils.0=[line: {0}] +CDebugUtils.1=[address: {0}] +CDebugUtils.2=[function: {0}] +CDebugUtils.3=[ignore count: {0}] +CDebugUtils.4=if +CDebugUtils.5=at CDIDebugModel.0=Unable to parser binary information from file 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 4483df52aad..7e891020480 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 @@ -10,32 +10,25 @@ ############################################################################### # The marker message of an address breakpoint. -# Format: Address breakpoint: [address:
] -CAddressBreakpoint.0=Address breakpoint:{0}[address: {1}]{2} +CAddressBreakpoint.0=Address breakpoint: {0} CBreakpoint.1=\ [ignore count: {0}] CBreakpoint.2=\ if {0} # The marker message of a function breakpoint. -# Format: Function breakpoint: [function: ] -CFunctionBreakpoint.0=Function breakpoint:{0}[function: {1}]{2} +CFunctionBreakpoint.0=Function breakpoint: {0} # The marker message of a line breakpoint. -# Format: Line breakpoint: [line: ] -CLineBreakpoint.0=Line breakpoint:{0}[line: {1}] +CLineBreakpoint.0=Line breakpoint: {0} # The marker message of a write watchpoint. -# Format: Write watchpoint: at -CWatchpoint.0=Write watchpoint{0}at{1}{2} +CWatchpoint.0=Write watchpoint: {0} # The marker message of a read watchpoint. -# Format: Read watchpoint: at -CWatchpoint.1=Read watchpoint{0}at{1}{2} +CWatchpoint.1=Read watchpoint: {0} # The marker message of an access watchpoint. -# Format: Access watchpoint: at -CWatchpoint.2=Access watchpoint{0}at{1}{2} +CWatchpoint.2=Access watchpoint: {0} # The marker message of a watchpoint. -# Format: Watchpoint: at -CWatchpoint.3=Watchpoint{0}at{1}{2} +CWatchpoint.3=Watchpoint: {0} 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 3893f03ec95..7d1dab8386f 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 @@ -12,6 +12,7 @@ package org.eclipse.cdt.debug.internal.core.breakpoints; import java.util.Map; +import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.cdt.debug.core.model.ICAddressBreakpoint; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; @@ -50,10 +51,6 @@ public class CAddressBreakpoint extends AbstractLineBreakpoint implements ICAddr * @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage() */ protected String getMarkerMessage() throws CoreException { - String fileName = ensureMarker().getResource().getName(); - if ( fileName != null && fileName.length() > 0 ) { - fileName = ' ' + fileName + ' '; - } - return MessageFormat.format( BreakpointMessages.getString( "CAddressBreakpoint.0" ), new String[] { fileName, getAddress(), getConditionText() } ); //$NON-NLS-1$ + return MessageFormat.format( BreakpointMessages.getString( "CAddressBreakpoint.0" ), new String[] { CDebugUtils.getBreakpointText( this, false ) } ); //$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 bc66e62205e..b85b75c23c0 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 @@ -13,6 +13,7 @@ package org.eclipse.cdt.debug.internal.core.breakpoints; import java.text.MessageFormat; import java.util.Map; +import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.cdt.debug.core.model.ICFunctionBreakpoint; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; @@ -48,10 +49,6 @@ public class CFunctionBreakpoint extends AbstractLineBreakpoint implements ICFun * @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage() */ protected String getMarkerMessage() throws CoreException { - String fileName = ensureMarker().getResource().getName(); - if ( fileName != null && fileName.length() > 0 ) { - fileName = ' ' + fileName + ' '; - } - return MessageFormat.format( BreakpointMessages.getString( "CFunctionBreakpoint.0" ), new String[] { fileName, getFunction(), getConditionText() } ); //$NON-NLS-1$ + return MessageFormat.format( BreakpointMessages.getString( "CFunctionBreakpoint.0" ), new String[] { CDebugUtils.getBreakpointText( this, false ) } ); //$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 3a604925629..ee035c72e80 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 @@ -13,6 +13,7 @@ package org.eclipse.cdt.debug.internal.core.breakpoints; import java.text.MessageFormat; import java.util.Map; +import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; @@ -48,10 +49,6 @@ public class CLineBreakpoint extends AbstractLineBreakpoint { * @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage() */ protected String getMarkerMessage() throws CoreException { - String fileName = ensureMarker().getResource().getName(); - if ( fileName != null && fileName.length() > 0 ) { - fileName = ' ' + fileName + ' '; - } - return MessageFormat.format( BreakpointMessages.getString( "CLineBreakpoint.0" ), new Object[] { fileName, new Integer( getLineNumber() ), getConditionText() } ); //$NON-NLS-1$ + return MessageFormat.format( BreakpointMessages.getString( "CLineBreakpoint.0" ), new String[] { CDebugUtils.getBreakpointText( this, false ) } ); //$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 5f4cfecf26c..3c43744e560 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 @@ -12,6 +12,7 @@ package org.eclipse.cdt.debug.internal.core.breakpoints; import java.text.MessageFormat; import java.util.Map; +import org.eclipse.cdt.debug.core.CDebugUtils; import org.eclipse.cdt.debug.core.model.ICWatchpoint; import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IResource; @@ -69,21 +70,14 @@ public class CWatchpoint extends CBreakpoint implements ICWatchpoint { * @see org.eclipse.cdt.debug.internal.core.breakpoints.CBreakpoint#getMarkerMessage() */ protected String getMarkerMessage() throws CoreException { - String fileName = ensureMarker().getResource().getName(); - if ( fileName != null && fileName.length() > 0 ) { - fileName = ' ' + fileName + ' '; - } - String expression = getExpression(); - if ( expression != null && expression.length() > 0 ) { - expression = " '" + expression + "' "; //$NON-NLS-1$ //$NON-NLS-2$ - } + String format = BreakpointMessages.getString( "CWatchpoint.3" ); //$NON-NLS-1$ if ( isWriteType() && !isReadType() ) - return MessageFormat.format( BreakpointMessages.getString( "CWatchpoint.0" ), new String[] { fileName, expression, getConditionText() } ); //$NON-NLS-1$ + format = BreakpointMessages.getString( "CWatchpoint.0" ); //$NON-NLS-1$ else if ( !isWriteType() && isReadType() ) - return MessageFormat.format( BreakpointMessages.getString( "CWatchpoint.1" ), new String[] { fileName, expression, getConditionText() } ); //$NON-NLS-1$ + format = BreakpointMessages.getString( "CWatchpoint.1" ); //$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$ + format = BreakpointMessages.getString( "CWatchpoint.2" ); //$NON-NLS-1$ + return MessageFormat.format( format, new String[] { CDebugUtils.getBreakpointText( this, false ) } ); } /* (non-Javadoc) diff --git a/debug/org.eclipse.cdt.debug.ui/ChangeLog b/debug/org.eclipse.cdt.debug.ui/ChangeLog index 70c097978f9..14809bbe0ec 100644 --- a/debug/org.eclipse.cdt.debug.ui/ChangeLog +++ b/debug/org.eclipse.cdt.debug.ui/ChangeLog @@ -1,3 +1,9 @@ +2006-05-12 Mikhail Khodjaiants + Bug 118274: Condition is not shown in the tooltip of conditional breakpoint. + Moved the "getBreakpointText" method and related methods to CDebugUtils. + * CDebugModelPresentation.java + * CDebugUIMessages.properties + 2006-05-12 Mikhail Khodjaiants Bug 109449: Sort globals in "Add Globals" dialog. * AddGlobalsActionDelegate.java diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java index bb6b672709b..5219ba668bc 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugModelPresentation.java @@ -372,12 +372,12 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode if ( element instanceof IMarker ) { IBreakpoint breakpoint = getBreakpoint( (IMarker)element ); if ( breakpoint != null ) { - return getBreakpointText( breakpoint, showQualified ); + return CDebugUtils.getBreakpointText( breakpoint, showQualified ); } return null; } if ( element instanceof IBreakpoint ) { - return getBreakpointText( (IBreakpoint)element, showQualified ); + return CDebugUtils.getBreakpointText( (IBreakpoint)element, showQualified ); } if ( element instanceof IDebugTarget ) label.append( getTargetText( (IDebugTarget)element, showQualified ) ); @@ -453,127 +453,6 @@ public class CDebugModelPresentation extends LabelProvider implements IDebugMode return DebugPlugin.getDefault().getBreakpointManager().getBreakpoint( marker ); } - protected String getBreakpointText( IBreakpoint breakpoint, boolean qualified ) throws CoreException { - if ( breakpoint instanceof ICAddressBreakpoint ) { - return getAddressBreakpointText( (ICAddressBreakpoint)breakpoint, qualified ); - } - if ( breakpoint instanceof ICFunctionBreakpoint ) { - return getFunctionBreakpointText( (ICFunctionBreakpoint)breakpoint, qualified ); - } - if ( breakpoint instanceof ICLineBreakpoint ) { - return getLineBreakpointText( (ICLineBreakpoint)breakpoint, qualified ); - } - if ( breakpoint instanceof ICWatchpoint ) { - return getWatchpointText( (ICWatchpoint)breakpoint, qualified ); - } - return ""; //$NON-NLS-1$ - } - - protected String getLineBreakpointText( ICLineBreakpoint breakpoint, boolean qualified ) throws CoreException { - StringBuffer label = new StringBuffer(); - appendSourceName( breakpoint, label, qualified ); - appendLineNumber( breakpoint, label ); - appendIgnoreCount( breakpoint, label ); - appendCondition( breakpoint, label ); - return label.toString(); - } - - protected String getWatchpointText( ICWatchpoint watchpoint, boolean qualified ) throws CoreException { - StringBuffer label = new StringBuffer(); - appendSourceName( watchpoint, label, qualified ); - appendWatchExpression( watchpoint, label ); - appendIgnoreCount( watchpoint, label ); - appendCondition( watchpoint, label ); - return label.toString(); - } - - protected String getAddressBreakpointText( ICAddressBreakpoint breakpoint, boolean qualified ) throws CoreException { - StringBuffer label = new StringBuffer(); - appendSourceName( breakpoint, label, qualified ); - appendAddress( breakpoint, label ); - appendIgnoreCount( breakpoint, label ); - appendCondition( breakpoint, label ); - return label.toString(); - } - - protected String getFunctionBreakpointText( ICFunctionBreakpoint breakpoint, boolean qualified ) throws CoreException { - StringBuffer label = new StringBuffer(); - appendSourceName( breakpoint, label, qualified ); - appendFunction( breakpoint, label ); - appendIgnoreCount( breakpoint, label ); - appendCondition( breakpoint, label ); - return label.toString(); - } - - protected StringBuffer appendSourceName( ICBreakpoint breakpoint, StringBuffer label, boolean qualified ) throws CoreException { - String handle = breakpoint.getSourceHandle(); - if ( !isEmpty( handle ) ) { - IPath path = new Path( handle ); - if ( path.isValidPath( handle ) ) { - label.append( qualified ? path.toOSString() : path.lastSegment() ); - } - } - return label; - } - - protected StringBuffer appendLineNumber( ICLineBreakpoint breakpoint, StringBuffer label ) throws CoreException { - int lineNumber = breakpoint.getLineNumber(); - if ( lineNumber > 0 ) { - label.append( ' ' ); - label.append( MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.26" ), new String[]{ Integer.toString( lineNumber ) } ) ); //$NON-NLS-1$ - } - return label; - } - - protected StringBuffer appendAddress( ICAddressBreakpoint breakpoint, StringBuffer label ) throws CoreException { - try { - label.append( ' ' ); - label.append( MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.27" ), new String[]{ breakpoint.getAddress() } ) ); //$NON-NLS-1$ - } - catch( NumberFormatException e ) { - } - return label; - } - - protected StringBuffer appendFunction( ICFunctionBreakpoint breakpoint, StringBuffer label ) throws CoreException { - String function = breakpoint.getFunction(); - if ( function != null && function.trim().length() > 0 ) { - label.append( ' ' ); - label.append( MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.28" ), new String[]{ function.trim() } ) ); //$NON-NLS-1$ - } - return label; - } - - protected StringBuffer appendIgnoreCount( ICBreakpoint breakpoint, StringBuffer label ) throws CoreException { - int ignoreCount = breakpoint.getIgnoreCount(); - if ( ignoreCount > 0 ) { - label.append( ' ' ); - label.append( MessageFormat.format( CDebugUIMessages.getString( "CDTDebugModelPresentation.29" ), new String[]{ Integer.toString( ignoreCount ) } ) ); //$NON-NLS-1$ - } - return label; - } - - protected void appendCondition( ICBreakpoint breakpoint, StringBuffer buffer ) throws CoreException { - String condition = breakpoint.getCondition(); - if ( condition != null && condition.length() > 0 ) { - buffer.append( ' ' ); - buffer.append( CDebugUIMessages.getString( "CDTDebugModelPresentation.30" ) ); //$NON-NLS-1$ - buffer.append( ' ' ); - buffer.append( condition ); - } - } - - private void appendWatchExpression( ICWatchpoint watchpoint, StringBuffer label ) throws CoreException { - String expression = watchpoint.getExpression(); - if ( expression != null && expression.length() > 0 ) { - label.append( ' ' ); - label.append( CDebugUIMessages.getString( "CDTDebugModelPresentation.31" ) ); //$NON-NLS-1$ - label.append( " \'" ); //$NON-NLS-1$ - label.append( expression ); - label.append( '\'' ); - } - } - private ImageDescriptor[] computeBreakpointOverlays( ICBreakpoint breakpoint ) { ImageDescriptor[] overlays = new ImageDescriptor[]{ null, null, null, null }; try { diff --git a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIMessages.properties b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIMessages.properties index 50c6ba1f3fb..ec9f5dfb528 100644 --- a/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIMessages.properties +++ b/debug/org.eclipse.cdt.debug.ui/src/org/eclipse/cdt/debug/internal/ui/CDebugUIMessages.properties @@ -38,11 +38,5 @@ CDTDebugModelPresentation.22=(disabled) CDTDebugModelPresentation.23=Infinity CDTDebugModelPresentation.24=-Infinity CDTDebugModelPresentation.25=(disabled) -CDTDebugModelPresentation.26=[line: {0}] -CDTDebugModelPresentation.27=[address: {0}] -CDTDebugModelPresentation.28=[function: {0}] -CDTDebugModelPresentation.29=[ignore count: {0}] -CDTDebugModelPresentation.30=if -CDTDebugModelPresentation.31=at CBreakpointWorkbenchAdapterFactory.0=C/C++ breakpoint CBreakpointWorkbenchAdapterFactory.1=C/C++ watchpoint