1 Reply Latest reply on Feb 7, 2020 6:18 PM by GaneshD_41

    Code folding doesn't work for #if #else #endif


      If the code has


      #if (something)
          some = code;
          some = other(code);


      Then it should be possible to fold up whichever branch is unused to hide them from view.  PSoC Creator only allows folding up the entire #if-#endif block, though.


      Also, it should be possible to fold/hide unused code by default when a file is open so there is less clutter.


      PSoC Creator  4.2 (

        • 1. Re: Code folding doesn't work for #if #else #endif



          We understood what you are saying. It is a good idea.


          Our software developers might thought that generally #if #endif statements are used in generated code/generated source sections where the selection is mainly based on the device family. Since user can actually go and see the configuration, it is better to make the user go through the entire flow for better understanding.


          Anyways, we will inform this to our software team to consider this in future versions


          Thank you