Structural Search/Replace with multiple annotations
Answered
Is there any documentation that might guide me with dealing with a search/replace for code similar to:
@Override
@SuppressWarnings(value={"unchecked", "deprecation"})
public P runit() {
var x = 1
}
When the replacement occurs, the Annotations are not correct:
@Override SuppressWarnings
The search/replace looks like:
<replaceConfiguration name="Annotated methods" text="@$Annotation$ $MethodType$ $Method$($ParameterType$ $Parameter$){ $Statement$; };" recursive="false" caseInsensitive="true" type="JAVA" pattern_context="member" reformatAccordingToStyle="false" shortenFQN="false" replacement="@$Annotation$ $MethodType$ runit($ParameterType$ $Parameter$){ $Statement$; };">
<constraint name="__context__" within="" contains="" />
<constraint name="Annotation" maxCount="2147483647" within="" contains="" />
<constraint name="MethodType" within="" contains="" />
<constraint name="Method" regexp="run" target="true" within="" contains="" />
<constraint name="ParameterType" within="" contains="" />
<constraint name="Parameter" minCount="0" maxCount="2147483647" within="" contains="" />
<constraint name="Statement" minCount="0" maxCount="2147483647" within="" contains="" />
</replaceConfiguration>
Please sign in to leave a comment.
Seems to be a bug after adding the count filter.
Please file an issue at https://youtrack.jetbrains.com/newIssue?project=IDEA
Thank you. Logged issue: IDEA-263971