Is there a way to define customized macros for syntax checking highlighting?

Answered

My company's project is cross-platform among iOS/Android/etc. There are lots of #if defined(...) in the code. Sometimes, it looks AppCode could not pickup the right #if branch as some #define cannot be detected and the real code of iOS is folded and not highlighted, which is a bit annoying during code reading and editing. Is it possible to define some customized macros in the IDE (not in the code) only for IDE syntax highlighting/checking?

1 comment
Official comment

Hello!

Sorry for the late response.

You have two options:

  1. Manually pick the correct target for the file in the lower right corner of the editor (via the combobox that says "Context: ...")
  2. Use the the "__JETBRAINS_IDE__" macro which is defined only in the editor, and not for the actual compilation.

Does that help?

 

Please sign in to leave a comment.