@Override
    public @Nullable FileType getContentType() {
      VirtualFile file = FileDocumentManager.getInstance().getFile(getDocument());
      if (file != null) return file.getFileType();
      if (myReferent != null) return myReferent.guessContentType();
      return null;
    }
@Override
    public @Nullable FileType getContentType()