简体   繁体   中英

Get annotation parameter with IntelliJ IDEA structural search

I'm trying to generate named queries for JPA entities using table name specified in @Table annotation with structural search and replace.

So to start I'm trying the following template:

@Table($param$ = $value$)
public class $clazz$

I have many classes like:

@Table(name = "Some Table")
public class SomeClass

and if I replace with the same template, it correctly grabs that $param$ is name , $clazz$ is correct class name, but $value$ is empty.

I'm using IDEA 12 build 128.101

What am I doing wrong? Thank you.

I think this issue was already reported a long time ago, but no one seems to care about it. Try voting up the ticket in youtrack.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM