Bug 190200 - Netbean Library Source Code Compile Error
Netbean Library Source Code Compile Error
Product: java
Classification: Unclassified
Component: Compiler
PC Windows 7
: P4 (vote)
Assigned To: Dusan Balek
Depends on:
  Show dependency treegraph
Reported: 2010-09-07 02:02 UTC by charles_zhw
Modified: 2014-04-01 22:57 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT

library jar's source file compile error (168.34 KB, image/png)
2010-09-15 02:47 UTC, charles_zhw

Note You need to log in before you can comment on or make changes to this bug.
Description charles_zhw 2010-09-07 02:02:41 UTC
This issue exist all version of Netbeans release. While we want to check library's source code from netbeans it look like netbeans wouldn't know instance or method inherit from father class. The example is that when I want to debug Spring framework's source code there are many compile error exist Spring's source code. Maybe this is happen because library's source code file is more than one.
   By the way, I don't think IDE should tell user any compile error while we open any library's source code because this behavior would confuse netbeans's user. At this point netbeans would reference Eclipse's similar behavior because Eclipse just display source code but we don't get any compile erroe. I don't how Eclipse make it happen, maybe Eclipse just load library's class instead of compile source code. Any way please discuss this issue. Thanks!
Comment 1 Martin Entlicher 2010-09-07 11:40:53 UTC
Debugger can not do anything with compile errors.
Comment 2 David Strupl 2010-09-08 13:42:30 UTC
I am marking this issue as incomplete. It is incomprehensible for me - if anyone can make anything from the description please try to explain otherwise please leave it as resolved. Thanks.
Comment 3 charles_zhw 2010-09-15 02:47:19 UTC
Created attachment 102021 [details]
library jar's source file compile error
Comment 4 charles_zhw 2010-09-15 03:01:46 UTC
Sorry for my unclear description.My point is as following:
1. We don't want to see any compile error while we check it out any library jar's source file in IDE. Because compile error message would confuse IDE's user.
2. Because library jar's source file's compile issue, debug behavior look a little strange. Because debug thread have been suspend by the line which have compile error. If we want debug to into method call which is make as compile error we have to click Continue button(F5). But it don't make sense. As we know if we want to into one method we would click Setp Into button(F7).I have try netbeans 6.8 to reproduce this issue but netbeans 6.8 could setp into one method while we click Setp Into button(F7) even if this line code have compile error.Please find the picture from attached file and take a look about line 103. This is a source code about Spring framework 3.03 version(SimpleUrlHandlerMapping class).
3. Why IDE don't know SimpleUrlHandlerMapping's super.initApplicationContext() method which inherit from AbstractUrlHandlerMapping class while we check it out library jar's source file. This behavior is still confuse me. As we konw throuth compile IDE would know one class's method or instance variable even if this method or instance variable is inherit from father class. From attached file we would understand that SimpleUrlHandlerMapping class neither know super.initApplicationContext() method nor know logger instance variable even if both of them is exist their father class.
Comment 5 David Strupl 2012-10-25 13:41:55 UTC
Bug prior to 7.0, not touched for the last 2 years --> P4.
Comment 6 apjanke 2014-04-01 22:57:30 UTC
I'm running in to this problem or a similar one in NetBeans 7.4. I'm writing a small Java project that uses Apache Axis2. I've defined an Axis2 library that has all of the Axis2 JARs on its classpath (including its dependencies), and has the source files for Axis2 (but not its dependencies) in the library definition. When I am viewing source files from the Axis2 library, the editor shows a lot of compile errors due to unresolved symbols.

Some symbols get resolved; it looks like the ones for which I have source files included in the library get resolved, but the ones that are only in the binary JAR files do not get resolved.

This is a minor usability issue. The false-positive errors were a little bewildering but not a problem when I figured out what was going on. Still an annoyance, because it does mask symbols which really aren't resolved in this classpath context, which I think may be an issue with Axis2 here because of its fancy run-time loading of module files. But with the false-positive compiler errors, I can't really tell.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo