@Override
 public void addFileFromRemoteByURI(
     ISemanticFileStore parentStore, String name, URI uri, IProgressMonitor monitor)
     throws CoreException {
   super.addFileFromRemoteByURI(parentStore, name, uri, monitor);
   this.addDependentFiles(
       (ISemanticFileStore) parentStore.getChild(name), uri.toString(), monitor);
 }
  private void addChildrenHierarchy(
      ISemanticFileStore childStore,
      String rootURI,
      String[] parts,
      int index,
      IProgressMonitor monitor)
      throws CoreException {

    IFileStore child = childStore.getChild(parts[index]);

    if (parts.length > index + 1) {
      if (!child.fetchInfo().exists()) {
        this.addResource(childStore, parts[index], ResourceType.FOLDER_TYPE, monitor);
      }

      child = childStore.getChild(parts[index]);

      addChildrenHierarchy(
          (ISemanticFileStore) child,
          rootURI + "/" + parts[index],
          parts,
          index + 1,
          monitor); //$NON-NLS-1$
    } else {
      // create a file
      if (!child.fetchInfo().exists()) {
        super.addFileFromRemoteByURI(
            childStore,
            parts[index],
            URI.create(rootURI + "/" + parts[index]),
            monitor); //$NON-NLS-1$

        this.addDependentFiles(
            (ISemanticFileStore) childStore.getChild(parts[index]),
            rootURI + "/" + parts[index],
            monitor); //$NON-NLS-1$
      }
    }
  }