use of org.eclipse.che.api.workspace.server.WorkspaceManager in project che by eclipse.
the class LocalWorkspaceFolderPathProvider method getPath.
@Override
public String getPath(@Assisted("workspace") String workspaceId) throws IOException {
if (!isWindows && hostProjectsFolder != null) {
return hostProjectsFolder;
}
try {
WorkspaceManager workspaceManager = this.workspaceManager.get();
Workspace workspace = workspaceManager.getWorkspace(workspaceId);
String wsName = workspace.getConfig().getName();
return doGetPathByName(wsName);
} catch (NotFoundException | ServerException e) {
throw new IOException(e.getLocalizedMessage());
}
}
Aggregations