我想转换这个:
def getEmployeeReminders(employeeId: Int, page: Option[Int], pageSize: Option[Int], js_callback: Option[String]) = Action {
val reminders = Reminder.listForOne(employeeId, page, pageSize)
getResponse(reminders, js_callback)
}
to this:
def getEmployeeReminders(employeeId: Int, page: Option[Int], pageSize: Option[Int], js_callback: Option[String]) =
Restrict(companyAdmin, new MyDeadboltHandler) {
Action {
val reminders = Reminder.listForOne(employeeId, page, pageSize)
getResponse(reminders, js_callback)
}
}
在 eclipse scala 编辑器中多次。
如何将多行与 '.*' 匹配?
另外,如何在替换中注入换行符?
您可以使用(?s)
内联模式修饰符将强制点.
也匹配换行符。在您的答案中,您使用的是否定字符类,因此无需使用此修饰符,只需使用\n
Find: = (Action[^}]*})
Replace: = \n Restrict(companyAdmin, new MyDeadboltHandler) {\n \1}
使用点.
反而:
Find: (?s)= (Action.*?})
Replace: = \n Restrict(companyAdmin, new MyDeadboltHandler) {\n \1}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)