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 253856 - [newcodemodel] regressions on Code Assistance in unsaved files
Summary: [newcodemodel] regressions on Code Assistance in unsaved files
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 8.1
Hardware: All All
: P2 normal (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-27 11:48 UTC by soldatov
Modified: 2015-07-31 14:35 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-07-27 11:48:06 UTC
In NetBeans 8.1 I see regressions in header files if I modify source file

Scenario 1:
- Code
#include <cstdio>

int main(int argc, char** argv) {

    return 0;
}

- Modify file
- Press Ctrl-B on <cstdio>
==> "Can not open element "<cstdio>".' message appeared

Workaround: save file
Comment 1 soldatov 2015-07-27 11:57:25 UTC
main.cpp:
===============================
#include "newfile.h"

int main(int argc, char** argv) {

    return 0;
}
===============================

newfile.h:
===============================
#ifndef NEWFILE_H
#define	NEWFILE_H

int foo();
#define AAA 11

#endif	/* NEWFILE_H */
===============================

Scenario 2:
- Check full Code Completion list in main()
==> I see AAA
- Add space into file
- Check full Code Completion list again
==> AAA doesn't appear
Comment 2 soldatov 2015-07-28 12:17:11 UTC
Scenario 3:
- Create Freeway project
- Open FreewayWindow.cc file
- Add 1-2 spaces into code
- Wait 3 seconds
==> All macros are highlighted as a unresolved identifiers

Workaround: save file
Comment 3 Vladimir Voskresensky 2015-07-29 22:49:50 UTC
the other problem during modification of file:
- all #defines and #includes do disappear in navigator as well
Comment 4 Vladimir Voskresensky 2015-07-29 23:48:42 UTC
http://hg.netbeans.org/cnd-main/rev/75e65cb5f745
Comment 5 Quality Engineering 2015-07-31 01:51:53 UTC
Integrated into 'main-silver', will be available in build *201507310002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/75e65cb5f745
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: fixed #253856 - [newcodemodel] regressions on Code Assistance in unsaved files
- when getTS invoked from ensureParsed then file's pp elements have to be created
Comment 6 soldatov 2015-07-31 13:28:17 UTC
All 3 scenarios has been fixed in NetBeans trunk. Thank you.
Comment 7 Vladimir Kvashin 2015-07-31 14:32:35 UTC
I reviewed the fix and state that it is simple, correct and safe.
Comment 8 Vladimir Kvashin 2015-07-31 14:34:17 UTC
I've just transplanted the fix into release81_beta branch:
http://hg.netbeans.org/releases/rev/a7c041b8e509