private void releaseAll() {
    if (getSegments() != null) {
      getSegments().removeAll();
      setSegments(null);
    }
    if (myTemplateRange != null) {
      myTemplateRange.dispose();
      myTemplateRange = null;
    }
    myPrevTemplate = getTemplate();
    setTemplate(null);
    myProject = null;
    releaseEditor();
  }
private void releaseAll()