You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/09/11 07:22:11 UTC

[GitHub] [netbeans] zeleznypa opened a new issue, #4621: Netbeans code templates - string functions

zeleznypa opened a new issue, #4621:
URL: https://github.com/apache/netbeans/issues/4621

   ### Description
   
   Netbeans contains great tool „[code templates](https://netbeans.apache.org/kb/docs/php/code-templates.html)“ that allows me to simplify my work. 
   
   For many years I missed last functionality for the perfection, which is some additional string function.
   
   ### Use case/motivation
   
   For example, I have at this time the following code template:
   
   ```
       /**
        * ${PARAMETER newVarName default="Parameter"} getter
        *
        * @return ${TYPE newVarName default="Parameter"}
        */
       protected function get${PARAMETER editable=false}(): ${TYPE editable=false}
       {
           return $this->${PROPERTY newVarName default="parameter"};
       }
   
       /**
        * ${PARAMETER editable=false} setter
        *
        * @param ${TYPE editable=false} $$${PROPERTY editable=false}
        * @return static Provides fluent interface
        */
       protected function set${PARAMETER editable=false}(${TYPE editable=false} $$${PROPERTY editable=false})
       {
           $this->${PROPERTY editable=false} = $$${PROPERTY editable=false};
           return $this;
       }
   ```
   
   That allows me to quickly generate the code of generic getter & setter and simply replace the name `${PARAMETER}` with the real one. After that I have to replace the name `${PROPERTY}` which should be the same like `${PARAMETER}` but with the first letter lowercase.
   
   Will it be possible please to add functionalities like:
   - lower case all
   - lower case first letter
   - upper case all
   - upper case first letter
   - replace something with something
   - replace something with something by regexp?
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists