结构搜索并替换为新变量

时间:2019-09-18 07:41:44

标签: intellij-idea server-side-rendering

使用想法2019.2我无法进行结构搜索和替换,例如将静态小写字段名转换为大写。我无法将包含小写字母的变量插入替换模板

1 个答案:

答案 0 :(得分:0)

假设您已经定义了名称为methodName的变量,请使用带有methodName.getText().toLowerCase()表达式的Groovy脚本,该表达式会将方法名称的文本替换为所有小写字母。

在此处查看文档中的示例:Convert uppercase values of the class attribute in p tags to lowercase