This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 91203 - Red area is drawn in editor when string literal is not closed
Summary: Red area is drawn in editor when string literal is not closed
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-18 14:04 UTC by Tomas Danek
Modified: 2007-07-03 14:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2006-12-18 14:04:40 UTC
NetBeans IDE Dev (Build 061214)
1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b104
Linux version 2.6.17-10-generic running on i386
cs_CZ (nb); UTF-8

#191
-----------------------
- have a project, create new .rb file
- if you write 

string = "Some string    

(without closing string literal by quote), everything what follows to end of
file is background-colored red. IMHO this is not consistent with standard e.g.
java editor manner?! Syntax error marking should be enough.
Comment 1 Torbjorn Norbye 2006-12-22 22:21:39 UTC
Fixed (in build #200). The lexer now backs up the input to the original line
where the string was initiated such that that line is returned as the full error
token. 

Usually, unterminated input ends up showing everything with a red background.
You usually can't tell, because the red background is hidden by the "current
line" highlighting. If you move the caret off the unterminated string line, you
can see it. In any case, before my fix, the lexer would scan to the end of input
looking for the end of the string, and then abort. This meant the entire end of
the input would be marked as erroneous. With my fix, only the current line shows
up that way, and "normal" lexing resumes from the next line (as if the input had
been terminated there.)
Comment 2 Jiri Kovalsky 2007-07-03 13:57:13 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 3 Jiri Kovalsky 2007-07-03 14:40:34 UTC
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.