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.
create C++ application with code like: int main(int argc, char** argv) { int j = 0; int i = 0; #if 0 commented out code which must be always disabled #endif return 0; } go in vi and move #if 0 2 lines up to be: #if 0 int main(int argc, char** argv) { int j = 0; int i = 0; //#if 0 commented out code which must be always disabled //#endif return 0; } #endif return to IDE and see unresolved identifiers i and j (they are not in grayed out block) see attachement -J-Dcnd.modelimpl.trace.external.changes=true shows that we receive external modification and in fact file was reparsed correctly, because no more main function in navigator External updates: fileChanged BaseFileObj$FileEventImpl[file=/home/vv159170/NetBeansProjects/CppApplication_6/main.cpp,time=Fri May 07 19:51:26 MSD 2010,expected=false] External updates: scheduling update for MasterFileObject[/home/vv159170/NetBeansProjects/CppApplication_6/main.cpp@1a850c5:1cf4467,valid=true] External updates: running update task Updating for MasterFileObject[/home/vv159170/NetBeansProjects/CppApplication_6/main.cpp@1a850c5:1cf4467,valid=true] === Starting parser queue stopwatch CppApplication_6 External updates: update task finished parsing /home/vv159170/NetBeansProjects/CppApplication_6/main.cpp 55 ms === Stopping parser queue stopwatch CppApplication_6: 8688 ms Slowest Files for CppApplication_6 are: file=/home/vv159170/NetBeansProjects/CppApplication_6/main.cpp 368 ms
Created attachment 98642 [details] broken dead code information after external modifications The same happens if I close IDE, modify file as described, reopen IDE => file is reparsed, but dead code block is on the old place
fixed: http://hg.netbeans.org/cnd-main/rev/bb0fe52c2563
test: http://hg.netbeans.org/cnd-main/rev/650793ed79c1
Integrated into 'main-golden', will be available in build *201005101712* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ User: Log: