Bug 300300

Summary: [Expression] Support for java-specific columns in Expressions view.
Product: [Eclipse Project] JDT Reporter: Pawel Piech <pawel.1.piech>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: darin.eclipse
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
Patch with feature.
none
Support for instance ID and instance count values for expressions. none

Description Pawel Piech CLA 2010-01-21 00:11:32 EST
Created attachment 156758 [details]
Patch with feature.

As of v3.6M5 Eclipse Debug Platform now supports columns in the Expressions view.  For java, the expressions view should show the Instance ID and Instance Count columns just as in the variables view.

See bug 235646.
Comment 1 Darin Wright CLA 2010-01-21 11:08:12 EST
It would be nice to be able to implement the feature without implementing the IExpressionManager interface (which is specified as @noimplement). I guess the alternative is to have a content provider that subclasses the ExpressionManagerContentProvier (which is internal...).

As is, some columns don't render properly for expressions, since it's the "variable" label provider that renders them, and for expressions they don't appear. This to could be fixed up by having an specialized expression label provider for the Java debugger (and subclassing the internal one).
Comment 2 Pawel Piech CLA 2010-01-22 14:49:17 EST
Created attachment 156983 [details]
Support for instance ID and instance count values for expressions.

(In reply to comment #1)
> It would be nice to be able to implement the feature without implementing the
> IExpressionManager interface (which is specified as @noimplement). I guess the
> alternative is to have a content provider that subclasses the
> ExpressionManagerContentProvier (which is internal...).
Not necessarily, the content provider doesn't really need to reference the viewer input.  I got rid of the IExpressionManager interface proxy thing in this implementation.

> As is, some columns don't render properly for expressions, since it's the
> "variable" label provider that renders them, and for expressions they don't
> appear. This to could be fixed up by having an specialized expression label
> provider for the Java debugger (and subclassing the internal one).

This is actually even more complicated.  We can't easily override the expression label provider, because there's only one implementation of IWatchExpression, so this patch adds a new provisional API in platform: IExpressionAdapterDelegate.  I'm afraid that the whole thing is not very pretty...  though it works.  On the upside, it should also allow for supplying a custom cell editor for expression value, so that expression values could be modified too.  However, this would require some extra work in JDT.
Comment 3 Darin Wright CLA 2010-03-08 11:30:36 EST
Not planned for 3.6