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 32882 - Source editor does not clear red underline after successful compilation when other file fixed
Summary: Source editor does not clear red underline after successful compilation when ...
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: All All
: P2 blocker with 6 votes (vote)
Assignee: Jan Becicka
URL:
Keywords:
: 28327 40673 41103 51792 53418 56828 58320 58351 58994 59293 61731 (view as bug list)
Depends on:
Blocks: 71437
  Show dependency tree
 
Reported: 2003-04-15 00:25 UTC by ssffleming
Modified: 2007-09-26 09:14 UTC (History)
7 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 ssffleming 2003-04-15 00:25:16 UTC
Not sure how common this bug is, so starting out as P3.
Please evaluate carefully to decide if this is a big 
regression that should be fixed or a special case that
can perhaps be waived.

Steps to reproduce.
1.  Compile a java source "A" file cleanly
2.  Add a method referencing another java source "B" file 
method but with an incorrect argument type
(red underline is correctly shown)
3.  Compile "A"...it fails
4.  Change the type in source file "B" to match the code
in "A"
5.  Recompile "A"
You see it compiles ok, but red underline remains.
Comment 1 ehucka 2003-04-15 11:40:30 UTC
It seems sources in editor are reparsed only after they are changed.

Question for developers:
It is possible to reparse all opened java sources after each of them
is changed or to reparse only sources dependent on changed source?
And what about performance?
Comment 2 ssffleming 2003-04-15 17:45:33 UTC
One performance optimization would be to only reparse files that are visible or
made visible such as by clicking on their tab.  Opened files that are not visible
would not have to be reparsed.
Comment 3 Miloslav Metelka 2003-04-16 13:28:38 UTC
IMHO it never worked as required in the issue but we need to find a
way how to fix it in 4.0.
Comment 4 ssffleming 2003-04-16 18:13:14 UTC
I've updated the summary a little based on the evaluations of other folks.
Probably will let Netbeans QA folks take over for me going forward.  Thanks all.
Comment 5 Jan Pokorsky 2004-03-18 17:01:06 UTC
*** Issue 41103 has been marked as a duplicate of this issue. ***
Comment 6 Martin Matula 2004-07-27 15:27:12 UTC
*** Issue 28327 has been marked as a duplicate of this issue. ***
Comment 7 ssffleming 2004-10-19 22:55:23 UTC
problem is still there in Netbeans 4 beta 2
Comment 8 Martin Roskanin 2005-01-18 13:42:34 UTC
*** Issue 53418 has been marked as a duplicate of this issue. ***
Comment 9 Jan Becicka 2005-01-28 09:42:53 UTC
*** Issue 51792 has been marked as a duplicate of this issue. ***
Comment 10 Jan Becicka 2005-01-28 09:46:32 UTC
*** Issue 40673 has been marked as a duplicate of this issue. ***
Comment 11 Martin Matula 2005-03-23 14:52:11 UTC
*** Issue 56828 has been marked as a duplicate of this issue. ***
Comment 12 Milan Kubec 2005-04-27 08:58:24 UTC
*** Issue 58351 has been marked as a duplicate of this issue. ***
Comment 13 Milan Kubec 2005-04-27 09:03:08 UTC
Increasing priority, since it has 7 duplicates, 14 votes collected by those
duplicates, it's really annoying and it's bad that developer cannot rely on
information in editor. Also changing TM which was 4.1.
Comment 14 Roman Strobl 2005-05-03 17:37:15 UTC
*** Issue 58351 has been marked as a duplicate of this issue. ***
Comment 15 Martin Matula 2005-05-04 13:36:46 UTC
We fixed a few related issues for 4.1 - were not able to read secondary files
(the files that the file you are editing depends on) from editor - they were
always read from the disk.
We already know how we will fix this issue (and are going to fix it for 4.2), it
is just to late for 4.1 to do this, since it could have some performance
implications - it would need to be properly evaluated by the performance team.
And from the implementation point of view it is more like a new feature rather
than just a simple bug fix - too risky at this point. We are weeks after the
code freeze. This issue was escallated to P2 just recently.
Comment 16 Martin Matula 2005-05-04 13:38:34 UTC
*** Issue 58320 has been marked as a duplicate of this issue. ***
Comment 17 Roman Strobl 2005-05-05 17:48:39 UTC
I agree with Martin from QA's point of view. It is better to have a good fix in
4.2 than to try to do a hot fix for 4.1 which would introduce performance
problems. This is rather a design issue which was in NetBeans for a long time.
The previous releases were released with this issue so I believe we can do so
for the last time with 4.1 - provided that the fix will be applied in 4.2. As
Martin pointed out, the fix is already prepared, only performance-related issues
need to be solved. CCing Milan if he has additional comments.
Comment 18 Martin Matula 2005-05-17 15:52:02 UTC
*** Issue 58994 has been marked as a duplicate of this issue. ***
Comment 19 Milan Kubec 2005-05-23 10:36:34 UTC
Red error annotations are not removed also when adding something on classpath
that fixes the error, e.g. jar file.
Comment 20 Milan Kubec 2005-05-26 14:13:46 UTC
*** Issue 59293 has been marked as a duplicate of this issue. ***
Comment 21 ssffleming 2005-05-26 22:35:18 UTC
marking this as a bug Creator would like fixed
Comment 22 Jan Becicka 2005-07-19 14:31:57 UTC
Checking in JavaEditor.java;
/cvs/java/src/org/netbeans/modules/java/JavaEditor.java,v  <--  JavaEditor.java
new revision: 1.195; previous revision: 1.194
done
Comment 23 John Baker 2005-08-22 22:54:26 UTC
Did the fix go into 4.1 or 4.2 ?

If it went into 4.2, any chance fix can be applied to 4.1 ?
Comment 24 Jan Becicka 2005-08-23 08:44:50 UTC
Target milestone is 4.2.
Comment 25 Jan Becicka 2005-08-25 09:37:53 UTC
*** Issue 61731 has been marked as a duplicate of this issue. ***
Comment 26 John Baker 2005-08-26 18:29:42 UTC
OK, thanks, can this fix be back ported to 4.1 ?
Comment 27 _ potingwu 2005-09-01 20:41:03 UTC
> comments from jbecicka
> 
> Checking in JavaEditor.java;
> /cvs/java/src/org/netbeans/modules/java/JavaEditor.java,v  <--  JavaEditor.java
> new revision: 1.195; previous revision: 1.194
> done

I have applied this fix to Creator, but the bug doesn't fix. The issue remains.
Are there extra codes fix not recorded here?
Comment 28 Jan Becicka 2005-09-02 06:05:42 UTC
This fix just do reparse of content of JavaEditor, when it gets focus.

I can see from CVS log, that this code was modified later by this commit:
Checking in
javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ResourceImpl.java,v
 <--  
ResourceImpl.java
new revision: 1.90; previous revision: 1.89
done
Checking in src/org/netbeans/modules/java/JavaEditor.java;
/cvs/java/src/org/netbeans/modules/java/JavaEditor.java,v  <--  JavaEditor.java
new revision: 1.198; previous revision: 1.197
done
Checking in src/org/netbeans/modules/java/JavaParserGlue.java;
/cvs/java/src/org/netbeans/modules/java/JavaParserGlue.java,v  <-- 
JavaParserGlue.java
new revision: 1.56; previous revision: 1.55
done

Anyway it should work.
Comment 29 Milan Kubec 2006-01-16 12:49:27 UTC
Verified in release50-rc1, but filed new issue with hints, see #71437.
Comment 30 Milan Kubec 2006-01-16 12:49:56 UTC
V