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.
newfile.h: ====================================================================== #ifndef NEWFILE_H #define NEWFILE_H #if AA == 0 #define BB 111 #else #define BB 222 #endif #endif /* NEWFILE_H */ ====================================================================== main.cpp: ====================================================================== #define AA 0 #include <cstdio> #include "newfile.h" int main(int argc, char** argv) { printf("%d\n", BB); return 0; } ====================================================================== Scenario: - Open Full Remote project with newfile.h and main.cpp - Reparse project - Open main.cpp file - Press Ctrl+Alt and move cursor on BB ==> "BB expands to: 111" tooltip appears (ok) - Replace "#define AA 0" on "#define AA 1" - Save file - Press Ctrl+Alt and move cursor on BB ==> "BB expands to: 222" tooltip appears (ok) - Open newfile.h file <-- important step - Wait 3 seconds - Select main.cpp file again - Replace "#define AA 1" on "#define AA 0" - Save file - Press Ctrl+Alt and move cursor on BB ==> "BB expands to: 222" tooltip appears (wrong value)
I see exactly the same behavior locally. So it's a code model issue. I would expect that something sticks in cache?
In both local and remote, once I switch to header.h and then back to main.cpp, macro expansion in tooltip in main.cpp stops reacting on changes in main.cpp. This does not depend on whether main.cpp is saved or not.