Summary: | Anonymous type rendered as number in hover | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Philipe Mulet <philippe_mulet> | ||||||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | normal | ||||||||||
Priority: | P3 | CC: | markus.kell.r, martinae | ||||||||
Version: | 3.3 | Keywords: | polish | ||||||||
Target Milestone: | 3.3 M7 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Philipe Mulet
2007-04-03 09:49:33 EDT
Created attachment 62776 [details]
Offending hover
- Is this fixable on the JDT/UI side? We get the resolved label that contains these number as types - Is this corner case? I think it should rather be addressed by information in the binding key itself (i.e. instead of a number, it should remember the supertype S, so as to be able to render: new S(){}). JDT.Core should probably still return a valid type name. I suggest to return something like $1, what makes it clear that this is an anonymous type. Or maybe 'Anonym_Object'. I don't think this is a common scenario, and opt for a simple solution. Interesting thought... I was leaning to us being consistent with our error messages. e.g. public class X { static <T> T[] toArray(T t) { return null; } public static void main(String[] args) { int i = toArray(new Object(){}); } } cannot convert from new Object(){}[] to int Created attachment 65052 [details]
Proposed fix and regression tests
Fix and tests released for 3.3M7 in HEAD. Created attachment 65184 [details]
Small adjustement on top of previous patch
This fixes the case where the type signature is included in another signature (e.g. a method signature).
Will be in build > I20070427-0010
Verified for 3.3 M7 using build I20070427-0010 *** Bug 99627 has been marked as a duplicate of this bug. *** |