this.workspace = workspace;
this.repository = repository;
}
public int run() throws FileNotFoundException {
Controller controller = new Controller(workspace, new VertexCreatingVisitor());
for (String libraryPath : options.getLibraryPaths()) {
CommandLineLibraryNameParser parser = new CommandLineLibraryNameParser(libraryPath).invoke();
Project project = parser.getProject();
Library library = repository.load(project, parser.getLibraryName());
project.addLibrary(library);
controller.addProject(new NewProjectOperation(project));
}
Library mainLib = workspace.lookupLibrary(UUID.fromString(options.getMainLib()));
if (mainLib == null) {
throw new IllegalArgumentException("No library found with id " + options.getMainLib());