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

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

    JoBr_1593366

      If the code has

       

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

       

      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 (4.2.0.641)

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

          Hi,

           

          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

          Ganesh