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 121766 - Failed include looks valid after reopening source file
Summary: Failed include looks valid after reopening source file
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-12 20:40 UTC by alexandrov
Modified: 2007-11-19 14:02 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch to code model utils (1.62 KB, text/plain)
2007-11-14 17:19 UTC, Alexander Simon
Details
patch for highliting (2.78 KB, patch)
2007-11-14 17:20 UTC, Alexander Simon
Details | Diff
patch to release60 (1.66 KB, patch)
2007-11-15 10:55 UTC, Alexander Simon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description alexandrov 2007-11-12 20:40:46 UTC
Open any source or header file, add any invalid include there. Save file. In source editor this include will be
underlined by red-wave line with hint "Can not find include file ...".  Close and open this file in source editor - the
error will not be underlined... 
Double switch of "Code Assistance" helps to mark this error again
Comment 1 Alexander Simon 2007-11-14 17:19:29 UTC
Created attachment 52989 [details]
patch to code model utils
Comment 2 Alexander Simon 2007-11-14 17:20:29 UTC
Created attachment 52990 [details]
patch for highliting
Comment 3 Alexander Simon 2007-11-15 10:55:48 UTC
Created attachment 53031 [details]
patch to release60
Comment 4 Alexander Simon 2007-11-15 11:00:16 UTC
fixed in trunk (see last patch only)

CVS log:

Checking in HighlightProvider.java;
/shared/data/ccvs/repository/cnd/highlight/src/org/netbeans/modules/cnd/highlight/error/HighlightProvider.java,v  <-- 
HighlightProvider.java
new revision: 1.7; previous revision: 1.6
done
Comment 5 Vladimir Kvashin 2007-11-15 13:14:11 UTC
I reviewed the fix.
It's correct and quite safe.
Comment 6 Vladimir Kvashin 2007-11-15 13:49:36 UTC
Just a clarification (since there were 2 different fixes attached):
the above concerns the most recent fix 
(http://www.netbeans.org/nonav/issues/showattachment.cgi/53031/121766.patch).
It is identical to the one that is committed into the trunk.
Comment 7 Jesse Grodnik 2007-11-15 15:44:39 UTC
Following HR process ...
Comment 8 Vladimir Kvashin 2007-11-15 16:23:48 UTC
Comments to the patch:
While going through the list of components (the list is returned by EditorRegistry.componentList()), we should check
whether the component is still visible (isShowing() returns true). There were no such check - this led to the error. The
fix adds this check.


Comment 9 Alexander Pepin 2007-11-16 13:16:23 UTC
verified in trunk build 20071116
Comment 10 Vladimir Kvashin 2007-11-16 22:58:59 UTC
Committed into release60:

Checking in HighlightProvider.java;
/shared/data/ccvs/repository/cnd/highlight/src/org/netbeans/modules/cnd/highlight/error/HighlightProvider.java,v  <-- 
HighlightProvider.java
new revision: 1.6.2.1; previous revision: 1.6
done
Comment 11 Alexander Pepin 2007-11-19 14:02:43 UTC
verified in RC2 candidate build