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 121046

Summary: HTML SyntaxParser doesn't properly parse if there are higher language tokens inside
Product: web Reporter: Marek Fukala <mfukala>
Component: HTML EditorAssignee: Marek Fukala <mfukala>
Status: VERIFIED FIXED    
Severity: blocker CC: mschovanek, pjiricka
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 95303, 120381, 120946, 121095    
Attachments: The patch of the fix

Description Marek Fukala 2007-11-03 10:10:36 UTC
For example the parse result is broken for tag's attribute:

<h1 style="color: ${"red"};"/>

It then results to improper embeedings created - see issue #121033.

This must be fixed in 6.0
Comment 1 Marek Fukala 2007-11-04 17:39:49 UTC
needs to be fixed in 6.0
Comment 2 Marek Fukala 2007-11-12 09:28:44 UTC
fixed, QE, please verify ASAP, thanks.

Checking in html/editor/lib/src/org/netbeans/editor/ext/html/HTMLSyntaxSupport.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/HTMLSyntaxSupport.java,v  <--  HTMLSyntaxSupport.java
new revision: 1.40; previous revision: 1.39
done
Checking in html/editor/lib/src/org/netbeans/editor/ext/html/SyntaxElement.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/SyntaxElement.java,v  <--  SyntaxElement.java
new revision: 1.8; previous revision: 1.7
done
Checking in html/editor/lib/src/org/netbeans/editor/ext/html/HTMLCompletionQuery.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/HTMLCompletionQuery.java,v  <--  HTMLCompletionQuery.java
new revision: 1.46; previous revision: 1.45
done
Checking in html/editor/lib/test/unit/src/org/netbeans/editor/ext/html/HTMLSyntaxSupportTest.java;
/cvs/html/editor/lib/test/unit/src/org/netbeans/editor/ext/html/HTMLSyntaxSupportTest.java,v  <-- 
HTMLSyntaxSupportTest.java
new revision: 1.10; previous revision: 1.9
done
Checking in html/editor/src/org/netbeans/modules/html/editor/coloring/EmbeddingUpdater.java;
/cvs/html/editor/src/org/netbeans/modules/html/editor/coloring/EmbeddingUpdater.java,v  <--  EmbeddingUpdater.java
new revision: 1.18; previous revision: 1.17
done
Checking in web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JSPKit.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JSPKit.java,v  <--  JSPKit.java
new revision: 1.56; previous revision: 1.55
done
Checking in html/editor/lib/src/org/netbeans/editor/ext/html/parser/SyntaxParser.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/parser/SyntaxParser.java,v  <--  SyntaxParser.java
new revision: 1.17; previous revision: 1.16
done
Checking in html/editor/lib/src/org/netbeans/editor/ext/html/parser/SyntaxElement.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/parser/SyntaxElement.java,v  <--  SyntaxElement.java
new revision: 1.9; previous revision: 1.8
done
Checking in html/editor/nbproject/project.xml;
/cvs/html/editor/nbproject/project.xml,v  <--  project.xml
new revision: 1.30; previous revision: 1.29
done
Checking in html/editor/src/org/netbeans/modules/editor/html/HTMLKit.java;
/cvs/html/editor/src/org/netbeans/modules/editor/html/HTMLKit.java,v  <--  HTMLKit.java
new revision: 1.34; previous revision: 1.33
done
Comment 3 Tomasz Slota 2007-11-12 09:41:22 UTC
The fix looks OK. Note that the scope of applied changes was quite big and all the editor functionality should be retested throughly before integrating into the 
'release60' branch.
Comment 4 Marek Fukala 2007-11-12 09:46:42 UTC
Some more details about the fix for QE: 

The fix mainly affects the css and javascript embedding creation in html and jsp documents. The main change is that the
new syntax analyzer smoothly analyzes html code which is separated into pieces by some higher level language tokens. For
some testcases see issue #121033 and similar.

Even if the only client of the reimplemented syntax analyzer is the embeeding updater, there may potentialy appear
regressions in html completion and braces matching since some code refactorings were done there, but it is very unlikely.

Comment 5 Marek Fukala 2007-11-12 09:58:02 UTC
Created attachment 52866 [details]
The patch of the fix
Comment 6 Martin Schovanek 2007-11-12 14:19:25 UTC
Verified in trunk by QE.
Comment 7 Marek Fukala 2007-11-12 15:03:20 UTC
fixed in release60 branch 

Checking in html/editor/lib/src/org/netbeans/editor/ext/html/HTMLCompletionQuery.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/HTMLCompletionQuery.java,v  <--  HTMLCompletionQuery.java
new revision: 1.45.2.1; previous revision: 1.45
done
Checking in html/editor/lib/src/org/netbeans/editor/ext/html/HTMLSyntaxSupport.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/HTMLSyntaxSupport.java,v  <--  HTMLSyntaxSupport.java
new revision: 1.39.2.1; previous revision: 1.39
done
Checking in html/editor/lib/src/org/netbeans/editor/ext/html/SyntaxElement.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/SyntaxElement.java,v  <--  SyntaxElement.java
new revision: 1.8.2.1; previous revision: 1.8
done
Checking in html/editor/lib/src/org/netbeans/editor/ext/html/parser/SyntaxElement.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/parser/SyntaxElement.java,v  <--  SyntaxElement.java
new revision: 1.8.2.1; previous revision: 1.8
done
Checking in html/editor/lib/src/org/netbeans/editor/ext/html/parser/SyntaxParser.java;
/cvs/html/editor/lib/src/org/netbeans/editor/ext/html/parser/SyntaxParser.java,v  <--  SyntaxParser.java
new revision: 1.16.2.1; previous revision: 1.16
done
Checking in html/editor/lib/test/unit/src/org/netbeans/editor/ext/html/HTMLSyntaxSupportTest.java;
/cvs/html/editor/lib/test/unit/src/org/netbeans/editor/ext/html/HTMLSyntaxSupportTest.java,v  <-- 
HTMLSyntaxSupportTest.java
new revision: 1.9.2.1; previous revision: 1.9
done
Checking in html/editor/src/org/netbeans/modules/editor/html/HTMLKit.java;
/cvs/html/editor/src/org/netbeans/modules/editor/html/HTMLKit.java,v  <--  HTMLKit.java
new revision: 1.33.2.1; previous revision: 1.33
done
Checking in html/editor/src/org/netbeans/modules/html/editor/coloring/EmbeddingUpdater.java;
/cvs/html/editor/src/org/netbeans/modules/html/editor/coloring/EmbeddingUpdater.java,v  <--  EmbeddingUpdater.java
new revision: 1.17.2.1; previous revision: 1.17
done
Checking in web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JSPKit.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JSPKit.java,v  <--  JSPKit.java
new revision: 1.55.2.1; previous revision: 1.55
done
Comment 8 Jindrich Sedek 2008-04-17 10:22:47 UTC
verified.
NetBeans IDE 6.1 RC2 (Build 200804170002)