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 121265 - /*/ wrongly colored as RE
Summary: /*/ wrongly colored as RE
Status: VERIFIED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-06 10:12 UTC by Martin Schovanek
Modified: 2009-02-27 14:26 UTC (History)
1 user (show)

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 Martin Schovanek 2007-11-06 10:12:53 UTC
[#200711041200,, jdk1.5.0]

to reproduce:
-------------
1) type in a .js
/*/
ERROR: it is colored as Regular Expression but in fact it is unfinished comment

Similar sample /*.HTML/ is at Options > Fonts & Colors > Sample File. Please fix
it as well.
Comment 1 Jan Jancura 2007-11-09 08:10:52 UTC
I am no sure about your evaluation.
Comment 2 Martin Schovanek 2007-11-09 11:10:34 UTC
Parser have the same opinion, type in a .js:
var x=/*/;

and run it. Scripting Engine throws: 'Unterminated comment in ....' error
Comment 3 Daniel Prusa 2007-12-12 13:38:47 UTC
/*/ should be really interpreted as an unfinished comment (Idea and Aptana parse it in this way);
regexp in JavaScript sample fixed

/cvs/scripting/javascript/src/org/netbeans/modules/languages/javascript/JavaScriptExample.js,v  <--  JavaScriptExample.js
new revision: 1.3; previous revision: 1.2
Comment 4 Petr Jiricka 2008-02-25 22:51:59 UTC
Still reproducible in NB 6.1 build 682.
Comment 5 Torbjorn Norbye 2008-02-25 23:15:22 UTC
I can't reproduce this. Petr, can you show me your entire source file?  If I have just "/*/" in the source file it's
shown as an error (along with a parser error message).  If I have var x=/*/; as also shown in this bug, I also get the same.
Comment 6 Petr Jiricka 2008-02-26 12:13:10 UTC
I have the same behavior. But the question is whether unfinished comments should be gray (as finished comments are), or
whether they should be black. I thought the issue complained about /*/ not being gray. But perhaps that is not the
desired behavior and the current behavior is correct. Feel free to close if you think  there is no bug.
Comment 7 Torbjorn Norbye 2008-02-26 19:35:24 UTC
I think the bug was that in 6.0 the editor failed to recognize /*/ as an error, it was shown as a valid regular
expression. This is no longer the case. I'm not sure that we should show /*/ as a comment since it's not a valid comment.
Comment 8 Martin Schovanek 2008-02-26 21:40:39 UTC
V.