@Override
  public void create() {
    if (created) {
      throw new IllegalStateException("Must not call .create() twice");
    }
    created = true;
    if (range == null) {
      range = myCurrentElement.getTextRange();
    }
    if (tooltip == null && message != null) {
      tooltip = XmlStringUtil.wrapInHtml(XmlStringUtil.escapeString(message));
    }
    Annotation annotation = new Annotation(range.getStartOffset(), range.getEndOffset(), severity, message, tooltip);
    if (needsUpdateOnTyping != null) {
      annotation.setNeedsUpdateOnTyping(needsUpdateOnTyping);
    }
    if (highlightType != null) {
      annotation.setHighlightType(highlightType);
    }
    if (textAttributesKey != null) {
      annotation.setTextAttributes(textAttributesKey);
    }
    if (enforcedAttributes != null) {
      annotation.setEnforcedTextAttributes(enforcedAttributes);
    }
    if (problemGroup != null) {
      annotation.setProblemGroup(problemGroup);
    }
    if (gutterIconRenderer != null) {
      annotation.setGutterIconRenderer(gutterIconRenderer);
    }
    if (fileLevel != null) {
      annotation.setFileLevelAnnotation(fileLevel);
    }
    if (afterEndOfLine != null) {
      annotation.setAfterEndOfLine(afterEndOfLine);
    }
    if (fixes != null) {
      for (FixB fb : fixes) {
        CommonIntentionAction fix = fb.fix;
        IntentionAction intention = fix.asIntention();
        TextRange finalRange = fb.range == null ? this.range : fb.range;
        if (fb.batch != null && fb.batch) {
          annotation.registerBatchFix(intention, getLocalQuickFix(fix), finalRange, fb.key);
        }
        else if (fb.universal != null && fb.universal) {
          annotation.registerBatchFix(intention, getLocalQuickFix(fix), finalRange, fb.key);
          annotation.registerFix(intention, finalRange, fb.key);
        }
        else {
          annotation.registerFix(intention, finalRange, fb.key);
        }
      }
    }
    if (unresolvedReference != null) {
      annotation.setUnresolvedReference(unresolvedReference);
    }
    myHolder.add(annotation);
    myHolder.annotationCreatedFrom(this);
  }
@Override
  public void create()