private static TreeView getDependencyView(TextAnnotation ta, Annotator viewGenerator) {
    if (!ta.hasView(viewGenerator.getViewName())) {
      synchronized (FeatureInputTransformer.class) {
        if (!ta.hasView(viewGenerator.getViewName())) {
          try {
            ta.addView(viewGenerator);
          } catch (AnnotatorException e) {
            throw new RuntimeException(e);
          }
        }
      }
    }

    return (TreeView) ta.getView(viewGenerator.getViewName());
  }