Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.0Release
-
Fix Version/s: 2.0.1Release
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Most of the time, users will not want to see all the extra stack frames added by the Groovy MOP when debugging. Should be able to filter out all of these stack frames with a checkbox somewhere.
Looking at this now and I don't think that filtering will be possible without supplying a patch for the debug.ui bundle. However, it might be possible to change the name of the internall groovy stack frames to something obvious (eg- prepending with '..........').
I haven't tried this, obviously, but here's my idea just so I don't forget:
1. Register an Adapter factory for IJavaStackFrame
2. Set it to replace MonitorsAdapterFactory in the AdapterManager
3. This adapter factory will generally delegate to the MonitorsAdapterFactory, but instead of creating a JavaStackFrameContentProvider, it will create something like a GroovyJavaStackFrameContentProvider
4. GroovyJavaStackFrameContentProvider will act exactly the same as JavaStackFrameContentProvider (probably subclass), unless a Groovy stack frame is found. In that case, it will pre-pend some text to make it explicit that this is an otherwise uninteresting groovy stack frame.
I don't know enough about the AdapterManager to know if step 2 is possible and I don't know enough about JavaStackFrameContentProvider to know if step 4 is possible. But other than that, this is a bullet-proof plan.