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.
If text in block comments are in multiple lines because of line breaks, xml lexer treats them as different tokens, one for each line. As per code comments, this was done as a result of a very old issue 39446. An example: <!-- This is a block comment --> It creates three block-comment tokens 1)for "<!--" 2) for "/nThis is a block comment" 3) for "/n-->" Here is the developer's comment in XMLLexer.java. ------------------------------------------------ //create an XML comment token for each line of the comment - a workaround fix for performance bug #39446 //this also causes a SyntaxtElement to be created for each line of the comment - see XMLSyntaxSupport.createElement:277 //PENDING - this code can be removed after editor solve it somehow in their code ------------------------------------------------
I removed the hack and verified by adding comments to huge schemas like OTA and another xml document. I could no longer produce issue 39446. Perhaps with the introduction of lexer and other editor changes, issue 39446 seems to be fixed. So I'm going to revert this change in lexer.
Fix integrated: http://hg.netbeans.org/main/rev/76756e31ccfd.
Integrated into 'main-golden', will be available in build *200901230201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/76756e31ccfd User: samaresh@netbeans.org Log: #157158 : xml lexer creates multiple block comment tokens if separated by line breaks.