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 171580 - Error parsing File red exclamation mark
Summary: Error parsing File red exclamation mark
Status: RESOLVED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 8.2
Hardware: PC Windows 7
: P3 blocker with 1 vote (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-06 22:27 UTC by djohnanderson
Modified: 2017-10-19 22:48 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Macintosh messages.log (32.21 KB, text/plain)
2009-09-06 22:29 UTC, djohnanderson
Details
Windows messages.log (724.16 KB, text/plain)
2009-09-06 22:33 UTC, djohnanderson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description djohnanderson 2009-09-06 22:27:35 UTC
I see a red exclamation mark next to several Java files saying: "Error parsing file". However the file (and project) builds correctly. Sometimes opening a file 
with the exclamation point displays no errors. Other times it displays an error about a missing class, which is correctly referenced. Sometimes just opening 
the file causes the errors to go away. I've verified that the bug occurs on Windows and Macintosh, so it appears to be platform independent. Many other 
people experience the bug:

http://forums.netbeans.org/topic5903-0-asc-0.html

All the proposed fixes I've seen don't reliably fix the problem, e.g. removing the cache.

It's a serious enough problem that our developers won't use NetBeans until a solution is found.

May be related to http://www.netbeans.org/issues/show_bug.cgi?id=168906
Comment 1 djohnanderson 2009-09-06 22:29:51 UTC
Created attachment 87180 [details]
Macintosh messages.log
Comment 2 djohnanderson 2009-09-06 22:33:17 UTC
Created attachment 87181 [details]
Windows messages.log
Comment 3 David Strupl 2009-09-07 10:37:46 UTC
Hello, lot of work has been done in this area since 6.7 release. Any chance to try the latest development build of 6.8
and verify that the problem is still there?
Comment 4 djohnanderson 2009-09-07 19:10:19 UTC
I tried the development build and I'm running into some problems with my project file. I'll continue working on it and let you know the outcome.
Comment 5 djohnanderson 2009-09-10 17:37:45 UTC
I spent some more time looking into this and have concluded that many, if not all, the problems are caused by two different projects sharing the same source 
tree. Since this isn't a supported feature of NetBeans I don't think this is technically a bug.

So, you might ask "Why do you have different projects sharing the same source tree". I'm in the process of converting an existing Mac XCode project to 
NetBeans. The XCode project builds 10 different products out of the same source tree. Rearranging the tree to avoid the NetBeans limitation would break the 
XCode projects, so I was hoping to avoid the tree rearrangement until I concluded that NetBeans would work for our projects.

I am curious to know why the limitation exists since it seems like something that would be useful and not hard to implement.
Comment 6 djohnanderson 2009-09-10 21:11:21 UTC
I finally saw an explanation for the limitation: http://wiki.netbeans.org/FaqSourceRootOverlap

Personally, I sort of like the idea of selecting a project (in the project tab) and seeing the files from the point of view of this particular project. This also avoids 
any ambiguity of which project you're working on when you choose run, build, etc.

So, with this approach you'd have a separate pass of the parser (used to build the code completion index and so on) for each of the source files for each 
project. Only the project you have selected would be kept up to date as you work. When you select a new project in the projects tab it would scan for any 
updates and parse the necessary files. Based upon my tests performance shouldn't be a problem with this approach.
Comment 7 Jesse Glick 2009-09-11 02:45:56 UTC
As designed.

Perhaps what the reporter meant to do, assuming rearranging the tree is not an option for now, is to keep the tree under
one NB project (with a single compile-time classpath); and, if necessary, write some short Ant targets to package
different parts of the output in different JARs. Please use nbusers@netbeans.org for assistance.