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 95303

Summary: html tag matching doesn't work over separated html sections
Product: javaee Reporter: Jindrich Sedek <jsedek>
Component: JSPAssignee: Marek Fukala <mfukala>
Status: VERIFIED FIXED    
Severity: blocker CC: pjiricka
Priority: P3    
Version: 6.x   
Hardware: All   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Bug Depends on: 95569, 121046    
Bug Blocks:    
Attachments: wrong behaviour
right-on behaviour

Description Jindrich Sedek 2007-02-12 17:29:28 UTC
Create new WebApplication
in index.jsp set caret on <html> tag
background color of </html> end tag should be highlighted but, it's not
try the same with <body> tag

it works well for <head> tag in index.jsp

it seams to be cause by <%-- --%> comment in jsp page - remove this comment -
everything starts working well
html comment <!-- --> doesn't cause this issue
"Ctrl+[" feature (go to end tag) doesn't work as well in this context
Comment 1 Jindrich Sedek 2007-02-12 17:45:59 UTC
Created attachment 38390 [details]
wrong behaviour
Comment 2 Jindrich Sedek 2007-02-12 17:47:13 UTC
Created attachment 38391 [details]
right-on behaviour
Comment 3 Marek Fukala 2007-02-14 15:09:20 UTC
I doesn't work because I still wait for some functionality from lexer API. More
specifically I need an elegant way how to skip 'empty blocks' when traversing
html token sequence. Now, the html token sequence ends when the jsp token starts
and there is not elegant way how to find next html piece. I can workaround if
Mila doesn't implement in 6.0.

I realized there is no issue for such request though Mila is aware of the need
already - I have just filled new issue #95569 (Allow to go through separated
token sequences).
Comment 4 Marek Fukala 2007-04-18 12:32:26 UTC
The problem is with the embedded html - the sections divided by JSP tokens
(comments, directives, tags, EL ...) are not easy to join so the find matching
block fails. Mila Metelka has recently upgraded the Lexer API so it is possible
to traverse these separated token chanins, I'll try to use them to fix this issue.
Comment 5 Marek Fukala 2007-04-18 12:32:40 UTC
*** Issue 100653 has been marked as a duplicate of this issue. ***
Comment 6 frankioski 2007-06-06 23:08:44 UTC
Problem still exists in build # 200705281800
Comment 7 Marek Fukala 2007-06-07 10:33:28 UTC
Exists, and will be fixed in netbeans 6.0. This is not a cirical issue, please
do not increase priority just because of you do want to address is asap. Thanks.
Comment 8 Jiri Prox 2007-09-17 21:41:01 UTC
Obsolete milestone, please reevaluate
Comment 9 Marek Fukala 2007-10-12 18:49:05 UTC
must be fixed in 6.0
Comment 10 Marek Fukala 2008-01-14 22:31:33 UTC
*** Issue 123365 has been marked as a duplicate of this issue. ***
Comment 11 Marek Fukala 2008-02-25 16:43:02 UTC
the tag matching should be reimplemented to use GSF infrastructure and the html parser tree.
Comment 12 Marek Fukala 2008-03-05 19:11:15 UTC
fixed in revision c078fb70aed1 by reimplementing the html bracket matcher to be parser based.
Comment 13 Jindrich Sedek 2008-03-26 11:26:30 UTC
verified.
NetBeans IDE Dev (Build 200803251204)