Template (XmlTag tagProperty, String prevSource, String prevTarget, String option) { XmlTag tagSource = tagProperty.findFirstSubTag(MAVEN_COMPILER_SOURCE); XmlTag tagTarget = tagProperty.findFirstSubTag(MAVEN_COMPILER_TARGET); PsiElement psiSource = getXmlTagPsiValue(tagSource); PsiElement psiTarget = getXmlTagPsiValue(tagTarget); if (psiSource == null || psiTarget == null) return null; TemplateBuilderImpl builder = new TemplateBuilderImpl(tagProperty); builder.replaceElement(psiSource, "variableSource", getExpression(prevSource, option), true); builder.replaceElement(psiTarget, "variableTarget", getExpression(prevTarget, option), true); return builder.buildInlineTemplate(); }