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 16664 - Syntax highlighting breaks for '<t'
Summary: Syntax highlighting breaks for '<t'
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P3 blocker (vote)
Assignee: issues@javaee
Depends on: 17588
  Show dependency tree
Reported: 2001-10-17 21:57 UTC by _ gtzabari
Modified: 2003-07-02 08:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description _ gtzabari 2001-10-17 21:57:37 UTC
dev build 200110180100
Sun JDK 1.3.1

In JSP files, if you type:

for(var i=0; i<temp_digits.length; i++)

   you will get syntax highlighting for <temp_digits which shouldn't be there. 
As a result ';' is highlighted as an error in the code, which is also false.
Comment 1 _ rkubacki 2001-10-18 09:21:31 UTC
That's OK that you get such coloring if your java code is not inside a
scriplet. This works correctly is you write it in scriplets.
Comment 2 _ gtzabari 2001-10-18 13:12:23 UTC
I'm typing this inside Javascript code.. It shouldn't be flagging it 
as an error ;)
Comment 3 _ rkubacki 2001-10-18 14:37:41 UTC
In such case it is problem of editor (HTML editor bahaves the same way).
Comment 4 Jan Lahoda 2001-10-18 20:02:30 UTC
Hi, I do not understand the problem.
I would like to ask you to attach whole example file on which we will
see the problem.
Comment 5 _ gtzabari 2001-10-18 20:52:11 UTC
I'm sorry, I cannot quote the entire source-code to you as it's so-
called "intellectual property" which belongs to my employer. I doubt 
they'll want me giving sources away :) :)

Basically open a new JSP file and say:

"for(var i=0; i<temp_digits.length; i++)"

somewhere in the HTML code. You'll see how <t is being interpreted 
incorrectly and ';' is highlighted as an error.
Comment 6 Jan Lahoda 2001-10-19 08:37:43 UTC
So, I meant to attach only example, not your production code.
If I understand it properly, HTML editor (inside a HTML code) colores
<t... as tag and ';' as error - but thats OK, <t... is in HTML tag and
';' should not be inside a tag AFAIK. If there is some change for JSP,
editor module does not know it, and web module should handle it on
it's own.
Comment 7 _ gtzabari 2001-10-19 15:07:28 UTC
You are quite correct, however syntax highlighting should be disabled 
within <script> </script> tags, which it is not.
Comment 8 Petr Jiricka 2001-11-13 09:07:53 UTC
Are not Javascript scripts usually put inside an HTML comment ? In 
that case I suspect it would work in a satisfactory way.

A permanent solution would be to provide Javascript coloring feature 
and use this inside the HTML script tag. So shouldn't this be marked 
as enhancement ?

Comment 9 _ gtzabari 2001-11-13 12:12:17 UTC
You are right; enclosing the script inside an HTML comment should fix
the problem but it makes editing quite difficult. I'll open a new
enhanceemnt against Javascript syntax highlighting.
Comment 10 Jan Chalupa 2001-11-27 17:37:23 UTC
Target milestone -> 3.3.1.
Comment 11 _ rkubacki 2001-12-07 10:33:54 UTC
OK, if you agreed to fill a new RFE, can you add a reference to it
here? I am closing this one.
Comment 12 Quality Engineering 2003-07-02 08:25:01 UTC
Resolved for 3.4.x or earlier, no new info since then -> verify.

Comment 13 Quality Engineering 2003-07-02 08:27:24 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.