On Feb 26, 2012, at 14:32 , Eeyore wrote: I couldn't find anything "interesting" or weird about the language use at the places where coloring cuts out. Often just deleting a semi-colon and then retyping it will cause coloring to extend or disappear. I'll keep trying to figure out if there is a pattern.
FWIW, pattern-wise, I've noticed:
1. Coloring may disappear (for part or all of the file) while background source code indexing is in progress. Generally it comes back when the indexing completes, but this might take a while depending on what is being re-indexed.
2. Occasionally (and randomly from the user's perspective AFAIK), coloring won't come back on in an unsaved file, but comes back when you save the file. (But you've seen a variation where it doesn't come back after the save. Perhaps the save and the indexing are both background operations, and it matters which one happens to finish first.)
3. A structural error (like a missing ']' or '}' later in a method often turns off coloring from some point of editing** earlier in the method, and coloring of the intermediate source (between the edit and the later error) won't come back on until you fix the structural error, even though the intermediate code is free of errors. In addition, completions don't work fully on the intermediate section of code -- e.g. you can get some word/identifier completions to pop up, but not methods -- but I haven't taken the time to investigate this systematically.
4. An error in a header file included much earlier can cause symptoms like #3. The place where coloring disappears isn't related to the position of the #import, but perhaps is related to where you make edits**.
5. If there are multiple errors in a different file, enough to cause Xcode to stop trying to finish compilation of that file (sometimes there's a message saying so), then syntax coloring might not come back in the file you're editing, again producing symptoms like #3.
6. When there are errors, in the same or another file, it might make a difference to the return of coloring whether the errors are "live" or the "sticky" kind of errors you get when you do a build.
** It may have to be a point of editing that actually caused its own error to show up, even if you subsequently fix that error. I can't remember for sure.
|