private @Nullable VirtualFile getDirectory() {
      if (mySnippetRoot == null) return null;
      List<String> path = StringUtil.split(getValue(), mySeparator);
      if (path.isEmpty()) return null;
      VirtualFile dir = mySnippetRoot;
      for (int i = 0; i < path.size() - 1; i++) {
        String component = path.get(i);
        dir = dir.findChild(component);
        if (dir == null) return null;
      }
      return dir;
    }
private @Nullable VirtualFile getDirectory()