use of org.eclipse.che.plugin.maven.shared.dto.ProjectsUpdateMessage in project che by eclipse.
the class MavenWebSocketCommunication method sendUpdateMassage.
@Override
public void sendUpdateMassage(Set<MavenProject> updated, List<MavenProject> removed) {
ProjectsUpdateMessage dto = DtoFactory.newDto(ProjectsUpdateMessage.class);
List<String> updatedPaths = updated.stream().map(project -> project.getProject().getFullPath().toOSString()).collect(Collectors.toList());
dto.setUpdatedProjects(updatedPaths);
List<String> removedPaths = removed.stream().map(project -> project.getProject().getFullPath().toOSString()).collect(Collectors.toList());
dto.setDeletedProjects(removedPaths);
send(DtoFactory.getInstance().toJsonElement(dto).getAsJsonObject(), MessageType.UPDATE);
}
Aggregations