Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340015

Summary: [syntax highlighting] Syntax highlighting does not recognize Unicode escapes
Product: [Eclipse Project] JDT Reporter: Markus Milleder <Markus.Milleder>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, Olivier_Thomann
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Markus Milleder CLA 2011-03-15 09:17:07 EDT
Build Identifier: 20110213-1648

From the discussion about underhanded code in http://thedailywtf.com/Comments/The-Disgruntled-Bomb.aspx, comment http://thedailywtf.com/Comments/The-Disgruntled-Bomb.aspx?pg=5#340905


Reproducible: Always

Steps to Reproduce:
Paste the following in a Java file
// This is a friendly comment \u000A nasty code here

The whole line is painted as a comment.
The incremental compiler immediately notices "nasty code here" as invalid code.
While contrived, it isn't nice that syntax highlighting and parsing diverge.
Source->Format does the right thing: it breaks the line.

Real, nasty code that is valid could be a problem, otherwise I'd call it minor.
Comment 1 Olivier Thomann CLA 2011-03-15 09:20:38 EDT
Move to JDT/Text
Comment 2 Dani Megert CLA 2011-03-15 09:25:22 EDT

*** This bug has been marked as a duplicate of bug 3533 ***