Skip to content

Commit

Permalink
CHE-891: Initialize projects from unconfigured folders on starting WS…
Browse files Browse the repository at this point in the history
…-agent
  • Loading branch information
azatsarynnyy committed Mar 28, 2016
1 parent 3af60fc commit 3dfb6d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ RegisteredProject putProject(ProjectConfig config,
boolean detected) throws ServerException,
ConflictException,
NotFoundException {
final RegisteredProject project = new RegisteredProject(folder, config, updated, detected, this.projectTypeRegistry);
final RegisteredProject project = new RegisteredProject(folder, config, updated, detected, projectTypeRegistry);
Optional<RegisteredProject> updatedProjectOptional = Optional.ofNullable(projects.put(project.getPath(), project));

// check whether it isn't during #initProjects()
Expand All @@ -210,6 +210,9 @@ RegisteredProject putProject(ProjectConfig config,
} else {
workspaceHolder.addProject(project);
}
} else if (config == null) {
// initializing project from unconfigured folder during #initProjects()
workspaceHolder.addProject(project);
}

return project;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ void updateProject(RegisteredProject project) throws ServerException {
return;
}

// TODO workspace.addProject(project); but replace
workspace.updateProject(project);

final String href = UriBuilder.fromUri(apiEndpoint)
Expand Down

0 comments on commit 3dfb6d1

Please sign in to comment.