Java method extraction (signature + body) #16825
-
Suppose I have the following method that I want to extract (declaration + body):
I don't know how to write a query to return the location between
this assumption is mostly correct because the method name is rarely written in the second line of the method. thats why it fails for the example above because the start line misses |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Hi @alibrahimzada, It's not possible to write a query like you want, because we do not track the locations of keywords like |
Beta Was this translation helpful? Give feedback.
In my limited understanding of Java there should just be three cases: (1) you encounter a
{
, a}
, or a;
. Comments you probably want to handle in a special way, because they can occur in awkward places, for example: