Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2007 by IBM; made available under the EPL v1.0 | Jan 9 th, 2007 Darin Wright IBM Rational Software Debug Platform 3.3.

Similar presentations


Presentation on theme: "© 2007 by IBM; made available under the EPL v1.0 | Jan 9 th, 2007 Darin Wright IBM Rational Software Debug Platform 3.3."— Presentation transcript:

1 © 2007 by IBM; made available under the EPL v1.0 | Jan 9 th, 2007 Darin Wright IBM Rational Software Debug Platform 3.3

2 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 2 Topics  Debug Viewers  Debug Command Handlers  Other Enhancements

3 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 3 Provisional to Public in 3.3  Public  Debug Context Management  Debug Command Handlers  Source Display  Suspend Trigger  Provisional  Viewers

4 © 2007 by IBM; made available under the EPL v1.0 | Jan 9 th, 2007 Debug Viewers aka Flexible Hierarchy

5 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 5 Debug Platform 3.1 and Earlier Common Debug Perspective, Views & Actions Standard Debug Model Interfaces Implementation of the Standard Model Platform defined API Model defined API

6 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 6 Debug Platform 3.2 Common Debug Perspective, Views & Actions Standard Debug Model Interfaces Implementation of the Standard Model Alternate Debug Implementation Common Interaction Adapters: Content, Labels, Function Standard Adapter ImplementationAlternate Adapter Implementation

7 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 7 Debug Platform 3.3 – Adapters Changed Common Debug Perspective, Views & Actions Standard Debug Model Interfaces Implementation of the Standard Model Alternate Debug Implementation ** Common Interaction Adapters: Content, Labels, Function ** Standard Adapter Implementation** Alternate Adapter Implementation **

8 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 8 Motivation: Leverage JFace  The 3.3 implementation uses the JFace viewer framework  JFace tree viewer with SWT.VIRTUAL flag, lazy tree content provider, etc.  Debug has less duplicated/custom viewer code  More (but not all) of the viewer framework lives in the right place  To ensure the platform provides correct solution the revised implementation will be provided as provisional APIs in 3.3  Community needs to verify APIs  Others would like to see APIs live in JFace rather than Debug

9 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 9 3.2 Content & Labels Viewer Any Model Presentation Context Content Adapter Label Adapter Element Request Monitor Request Monitor add(…)/done() update set(…)/done() retrieve model specific API

10 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 10 3.3 Content & Labels JFace Tree Viewer Debug Model Element Content Provider Label Provider update(…) updateHasChildren(…) updateChildCount(…) updateElement(…) Element Content Provider update(…) Request done() replace(…), setChildCount(…) setHasChildren(…) Element Label Provider update(…) Request done() setText(…), setImage(…), …

11 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 11 Differences  IElementContentProvider vs. IAsynchronousContentAdapter  Interface names changed – behavior vs. implementation  Retrieves child counts vs. all children  Retrieves visible ranges of children vs. all children  Content provider is queried for each child  Coalesces requests and asks adpater for ranges of children  No longer an intermediate cache of model  Smaller footprint

12 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 12 Differences (more)  IElementLabelProvider vs. IAsynchronousLabelAdapter  Columns are in the request vs. presentation context  Operands and result are specified in one argument  Old style:  doXYZ(Object element, IStatusMonitor monitor, IPresentationContext context)  New style: specializations of IRequest  doXYZ(IChildrenUpdate update)

13 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 13 Filtering  JFace does not support filtering in virtual tree viewers  Since all elements are not retrieved at once  For backwards compatibility, debug has added support for filters  The filters work incrementally – as elements are added to the viewer, filters are applied  Side effect – scrollbars can grow shrink if many elements are filtered  For a more stable UI, models can perform filtering  Sorting is not supported  Models must perform sorting if desired

14 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 14 Same Old Problem  There can only be one adapter (type) per object (type)  3 rd parties can’t  Extend adapters for new views  Modify or extend content in existing views  Assumption we’ve be going on  The debug model implementation provides all adapters (or re-uses the platform adapters)  Debuggers are not extended in downstream plug-ins

15 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 15 ViewerModel Presentation Context Model Proxy Element fires deltas add, remove refresh, select expand Updating with Model Proxy Model Proxy Factory create model specific interaction Content Provider

