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.
Create new Web application replace index.jsp file with this code: ---------------------------- <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>JSP Page</title> <style type="text/css"> <%= "h2" %>{ color:red;| } </style> </head> <body> <h2>Hello World!</h2> </body> </html> ---------------------------------- set cursor at position of "|" type something ... -> nothing is writen
SEVERE [global] java.lang.NullPointerException at org.netbeans.modules.css.gsf.CssCompletion.getAutoQuery(CssCompletion.java:601) at org.netbeans.modules.csl.editor.completion.GsfCompletionProvider.getAutoQueryTypes(GsfCompletionProvider.java:159) at org.netbeans.modules.editor.completion.CompletionImpl.insertUpdate(CompletionImpl.java:305) at org.netbeans.lib.editor.util.swing.PriorityDocumentListenerList.insertUpdate(PriorityDocumentListenerList.java:79) at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185) at org.netbeans.editor.BaseDocument.fireInsertUpdate(BaseDocument.java:1623) at org.netbeans.editor.BaseDocument.insertString(BaseDocument.java:778) at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.insertString(BaseKit.java:1138) at org.netbeans.modules.web.core.syntax.JspKit$JspDefaultKeyTypedAction.insertString(JspKit.java:488) is thrown after each keystroke
It is a bug in lexer and also in css completion. I do not handle the case when returned tokensequence is null, but for the particular case the tokensequence should not be null. I've fixed the css editor part in web-main#3f51dd9f9384, so no exception is thrown and you can type, but the css completion autoopening doesn't work properly due to the lexer issue. I've filed a new P2 issue #177501 (Cannot get embedded tokensequence from embedded tokensequence, at least under some circumstances) against lexer for the problem.
Jindro, please verify. Milo, can you please do a code review of the change? Thanks.
verified NetBeans IDE Dev (Build web-main-2162-on-091124) please merge into 6.8 branch
I approve the fix.
fixed in release68#2bd61fe9a591
Verified by QE at the release68 branch.
Integrated into 'main-golden', will be available in build *200911251400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/3f51dd9f9384 User: Marek Fukala <mfukala@netbeans.org> Log: #177497 - it's not possible to type in CSS code embedded in JSP