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.
Created attachment 119850 [details] Screenshot of what the code looks like in the IDE after the greyout Code in header file spontaneously turns grey/white after clicking on it to edit. The code can be edited, but not parsed. Code assistance fails to recognize anything in the file. Restarting app did not help. Reloading the source files into the project did not help. However, when header is first opened to edit, the code looks fine. Then, netbeans whites out everything. Loading the file in Xcode showed no problems.
Other files being worked on in the project, header and source, are still ok.
Could you try, please, NB 7.2 Beta? I've fixed some similar problems in trunk. Thanks!
Tried 7.2, and the same issue persists. It seems to be fine until netbeans begins to parse the project....
Thanks. Can you, please, do in 7.2 the following: - in Help->About have a look where your cache dir is located - close IDE and remove ${cache}/cnd/model - reopen IDE, wait parse finished and open "problematic" file, it should be OK. - press Ctrl+Alt+Shift+M and choose to dump "Included Preprocessor States" -- keep the output file (it's name is written on top of log) - then do your activity which corrupts file... as soon as it is - press Ctrl+Alt+Shift+M and choose to dump "Included Preprocessor States" again -- keep the output file again Attach here both files for analysis. Thanks! Vladimir.
Created attachment 119906 [details] before corruption
Created attachment 119907 [details] after corruption
Thanks for the help! The corruption happens after opening the file, so attached is the output before and after opening the file; removing the cache before reopen of the IDE.
Thanks. Could you, please, send me head lines of your files: AntibodyStructure.cc and AntibodyStructure.h
Also I need other dump: Ctrl+Alt+Shift+M and choose "Preprocessor States" when you have active file CDRStructure.hh Thanks!
Created attachment 119947 [details] preprocessor states after opening cdrstructure.hh
Created attachment 119948 [details] head of antibodystructure.hh
Created attachment 119949 [details] head of antibodystructure.cc
thanks for info. Looks like IDE behaves correctly... The problem is guard tokens with dots in your code like -------------- #ifndef path_to_file.hh #define path_to_file.hh #endif -------------- by default preprocessor sees here define and check of macro "path_to_file", not "path_to_file.hh", because by C/C++ standard macro is identifier. In your exact case you have files cdrstructure.hh and cdrstructure.fwd.hh which defines/checks "same" guard macros "INCLUDED_protocols_antibody_design_CDRStructure": #define INCLUDED_protocols_antibody_design_CDRStructure.fwd.hh && #ifndef INCLUDED_protocols_antibody_design_CDRStructure.hh That's why all in code is grey. In fact, depending on compiler you should see error or warning: Error: There is extra text on this line. I.e. the following has empty body from preprocessor point of view: --------------- #ifndef NEWFILE.FWD.HH #define NEWFILE.FWD.HH #ifndef NEWFILE.HH #define NEWFILE.HH int i; #endif #endif --------------- What is your compiler which supports dots in macro names? dot is not a valid identifier-part. I'd advise you to change all dots to hyphens: INCLUDED_protocols_antibody_design_CDRStructure_fwd_hh
what IDE could do in such cases is to show warnings automatically to explain the situation and allow user to change the coding style.
btw, I guess, if you ctrl+click on macro in line 16 of file CDRStructure.hh you should jump into the #define in file CDRStructure.fwd.hh
Thanks for all your help. I had changed the default new file for header files so that it did the includes, hadn't compiled everything yet. A warning in the IDE would be great if possible. I had no idea what was going on when the file went grey. Changing the dots to dashes returned the file to normal. Thanks again.