use of org.jetbrains.plugins.groovy.lang.psi.api.util.GrNamedArgumentsOwner in project intellij-community by JetBrains.
the class PsiUtil method getNamedArgumentValue.
@Nullable
public static PsiElement getNamedArgumentValue(GrNamedArgument otherNamedArgument, String argumentName) {
PsiElement parent = otherNamedArgument.getParent();
if (!(parent instanceof GrNamedArgumentsOwner))
return null;
GrNamedArgument namedArgument = ((GrNamedArgumentsOwner) parent).findNamedArgument(argumentName);
if (namedArgument == null)
return null;
return namedArgument.getExpression();
}
Aggregations