Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "CDT/Archive/Debug/Catchpoints support"
m (→Catchpoint contributions) |
(→Implementation) |
||
Line 19: | Line 19: | ||
== Implementation == | == Implementation == | ||
− | * CBreakpoint already provides extensibility mechanism that can be used for catchpoint contributions? | + | * CBreakpoint already provides extensibility mechanism that can be used for catchpoint contributions? Or just to define suportclass of catchpoints? |
− | * To represent event type there is two options: use marker type or use marker attribute | + | * To represent event type there is two options: use marker type or use marker attribute. I will go with attribute for now. |
+ | |||
+ | === UI === | ||
+ | * Add extension point that allow to contribute event type and its editors, example | ||
+ | <extension | ||
+ | point="org.eclipse.cdt.debug.ui.catchpoints"> | ||
+ | <catchpointPresentation | ||
+ | eventTypeId="org.eclipse.cdt.debug.gdb.catch" | ||
+ | eventTypeLabel="Exception Caught" | ||
+ | hasArgument="true" | ||
+ | argumentLabel="Exception Name" | ||
+ | controlClass="org.eclipse.cdt.debug.ui.utils.CTypeAssistLookup" | ||
+ | /> | ||
+ | </extension> | ||
+ | === C Model === | ||
+ | * Add interface org.eclipse.cdt.debug.core.model.ICCatchpoint extends ICBreakpoint | ||
+ | ** In there define strings for 2 addition marker attributes: event type id and event argument | ||
+ | ** Define 2 getter methods for these attribute | ||
+ | * Add class org.eclipse.cdt.debug.internal.core.breakpoints.CCatchpoint extends CBreakpoint implements ICCatchpoint | ||
+ | * Add org.eclipse.debug.core.breakpoints extension for breakpoint markers | ||
+ | === CDI Model === | ||
+ | * add interface org.eclipse.cdt.debug.core.cdi.model.ICDICatchpoint extends ICDIBreakpoint | ||
+ | * add createCatchpoint method in CDTDebugModel | ||
+ | * support in CBreakpointManager handleBreakpontCreatedEvent |
Revision as of 17:40, 8 April 2008
This document describe design ideas of adding catchpoints support to CDT
Contents
Workflow & UI
- Adding catchpoint
- From breakpoints view, right click Add catchpoint... Dialog opens. Dialog contains type of event to catch and maybe additional argument field.
- From console, triggers adding breakpoints by backend
- Removing catchpoint
- Removing catchpoint from breakpoints view, select breakpoint, right click -> Delete
- From console, triggers deleting breakpoint by backend
- Viewing/Editing
- Select catchpoint in breakpoints view, right click -> Show breakpoint properties
- Catchpoint properties contain common page, conditions and triggered actions.
Catchpoint contributions
- Main Catchpoints attributes would consist of Catchpoint type (event type - String) and Extra argument (Object)
- Plugin can contribute via extension points of programmatically:
- new catchpoint type, and whether it will use extra argument or not. Label for this catchpoint type and Label for the argument.
- for advanced editing of argument(s) plugin can contribute class that implements Control (To view/edit extra argument) and implement some interface to get/set extra argument
Implementation
- CBreakpoint already provides extensibility mechanism that can be used for catchpoint contributions? Or just to define suportclass of catchpoints?
- To represent event type there is two options: use marker type or use marker attribute. I will go with attribute for now.
UI
- Add extension point that allow to contribute event type and its editors, example
<extension point="org.eclipse.cdt.debug.ui.catchpoints"> <catchpointPresentation eventTypeId="org.eclipse.cdt.debug.gdb.catch" eventTypeLabel="Exception Caught" hasArgument="true" argumentLabel="Exception Name" controlClass="org.eclipse.cdt.debug.ui.utils.CTypeAssistLookup" /> </extension>
C Model
- Add interface org.eclipse.cdt.debug.core.model.ICCatchpoint extends ICBreakpoint
- In there define strings for 2 addition marker attributes: event type id and event argument
- Define 2 getter methods for these attribute
- Add class org.eclipse.cdt.debug.internal.core.breakpoints.CCatchpoint extends CBreakpoint implements ICCatchpoint
- Add org.eclipse.debug.core.breakpoints extension for breakpoint markers
CDI Model
- add interface org.eclipse.cdt.debug.core.cdi.model.ICDICatchpoint extends ICDIBreakpoint
- add createCatchpoint method in CDTDebugModel
- support in CBreakpointManager handleBreakpontCreatedEvent