/**
   * Initializes the resource set using the repository content ; if the repository content is empty,
   * creates all the declared indexes.
   *
   * @throws CoreException it the resourceSet cannot be initialized
   */
  private void initializeResourceSet() throws CoreException {

    // We first get the project on which the repository is defined
    IProject project = workspaceConfig.getProject();
    if (!project.exists()) {
      project.create(null);
    }
    if (!project.isOpen()) {
      project.open(null);
    }
    IFolder folder = project.getFolder(workspaceConfig.getRepositoryRelativePath());
    // We created a WorkspaceRepositoryLoader using the indexPathList
    WorkspaceRepositoryLoader loader =
        new WorkspaceRepositoryLoader(this, this.getWorkspaceConfig().getIndexesPathList());
    // If the repository folder exists
    if (folder.exists()) {
      // We load the resourceSet
      loader.loadResourceSet();
    } else {
      // If the repository folder doesn't exist
      // We create it
      folder.create(IResource.NONE, true, null);
      // And use the RepositoryLoader to initialize the resource set with empty content
      loader.loadResourceSet();
    }
    isResourceSetLoaded = true;
  }
 /**
  * {@inheritDoc}
  *
  * @see org.eclipse.mylyn.docs.intent.collab.repository.Repository#getIdentifier()
  */
 public String getIdentifier() {
   return workspaceConfig.getProject().getName();
 }