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.
I have new project with existing code (based on Makefile) with manually set C++11. Every time I open it and look on files I see that it treat all files as C++98. After reparse every thing going back to normal. btw after that I need reopen files because keyword coloring isn't updated too.
I think you problem described in issue 253681
please, confirm that reopening file fixes the coloring *** This bug has been marked as a duplicate of bug 253681 ***
Created attachment 157112 [details] Test cases represents bug After crating project based on this Makefile and reopening it I can't use C++11 support in IDE.
(In reply to Vladimir Voskresensky from comment #2) > please, confirm that reopening file fixes the coloring > > *** This bug has been marked as a duplicate of bug 253681 *** This don't work, I added test cases in previous message. Steps -> Create project with existing sources based on Makefile. Set C++11 in project options. Every thing work fine. Close IDE and reopen it. Project stick to C++98 syntax and is impossible switch to C++11 (even it still set in project settings). Reparsing, reopening don't work. After some random moves sometimes it will switch back to C++11, but I can't reproduce it.
(In reply to Yankes from comment #4) > (In reply to Vladimir Voskresensky from comment #2) > > please, confirm that reopening file fixes the coloring > > > > *** This bug has been marked as a duplicate of bug 253681 *** > > This don't work, I added test cases in previous message. > > Steps -> > > Create project with existing sources based on Makefile. > Set C++11 in project options. Every thing work fine. > Close IDE and reopen it. > Project stick to C++98 syntax and is impossible switch to C++11 (even it > still set in project settings). > Reparsing, reopening don't work. > > After some random moves sometimes it will switch back to C++11, but I can't > reproduce it. (In reply to Yankes from comment #4) > (In reply to Vladimir Voskresensky from comment #2) > > please, confirm that reopening file fixes the coloring > > > > *** This bug has been marked as a duplicate of bug 253681 *** > > This don't work, I added test cases in previous message. > > Steps -> > > Create project with existing sources based on Makefile. > Set C++11 in project options. Every thing work fine. > Close IDE and reopen it. > Project stick to C++98 syntax and is impossible switch to C++11 (even it > still set in project settings). > Reparsing, reopening don't work. > > After some random moves sometimes it will switch back to C++11, but I can't > reproduce it. I see it is a duplicate of the bug #253681. Could you reproduce the bug if you close all files before IDE closing?
I was able to reproduce the issue when setting breakpoint in DocumentLanguageFlavorProvider.addProperty to emulate long init phase. In this case default language filter (pure C++, not C++11) is used to lex and resolve identifiers in editor where i.e. constexpr is ID. For internal parser this ID is C++11 keyword and parsed correspondingly, so it can blink in color and blink is resolved/unresolved state. As the solution we need to listen TokenHierarchy rebuild and run error HL once hierarchy was updated due to new language flavor.
fixed in enum, change set: d47493e7235a
Integrated into 'main-silver', will be available in build *201511100002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/008dc4989af6 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #256285 Project with existing code lost C++11 flag after opening (transplanted from d47493e7235a152215f2bcedb9373c274e376e46)
Hello I think there still corner cases not handled by this patch. Usually it works but sometimes I get same bug again. Reopening project or IDE fix it. Situation is bit different that my previous report because I now use normal project with "add existing items from folder" to include src files. Another is that I use "-std=gnu++11" options to enable C++11 version.
(In reply to Yankes from comment #9) > Hello > > I think there still corner cases not handled by this patch. > Usually it works but sometimes I get same bug again. > Reopening project or IDE fix it. > > Situation is bit different that my previous report because I now use > normal project with "add existing items from folder" to include src files. > Another is that I use "-std=gnu++11" options to enable C++11 version. Yankes, I'd like to ask you to file a separate bug with your new project setup steps and steps which demo your issue with C++11 flavor. It looks you've faced similar, but different issue. The most helpful scenario is if you can create sample project and attach it to the new bug with steps to reproduce. Thanks!
(In reply to Alexander Simon from comment #10) > (In reply to Yankes from comment #9) > > Hello > > > > I think there still corner cases not handled by this patch. > > Usually it works but sometimes I get same bug again. > > Reopening project or IDE fix it. > > > > Situation is bit different that my previous report because I now use > > normal project with "add existing items from folder" to include src files. > > Another is that I use "-std=gnu++11" options to enable C++11 version. > > Yankes, > I'd like to ask you to file a separate bug with your new project setup steps > and steps which demo your issue with C++11 flavor. It looks you've faced > similar, but different issue. > The most helpful scenario is if you can create sample project and attach it > to the new bug with steps to reproduce. > > Thanks! done: https://netbeans.org/bugzilla/show_bug.cgi?id=257670#c0
Verified in NetBeans 8.1 patch1