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.

Bug 50948 - [40cat] CC doesn't work for the web application package class
Summary: [40cat] CC doesn't work for the web application package class
Status: CLOSED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Petr Pisl
URL:
Keywords: REGRESSION
: 50949 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-28 13:15 UTC by cezariusz
Modified: 2006-03-24 09:42 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cezariusz 2004-10-28 13:15:05 UTC
Build 20041027800, JDK 5.0

Steps to reproduce:
1. Create new web application, say JSPCC;
2. Create new class CCTest in package demo.issue;
3. Open index.jsp
4. Add line:
<%@page import="demo.issue.CCTest"%> 
5. Write:
<%
    CCT|
6. Press Ctrl+Space

Expected result: CC window with CCTest or 
completed class name.
Actual result: empty CC window titled CCT*
Comment 1 cezariusz 2004-10-28 13:16:18 UTC
I believe it used to work in erlier builds.
Comment 2 Petr Pisl 2004-10-28 14:48:52 UTC
This is the same issue as issue #50949. The reason is the same - the
cc doesn't know about the demo.issue.* package in a java scriptlet.

 When you write <% demo.issue.| %> the cc offers nothing even though
it works in page declaration.

Martin Roskanin, do you know why the java code completion doesn't
offer here anything?
Comment 3 Petr Pisl 2004-10-28 14:49:46 UTC
*** Issue 50949 has been marked as a duplicate of this issue. ***
Comment 4 cezariusz 2004-10-28 20:30:05 UTC
Am I missing something? If cc doesn't know about the package, why 
after changing
<%@page import="demo.issue.*"%>
to
<%@page import="demo.issue.CCTest"%>
it works in
<%
    CCTest test = new CCTest();
    test.|
Comment 5 Martin Roskanin 2004-10-29 08:37:56 UTC
The problem is already mentioned in issue #30312
For now, I am not sure where the problem is.
Making duplicate.

*** This issue has been marked as a duplicate of 30312 ***
Comment 6 Petr Pisl 2004-10-29 09:40:59 UTC
You are right, the cc works well in import statement, but when you
write my.package.| in scriptlet, then the cc doesn't konw about
classes in the package. On other hand the cc know exact class from
this package. So I think, that problem is that when the CC ask for all
classes from a package nothing is returned.
Comment 7 Petr Pisl 2004-10-29 17:56:27 UTC
I have to reopen this issue. The fix, which was committed today, will
not work for freeform projects. 

I have new fix, which will work in this case as well. But because I
had to change the ClasspathProvider in web project, the fix is a
little risk. 


So before commit I will give the fix our QA (Martin Schovanek) for
testing.

Comment 8 Jiri Kovalsky 2004-11-08 13:06:53 UTC
This bug was reported in NetCAT program too.
Comment 9 Petr Pisl 2004-11-08 13:21:38 UTC
Fixed in the trunk
Comment 10 Petr Pisl 2004-11-08 13:34:56 UTC
Checking in
project/src/org/netbeans/modules/web/project/classpath/ClassPathProviderImpl.java;
/cvs/web/project/src/org/netbeans/modules/web/project/classpath/ClassPathProviderImpl.java,v
 <--  ClassPathProviderImpl.java
new revision: 1.10; previous revision: 1.9

Checking in
project/src/org/netbeans/modules/web/project/classpath/JspClassPathImplementation.java;
/cvs/web/project/src/org/netbeans/modules/web/project/classpath/JspClassPathImplementation.java,v
 <--  JspClassPathImplementation.java
initial revision: 1.1

Checking in
jspsyntax/src/org/netbeans/modules/web/core/syntax/JspJavaSyntaxSupport.java;
/cvs/web/jspsyntax/src/org/netbeans/modules/web/core/syntax/JspJavaSyntaxSupport.java,v
 <--  JspJavaSyntaxSupport.java
new revision: 1.16; previous revision: 1.15

Checking in jspsyntax/build.xml;
/cvs/web/jspsyntax/build.xml,v  <--  build.xml
new revision: 1.40; previous revision: 1.39

Checking in jspsyntax/nbproject/project.xml;
/cvs/web/jspsyntax/nbproject/project.xml,v  <--  project.xml
new revision: 1.5; previous revision: 1.4
Comment 11 cezariusz 2004-11-08 15:29:10 UTC
Did you notice, that javadoc is also broken for such classes?
Comment 12 zikmund 2004-11-08 15:35:24 UTC
The fix fixes also JavaDoc problem of such classes. I've tested it in
custom build.
Comment 13 cezariusz 2004-11-08 15:50:27 UTC
Thanks for the information zikmund as I was just about to prepare a 
test case for javadoc problems (it shows for methods derived from 
Object, but doesn't for the class itself).

I'm waiting for the next daily to verify that. By the way I really 
miss last daily builds, I got used to read changelog during morning 
cofee. I had to read newspapers instead for the last week ;)
Comment 14 Pavel Buzek 2004-11-08 20:40:34 UTC
The fix looks ok. 
I think the code in JspClassPathImplementation in private List
getPath() is a more complicated then it needs to be (neither doc base
nor src will be a list of archive entries) but it is not a problem.
Comment 15 Martin Schovanek 2004-11-10 09:45:08 UTC
I've tested it in #200411091800 build, the CC problem looks fixed but
the javadoc is still broken.
Comment 16 Martin Schovanek 2004-11-10 10:25:44 UTC
Sorry, the fix is not in the #200411091800 build. In #200411091900
(trunk build) CC and javadoc work fine.
Comment 17 Petr Pisl 2004-11-10 15:24:13 UTC
The commit was done in the release40 branch as well.
Comment 18 Jiri Kovalsky 2005-01-17 14:23:10 UTC
I am verifying that both problems are fixed in development build
#200501161900 of NetBeans 4.1.