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 251097 - Wrong macro value in Full Remote project
Summary: Wrong macro value in Full Remote project
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 8.1
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-11 12:52 UTC by soldatov
Modified: 2016-10-31 11:12 UTC (History)
0 users

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 soldatov 2015-03-11 12:52:59 UTC
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)
Comment 1 Vladimir Kvashin 2015-04-01 10:44:08 UTC
I see exactly the same behavior locally. So it's a code model issue.
I would expect that something sticks in cache?
Comment 2 Vladimir Kvashin 2015-04-01 10:46:14 UTC
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.