I have a CDT based debugger and you want to add some information to the label in the node stream. I want the label surrounded by a red rectangle to display additional information (see screenshot below).

AFAIR, the format string for this label is set in the ThreadVMNode_No_columns__text_format property in the file C:\Users\...\workspace\org.eclipse.cdt.dsf.gdb.ui\src\org\eclipse\cdt\dsf\gdb\internal\ui\viewmodel\launch\MessagesForGdbLaunchVM.properties .
# {0} - name available, 0=not available/1=available # {1} - name # {2} - ID available, 0=not available/1=available # {3} - ID # {4} - OS Thread ID available, 0=not available/1=available # {5} - OS Thread ID # {6} - Core available, 0=not available/1=available # {7} - Core # {8} - 0=running/1=suspended # {9} - state change reason available, 0=not available/1=available # {10} - state change reason # {11} - state change details available, 0=not available/1=available # {12} - state change details ThreadVMNode_No_columns__text_format={0,choice,0#Thread|1#{1}}{2,choice,0#|1# [{3}]}{4,choice,0#|1# {5}}{6,choice,0#|1# [core: {7}]} ({8,choice,0#Running|1#Suspended}{9,choice,0#|1# : {10}}{11,choice,0#|1# : {12}})
This format string is used in the org.eclipse.cdt.dsf.gdb.internal.ui.viewmodel.launch.ThreadVMNode.createLabelProvider() method:
public class ThreadVMNode extends AbstractThreadVMNode implements IElementLabelProvider, IElementMementoProvider { [...] @Override protected IElementLabelProvider createLabelProvider() { PropertiesBasedLabelProvider provider = new PropertiesBasedLabelProvider(); provider.setColumnInfo( PropertiesBasedLabelProvider.ID_COLUMN_NO_COLUMNS, new LabelColumnInfo(new LabelAttribute[] {
AFAIK, to add new information to the display, you must
- override the format string
MessagesForGdbLaunchVM.properties and - add a new row to the array of strings in a call to the
GdbExecutionContextLabelText constructor.
What is the best way to do both of these things (it is advisable not to change the code of the main Eclipse / CDT classes)?
Update 1 (09/12/2014 19:56 MSK): I tried to use a custom debug presentation model by adding an extension, but the MyCompanyDebugModelPresentation class is not called anyhwere.
<extension point="org.eclipse.debug.ui.debugModelPresentations"> <debugModelPresentation class="com.mycompany.internal.debug.ui.model.MyCompanyDebugModelPresentation" id="com.mycompany.internal.debug.ui.model.MyCompanyDebugModelPresentation"> </debugModelPresentation> </extension>