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 Create some public class in some package in the project use this code in index.jsp and at position of "|" invoke cc: <%@page import="|" %> the package you have just created is not on the list - just java packages appears while adding some jar on classpath, I can't see such packages on the list neither.
regression against 6.5.1 -> would be good to provide a fix in patch for 6.7
There is some major mess in here that was overlooked during migration to CSL : - the JavaCompletionProvider fails to provide completion results for the "page import", "jsp:useBean", etc. because of wrong implementation of the org.netbeans.modules.editor.java.Utilities.isJavaContext() method. The method is based on token ids and some black magic, it ignores the embedding info - the completion items that appear in the list are created by JavaJspCompletionProvider. This is a zombie class that should be removed after migration to CSL. JavaJspCompletionProvider creates a virtual java file in the memory filesystem. That file does not belong to the project and thus the new infrastructure is not able to resolve the correct classpath. I am reassigning to Dusan for the first step of the fix: changing Utilities.isJavaContext() to use embedding info
Dusane, would you be able to do your part soon, so we can consider this for patch 1? Thanks.
Utilities.isJavaContext() is used to quickly filter out code completion invocations on offsets that are not in Java "context" (e.g. invocations on offsets within string literals, comments, etc.). It is based on lexer tokens because it is fast. It's cheaper to find out a (possibly embedded) java token sequence on the given offset than to parse whole file and find out an embedding info using the Parsing API. My question is: Is it possible to create an embedded java token(s) inside a JSP token representing "" in <%@page import="|" %> ? BTW: I have tried to comment out the call to Utilities.isJavaContext() and it seems that there is no embedded JavaParserResult on the given offset anyway.
"Is it possible to create an embedded java token(s) inside a JSP token representing "" in <%@page import="|" %> ?" Yes, I can create the java embedding lazily for the whole value including the quotations with start/endSkipLen == 1 or possibly w/o the skip lenghts if neecessary.
*** Issue 161358 has been marked as a duplicate of this issue. ***
fixed for page/tag import, but still valid for jsp:useBean, page extends, variable variable-class and type attributes. http://hg.netbeans.org/web-main/rev/542816917d3d
Integrated into 'main-golden', will be available in build *200908311509* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/542816917d3d User: Tomasz Slota <tslota@netbeans.org> Log: #167459: only java packages are offered by cc in @page import directive
Integrated into 'main-golden', will be available in build *200909032054* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/e8eb7ccac070 User: Tomasz Slota <tslota@netbeans.org> Log: #167459: only java packages are offered by cc in @page import directive - jsp:useBean
fixed for 'page import'. http://hg.netbeans.org/web-main/rev/87b768e919ac The remaining use cases will be tracked separately as a P3 issue 172886.
Integrated into 'main-golden', will be available in build *200909241442* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/87b768e919ac User: Tomasz Slota <tslota@netbeans.org> Log: #167459: only java packages are offered by cc in @page import directive
v. NetBeans IDE 6.8 Beta (Build 200910192001)
*** Bug 166389 has been marked as a duplicate of this bug. ***