16 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 16 Model Deltas  Model deltas are similar to resource deltas  Describe incremental changes in a hierarchical model  Model deltas describe what changed, how it changed, and what action to perform on an element Debug Target: NO_CHANGE Thread: CONTENT | STATE | EXPAND Stack Frame: STATE | SELECT

17 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 17 Differences  The model controls proxy installation and disposal  A model proxy is installed for the viewer’s root element by the viewer implementation  After that, models control which and when model proxies are installed and uninstalled by firing deltas (in 3.2, a proxy was installed automatically when an element was added to a viewer)  New flags exist: INSTALL and UNINSTALL  Deltas must include indexes and child counts to support expand and select  Supports virtual content retrieval (only retrieve visible children)  Allows expand/select to happen in one pass (vs. iterative)

18 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 18 Viewer State: Expansion & Selection  Viewer framework supports expansion and selection state saving  Models provide element mementos via IElementMementoProvider  Register adapter with viewer input element  Can register adapters with each model element, or use root memento provider for all elements in a viewer  Viewer has LRU cache of 20 states  Currently, cache is not persisted – only present for viewer lifecycle  Used by Variables, Registers, and Expressions views

19 © 2007 by IBM; made available under the EPL v1.0 | Jan 9 th, 2007 Debug Commands & Handlers

20 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 20 3.3 Debug Context Debug View Selection Actions (getAdapter IStep, etc) Source Lookup (getAdapter ISourceDisplay) IDebugContextService Context activated Provides context (context service per window)

21 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 21 Debug Context API  A “Debug Context Manager” manages “Debug Context Services”  There is a service for each workbench window  A “Debug Context Service” provides context change notification for a window  Context listeners register with a service for notification  Context providers register with a service to provide context  Change notification is sent with “Debug Context Events”  Each event identifies the active context (as an ISelection), the source of the event (context provider), and the type of event (ACTIVATED vs. STATE change)

22 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 22 Debug Command API  The debug platform provides actions for common debug operations like step, terminate, etc.  Each action delegates to a “command handler” to carry out the operation  A “command handler” is retrieved from the active debug context  The platform defines standard command handlers and provides implementations of the handlers for the standard debug mode  IDebugCommandHandler and its subtypes: IDisconnectHandler, IDropToFrameHandler, IResumeHandler, IStepFiltersHandler, IStepIntoHandler, IStepOverHandler, IStepReturnHandler, ISuspendHandler, ITerminateHandler  Allows an action to remain enabled handler is executing

23 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 23 Update Action State Debug View Selection (fire) CONTEXT ACTIVATED Context Service Step Over Action (notify) CONTEXT ACTIVATED Step Over Handler Request canExecute(…) setEnabled(…) done() setEnabled(…)

24 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 24 Execute Action Step Over Action Step Over Handler Request execute(…) setStatus(…) done() Notify errors in dialog click | key press remain enabled?

25 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 25 Differences  Interfaces moved to debug.core plug-in  All interfaces are subtypes of IDebugCommandHandler with common methods:  canExecute(IEnabledStateRequest request)  execute(IDebugCommandRequest request)  Step operations are separated into individual command handlers

26 © 2007 by IBM; made available under the EPL v1.0 | Jan 9 th, 2007 Other Enhancements

27 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 27 Launching Enhancements  Mixed mode launching  For example, profile & debug  Multiple launchers for the same configuration type & mode  User is allowed to choose from available launchers  For example, Yourkit and TPTP profilers can exist in same workbench  Contribute tabs to existing tab groups  For example, a profiler can add a tab to Java Applications

28 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 28 Pluggable Detail Panes  The variables, registers, and expression views support a pluggable detail pane  Contribute a “detail pane factory” to create detail panes for a given selection (new extension point)  Include enablement expression to support lazy loading  Can be more than one pane available per selection – user is allowed to choose from available panes  Detail pane can be any SWT control

29 Debug Platform 3.3 | © 2007 by IBM; made available under the EPL v1.0 29 Legal Notices Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others.


Download ppt "© 2007 by IBM; made available under the EPL v1.0 | Jan 9 th, 2007 Darin Wright IBM Rational Software Debug Platform 3.3."

Similar presentations


Ads by Google