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.
Hey, how come jspx editor does not offer code-completion pop-up on jspx files? I am editing the following jspx getBrowserCookie.jsp on nb5.5 20060926. Try pressing [ctrl-space] at anywhere you expect the jsp editor to pop up code- completion and there would be no response. Is this a bug or (absence of) feature? It is a rather crucial feature when I need to produce precise xml documents without having to manage extraneous spaces and line-feeds. Currently I would have to create a similar jsp to debug it and then mnually transform the jsp to a jspx. <?xml version="1.0" encoding="UTF-8"?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"> <jsp:directive.page import="java.util.Enumeration"/> <jsp:directive.page contentType="text/xml;charset=UTF-8"/> <jsp:element name="cookie"> <jsp:body> <jsp:scriptlet> Enumeration headers = request.getHeaderNames(); if (headers != null) { while (headers.hasMoreElements()) { String h = (String)headers.nextElement(); if (h.equalsIgnoreCase("Cookie")) { out.println(request.getHeader(h)); break; } } } </jsp:scriptlet> </jsp:body> </jsp:element> </jsp:root>
However, the only place that code completion pop-up appears is at this line: <jsp:directive.page import="java.util.Enumeration"/> Since it could recognise jsp directive import, I am thinking it should scarcely be a problem for jspx editor to drill down to scriplet tags to apply jsp code editor environment to a scriptlet body.
jspx jsp:expression tag too. <jsp:element name="device"> <jsp:body> <session><jsp:expression>session.getId() </jsp:expression></session> </jsp:body> </jsp:element>
Sorry for the nag ... but I also notice there is no html/forms component palette when editing a jspx.
I belive I can fix this issue by: 1) listening on Schlieman parser on top JSPs (Schlieman parser already runs to get navigator, folds, ...) and creating java embedding dynamically in the proper JSP tags (jsp:scriptlet, declaration, ...) 2) Fixing the fake virtual JSP-servlet class provider not to use JspTokenId.SCRIPTLET/DECLARATION/EXPRESSION rather than exploring the tokens for embedded java I'll try to do that in 6.0
done some preparation tasks - java code embeddings are now created in <jsp:scriptlet/declaration/expression> tags, thought the code completion doesn't work (requires changes in the fake jsp servlet generator) and coloring also seems to be broken (I need to discuss this with Vita Stejskal). Checking in JspColoringUpdater.java; /cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JspColoringUpdater.java,v <-- JspColoringUpdater.java initial revision: 1.1 done Checking in JSPKit.java; /cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JSPKit.java,v <-- JSPKit.java new revision: 1.44; previous revision: 1.43 done Checking in JSP.java; /cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JSP.java,v <-- JSP.java new revision: 1.9; previous revision: 1.8 done
*** This issue has been marked as a duplicate of 46000 ***