mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Use 'StringBuffer' instead of 'String' when generating stack frame labels.
Added a label for dummy stack frames instead of using the name provided by the rendered object.
This commit is contained in:
parent
335bab74c2
commit
74005e4343
2 changed files with 34 additions and 18 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2003-11-13 Mikhail Khodjaiants
|
||||||
|
Use 'StringBuffer' instead of 'String' when generating stack frame labels.
|
||||||
|
Added a label for dummy stack frames instead of using the name provided by the rendered object.
|
||||||
|
* CDTDebugModelPresentation.java
|
||||||
|
|
||||||
2003-11-05 Mikhail Khodjaiants
|
2003-11-05 Mikhail Khodjaiants
|
||||||
The argument type of the 'getBreakpointAddress' of 'ICBreakpointManager' is changed from
|
The argument type of the 'getBreakpointAddress' of 'ICBreakpointManager' is changed from
|
||||||
'ICBreakpoint' to 'ICBreakpointManager'.
|
'ICBreakpoint' to 'ICBreakpointManager'.
|
||||||
|
|
|
@ -97,6 +97,8 @@ public class CDTDebugModelPresentation extends LabelProvider
|
||||||
*/
|
*/
|
||||||
public final static String DISPLAY_FULL_PATHS = "DISPLAY_FULL_PATHS"; //$NON-NLS-1$
|
public final static String DISPLAY_FULL_PATHS = "DISPLAY_FULL_PATHS"; //$NON-NLS-1$
|
||||||
|
|
||||||
|
private static final String DUMMY_STACKFRAME_LABEL = "...";
|
||||||
|
|
||||||
protected HashMap fAttributes = new HashMap(3);
|
protected HashMap fAttributes = new HashMap(3);
|
||||||
|
|
||||||
protected CDebugImageDescriptorRegistry fDebugImageRegistry = CDebugUIPlugin.getImageDescriptorRegistry();
|
protected CDebugImageDescriptorRegistry fDebugImageRegistry = CDebugUIPlugin.getImageDescriptorRegistry();
|
||||||
|
@ -521,32 +523,41 @@ public class CDTDebugModelPresentation extends LabelProvider
|
||||||
IStackFrameInfo info = (IStackFrameInfo)stackFrame.getAdapter( IStackFrameInfo.class );
|
IStackFrameInfo info = (IStackFrameInfo)stackFrame.getAdapter( IStackFrameInfo.class );
|
||||||
if ( info != null )
|
if ( info != null )
|
||||||
{
|
{
|
||||||
String label = new String();
|
StringBuffer label = new StringBuffer();
|
||||||
label += info.getLevel() + " ";
|
label.append( info.getLevel() );
|
||||||
if ( info.getFunction() != null && info.getFunction().trim().length() > 0 )
|
label.append( ' ' );
|
||||||
|
if ( info.getFunction() != null )
|
||||||
{
|
{
|
||||||
label += info.getFunction() + "() ";
|
String function = info.getFunction().trim();
|
||||||
if ( info.getFile() != null )
|
if ( function.length() > 0 )
|
||||||
{
|
{
|
||||||
IPath path = new Path( info.getFile() );
|
label.append( function );
|
||||||
if ( !path.isEmpty() )
|
label.append( "() " );
|
||||||
|
if ( info.getFile() != null )
|
||||||
{
|
{
|
||||||
label += "at " + ( qualified ? path.toOSString() : path.lastSegment() ) + ":";
|
IPath path = new Path( info.getFile() );
|
||||||
if ( info.getFrameLineNumber() != 0 )
|
if ( !path.isEmpty() )
|
||||||
label += info.getFrameLineNumber();
|
{
|
||||||
|
label.append( "at " );
|
||||||
|
label.append( ( qualified ? path.toOSString() : path.lastSegment() ) );
|
||||||
|
label.append( ":" );
|
||||||
|
if ( info.getFrameLineNumber() != 0 )
|
||||||
|
label.append( info.getFrameLineNumber() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
label += "<symbol is not available>";
|
label.append( "<symbol is not available>" );
|
||||||
return label;
|
return label.toString();
|
||||||
}
|
}
|
||||||
IDummyStackFrame dummy = (IDummyStackFrame)stackFrame.getAdapter( IDummyStackFrame.class );
|
return ( stackFrame.getAdapter( IDummyStackFrame.class ) != null ) ?
|
||||||
if ( dummy != null )
|
getDummyStackFrameLabel( stackFrame ) : stackFrame.getName();
|
||||||
{
|
}
|
||||||
return stackFrame.getName();
|
|
||||||
}
|
private String getDummyStackFrameLabel( IStackFrame stackFrame )
|
||||||
return stackFrame.getName();
|
{
|
||||||
|
return DUMMY_STACKFRAME_LABEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getVariableText( IVariable var ) throws DebugException
|
protected String getVariableText( IVariable var ) throws DebugException
|
||||||
|
|
Loading…
Add table
Reference in a new issue