void (@NotNull AnnotationHolder holder, @NotNull XmlTag tag, @NotNull XmlToken end) { PsiElement context = tag.getContainingFile().getContext(); if (context != null) { ParserDefinition parserDefinition = LanguageParserDefinitions.INSTANCE.forLanguage(context.getLanguage()); if (parserDefinition != null) { ASTNode contextNode = context.getNode(); if (contextNode != null) { // TODO: we should check for concatenations here return; } } } String tagName = tag.getName(); String endTokenText = end.getText(); RenameTagBeginOrEndIntentionAction renameEndAction = new RenameTagBeginOrEndIntentionAction(tagName, endTokenText, false); RenameTagBeginOrEndIntentionAction renameStartAction = new RenameTagBeginOrEndIntentionAction(endTokenText, tagName, true); holder.newAnnotation(HighlightSeverity.ERROR, XmlAnalysisBundle.message("xml.inspections.wrong.closing.tag.name")) .range(end) .withFix(new RemoveExtraClosingTagIntentionAction()) .withFix(renameEndAction) .withFix(renameStartAction) .create(); }