PsiElement (String text, ConvertContext context) { MavenDomPluginModel model = MavenPluginDomUtil.getMavenPluginModel(context.getInvocationElement()); if (model == null) return null; for (MavenDomMojo each : model.getMojos().getMojos()) { String goal = each.getGoal().getStringValue(); if (text.equals(goal)) return each.getXmlElement(); } return super.resolve(text, context); }