GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-435

[debug] Ability to filter out groovy stack frames

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0Release
    • Fix Version/s: 2.0.1Release
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      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.

        Activity

        Hide
        Andrew Eisenberg added a comment -

        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.

        Show
        Andrew Eisenberg added a comment - 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.
        Hide
        Andrew Eisenberg added a comment -

        Finished and committed. The final solution is slightly different than I had originally envisioned.

        Instead of filtering outright, the stack frames are greyed out. I also include a preference page where the filtering can be enabled/disabled and package prefixes can be chosen.

        Show
        Andrew Eisenberg added a comment - Finished and committed. The final solution is slightly different than I had originally envisioned. Instead of filtering outright, the stack frames are greyed out. I also include a preference page where the filtering can be enabled/disabled and package prefixes can be chosen.

          People

          • Assignee:
            Andrew Eisenberg
            Reporter:
            Andrew Eisenberg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: