/** * Creates project structure inside the base project * * @throws CoreException * @throws IOException * @throws WrongRepositoryStateException * @throws JGitInternalException * @throws ConcurrentRefUpdateException * @throws NoMessageException * @throws NoHeadException * @throws NoFilepatternException */ public void createProjectStructure() throws NoFilepatternException, NoHeadException, NoMessageException, ConcurrentRefUpdateException, JGitInternalException, WrongRepositoryStateException, IOException, CoreException { File directory = createLocalGitRepo(); addContentToGitRepo(directory); // Set persistent property so that we know when to show the context // menu item. project.setPersistentProperty( LocalFedoraPackagerPlugin.PROJECT_PROP, "true" /* unused value */); // $NON-NLS-1$ ConnectProviderOperation connect = new ConnectProviderOperation(project); connect.execute(null); // Add created repository to the list of Git repositories so that it // shows up in the Git repositories view. final RepositoryUtil config = org.eclipse.egit.core.Activator.getDefault().getRepositoryUtil(); config.addConfiguredRepository(repository.getDirectory()); }
/** * Connect a project to this repository * * @param project * @throws CoreException */ public void connect(IProject project) throws CoreException { ConnectProviderOperation op = new ConnectProviderOperation(project, this.getRepository().getDirectory()); op.execute(null); }