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.
Build: NetBeans IDE Dev (Build 090417) VM: Java HotSpot(TM) 64-Bit Server VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04 OS: Linux, 2.6.27.21-170.2.56.fc10.x86_64, amd64 User Comments: jsedek: use this code in HTML editor: ---------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <table style=" font-size: 12pt; font-weight: bold; border: 1pt;|" title="TITULEK" rules="groups"> <tr><td></td></tr> </table> </body> </html> ---------------------------- press Enter at position of "|" -> ISE is thrown invoke reformat -> embedded css style is not formatted correctly blakenzoe: I was copying/pasting HTML into a PHP page. One of the <style></style> tags had an unclosed HTML comment. As soon as I pasted that HTML into the page and then clicked to the left of the unclosed HTML comment, the error was thrown: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> 6 <title>My Title</title> 7 <style type="text/css"> 8 <!-- 9 /* Do not copy script in this block for testing only */ 10 body { 11 line-height: 1.5em; 12 font-family: arial,Verdana; 13 font-size: 0.8em; 14 background: #ccc; 15 } 16 17 --> 18 </style> 19 20 <style type="text/css"> 21 <!-- 22 </style> 23 </head> 24 <body> Note the HTML page as a whole is not well formed at this point. I placed the cursor on line 21, column 1; an instant later the error was throw Stacktrace: java.lang.IllegalStateException: token position was no initialized. call moveStart or something at org.netbeans.modules.css.formatting.api.embedding.JoinedTokenSequence.checkCurrentTokenSequence(JoinedTokenSequence.java:53) at org.netbeans.modules.css.formatting.api.embedding.JoinedTokenSequence.moveNext(JoinedTokenSequence.java:126) at org.netbeans.modules.css.editor.CssIndenter.getFormatStableStart(CssIndenter.java:110) at org.netbeans.modules.css.formatting.api.support.AbstractIndenter.calculateIndentation(AbstractIndenter.java:302) at org.netbeans.modules.css.formatting.api.support.AbstractIndenter.reindent(AbstractIndenter.java:197) at org.netbeans.modules.css.editor.indent.CssIndentTask.reindent(CssIndentTask.java:52)
Created attachment 80359 [details] stacktrace
I'm facing this problem in simple style embedded in HTML use this code and press Enter at position of "|" ->ISE ------------ <style>|</style> ------------ -> should be fixed in beta -> P1
IllegalStateException fixed as e34e7dffb7b8. I'm waiting for team repo to open to integrate. The problem was introduced by changeset: 124883:d95f8778028d user: David Konecny <dkonecny@netbeans.org> date: Tue Apr 07 14:22:00 2009 +1200 summary: #160089 - CSS medias are not reformatted correctly which moved searching start point of stable formatting from beginning of formattable offset to end formattable offset. Which is correct but previously search would start at <style></style> ^ but now it starts at <style></style> ^ and CSS indenter cannot assume end formattable offset is within its language but must update position backwards until it find its language. The fix is trivial. Please review. Incorrect embedded CSS formatting mentioned in this report is filed now as separate P3 issue 163055.
Forgot to mark as FIXED.
Fix pushed to web-main repo.
verified in web-main build please transplant the fix into beta clone
Integrated into 'main-golden', will be available in build *200904201507* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/e34e7dffb7b8 User: David Konecny <dkonecny@netbeans.org> Log: #162945 - token position was not initialized properly
Transplanted to beta as def4ce000731.
verified in beta NetBeans IDE 6.7 Beta (Build 090422)