Summary: | [syntax highlighting] provide distinct coloring for string delimiters | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Florian Lasinger <florian> |
Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> |
Status: | ASSIGNED --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | daniel_megert, deepakazad, markus.kell.r, sebastian.zarnekow |
Version: | 3.7 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Florian Lasinger
2011-05-11 04:43:39 EDT
I think it would be interesting to highlight escape sequences in strings, too. Absolutely! > I think it would be interesting to highlight escape sequences in strings, too. Bug 106721 is the same request for the Java Properties File editor. If we color the escaped characters, I think the start/end quotes can stay as they are. We have to see whether we also want to color the \ and \u etc.: - Pro: In "Hall\u00F6le", the whole \uHHHH can be identified as an escape - Con: In "\\\\\\\n", everything becomes colored and you can't easily count the real backslashes. (In reply to comment #3) > Bug 106721 is the same request for the Java Properties File editor. > > If we color the escaped characters, I think the start/end quotes can stay as > they are. We have to see whether we also want to color the \ and \u etc.: > - Pro: In "Hall\u00F6le", the whole \uHHHH can be identified as an escape > - Con: In "\\\\\\\n", everything becomes colored and you can't easily count the > real backslashes. A hover that shows the actual string value could be helpful. (In reply to comment #4) > A hover that shows the actual string value could be helpful. We already have this support in Properties file editor, and should add it to the Java editor as well. (In reply to comment #3) > If we color the escaped characters, I think the start/end quotes can stay as > they are. Agree > - Con: In "\\\\\\\n", everything becomes colored and you can't easily count the > real backslashes. How often do we have so many backslasehs? In any case, the hover with the real string should help here. > If we color the escaped characters, I think the start/end quotes can stay as
> they are.
There may be use cases with single quotes or other characters but without escape sequences where reading of strigs could be simplified. Usually the user knows best.
I don't know how much effort this would be to implement and maintain, but at least having the option would be highly welcome. It can be off by default.
|