Bug 137927 - [variables] Java Detail Formatters bugs and enhancements
Summary: [variables] Java Detail Formatters bugs and enhancements
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: bugday
: 104479 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-21 08:30 EDT by Radek Wikturna CLA
Modified: 2019-11-17 17:21 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Radek Wikturna CLA 2006-04-21 08:30:10 EDT
I really like the possibility to create my own detail formatters for the Variables view but there are several things which make it less usefull then it may be
Normally you see e.g.
tmpObject = Car (id = 20)            (variable name = Class name (id = instance identification))
and in the Detail pane you see:
Ferrari Testarossa     (the result of MyClass.toString() {return getBrand() + " " + getModel()})
When I define a detail formatter for MyClass as "getBrand()" I will see:
tmpObject = Ferrari
and in the Detail pane:
Ferrari

Problems:
1) The same formatter is used for the Variables pane and for the Detail pane (the toString() method is not called at all). It would be desirable to be able to specify a different output for the Variables pane and the Detail pane (by default the detail pane should still show the result of toString())

2) By using a formatter I lose 2 valuable pieces of information : the class name and more importantly the instance identification! There should be an option to show the class name and/or the instance indentification in front of/after the result of the formatter. e.g.
tmpObject = Car (id = 20) Ferrari

3) even if I have a detail formatter, it is not used when formatting collections/arrays (the toString() method is still called). It should be configurable whether the formatter will be used for formatting collections/arrays)

4) whether the formatter will will be used for the Varaibles or/and Detail pane and the other options I mentioned above should be configurable for each formatter separatelly !
Comment 1 Darin Wright CLA 2006-04-21 10:03:33 EDT
Deferred for post 3.2 consdieration.

Note that for when using columns in 3.2, you can see type name and instanceid in seperate columns, as well as the detail formatter in the value column.
Comment 2 Curtis Windatt CLA 2008-03-31 09:32:08 EDT
*** Bug 104479 has been marked as a duplicate of this bug. ***
Comment 3 Curtis Windatt CLA 2008-03-31 09:36:23 EDT
Marking as bug day for anyone in the community is interested.  Seems like there
is interest in the first enhancement, only using detail formatters in the
variables view (not the detail pane).
Comment 4 Robert Spremulli CLA 2008-12-29 09:37:00 EST
#1 is handy, but the priority enhancement for me is #3.  I do agree with these enhancements in general, though comment #1 does reduce the priority of issue #2.

The use case is DBObjects.  I have a detail formatter for all my DBClasses to use the PrimaryKey as the DetailFormatter, but in a list (as with selectWithWhere) it uses the default logic instead of the primary Keys.
Comment 5 Srgjan Srepfler CLA 2013-03-14 13:24:16 EDT
It would also be nice if it would be possible to apply Detail formatters on annotations (ex. if class is a jaxb annotated class it should be possible to write easy unmarshallers. 
It would be nice also to have a default eclipse detail formatter but also be able to redefine it per project (and reuse project classpath for instance).
Also, detail formatters should be exportable/importable so that their re-use and sharing is easy.
Comment 6 Eclipse Genie CLA 2019-11-17 17:21:04 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.