MavenDomShortArtifactCoordinates (@NotNull InsertionContext context, @NotNull XmlTag tag) { DomElement element = DomManager.getDomManager(context.getProject()).getDomElement(tag); //todo: show notification if (element instanceof MavenDomShortArtifactCoordinates) { tag.getValue().setText(""); return (MavenDomShortArtifactCoordinates)element; } //try parent element = DomManager.getDomManager(context.getProject()).getDomElement(tag.getParentTag()); if (element instanceof MavenDomShortArtifactCoordinates) { return (MavenDomShortArtifactCoordinates)element; } return null; }