if (GrCucumberUtil.isStepDefinition(element)) {
return element;
}
if (element instanceof PomTargetPsiElement) {
final PomTarget target = ((PomTargetPsiElement)element).getTarget();
if (target instanceof GrStepDefinition) {
return ((GrStepDefinition)target).getElement();
}
}