AnnotationBuilder (@NotNull TextRange range) { assertNotSet(this.range, "range"); TextRange currentElementRange = myCurrentElement.getTextRange(); if (!currentElementRange.contains(range)) { markNotAbandoned(); String message = "Range must be inside element being annotated: " + currentElementRange + "; but got: " + range; throw PluginException.createByClass(message, null, myCurrentAnnotator.getClass()); } this.range = range; return this; }