| Summary: | [nls tooling] NLS Hover writes IAE to log | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> | ||||||||||||||
| Component: | Text | Assignee: | Deepak Azad <deepakazad> | ||||||||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||||||||
| Severity: | normal | ||||||||||||||||
| Priority: | P2 | CC: | daniel_megert | ||||||||||||||
| Version: | 3.7 | Flags: | markus.kell.r:
review+
|
||||||||||||||
| Target Milestone: | 3.7 M6 | ||||||||||||||||
| Hardware: | PC | ||||||||||||||||
| OS: | Windows 7 | ||||||||||||||||
| Whiteboard: | |||||||||||||||||
| Attachments: |
|
||||||||||||||||
|
Description
Markus Keller
(In reply to comment #0) > HEAD, probably an older problem Yup, it is an older problem. And I think you get the same IAE in other parts of the tooling as well. I will take a look. Created attachment 185307 [details]
Javadoc hover with warning
> => Expected: Nothing in log, but hover should tell which .properties file is > malformed. Agreed, but the text should be in italic, like in the Javadoc hover when there's no font (see attachment 185307 [details]). (In reply to comment #3) > Agreed, but the text should be in italic, like in the Javadoc hover when > there's no font (see attachment 185307 [details]). That's not trivial, since HTML2TextReader currently doesn't support italics. A formatting like that for missing keys would also be okay for me. Created attachment 188866 [details] screenshot with warning (In reply to comment #4) > (In reply to comment #3) > > Agreed, but the text should be in italic, like in the Javadoc hover when > > there's no font (see attachment 185307 [details] [details]). > > That's not trivial, since HTML2TextReader currently doesn't support italics. > A formatting like that for missing keys would also be okay for me. The attached screenshot is ok ? Created attachment 188867 [details]
proposed patch
> Created attachment 188866 [details]
> screenshot with warning
Hmm, the hover is a bit confusing, since it just talks about an invalid Unicode sequence, but does not tell where exactly the problem is. I guess you don't get the actual line number where the problem occurs, but I think we should tell explicitly that the problem is in the properties file and not in the hovered string literal. E.g. like this (also avoids the double colons in one sentence):
<b>Warning:</b> The properties file could not be read!
Invalid Unicode sequence: illegal character
Created attachment 188927 [details]
screenshot with warning II
Created attachment 188928 [details]
proposed patch II
Markus, good to go ?
> Created attachment 188928 [details] [diff]
> proposed patch II
>
> Markus, good to go ?
Yep, if you fix the formatting of the if-else in NLSStringHover#toHtml(..).
Fixed in HEAD. This almost works except when I click on the icon in the enriched NLS hover that now shows in the Java editor: it has "" as key and hence doesn't bring me to the right key/value pair. However, clicking on the constant works i.e. brings me to the right key in the properties file. Created attachment 189092 [details] additional fix (In reply to comment #12) > This almost works except when I click on the icon in the enriched NLS hover > that now shows in the Java editor: it has "" as key and hence doesn't bring me > to the right key/value pair. However, clicking on the constant works i.e. > brings me to the right key in the properties file. Thanks Dani. Fixed in HEAD. Verified in HEAD. |