use of com.intellij.remoteServer.impl.runtime.deployment.LocalDeploymentImpl in project intellij-community by JetBrains.
the class ServerConnectionImpl method getDeployments.
@NotNull
@Override
public Collection<Deployment> getDeployments() {
Set<Deployment> result = new LinkedHashSet<>();
Map<Deployment, DeploymentImpl> orderedDeployments = new TreeMap<>(getServer().getType().getDeploymentComparator());
synchronized (myLocalDeployments) {
synchronized (myRemoteDeployments) {
for (LocalDeploymentImpl localDeployment : myLocalDeployments.values()) {
localDeployment.setRemoteDeployment(null);
orderedDeployments.put(localDeployment, localDeployment);
}
result.addAll(orderedDeployments.keySet());
for (DeploymentImpl remoteDeployment : myRemoteDeployments.values()) {
DeploymentImpl deployment = orderedDeployments.get(remoteDeployment);
if (deployment != null) {
if (deployment instanceof LocalDeploymentImpl) {
((LocalDeploymentImpl) deployment).setRemoteDeployment(remoteDeployment);
}
} else {
orderedDeployments.put(remoteDeployment, remoteDeployment);
}
}
result.addAll(orderedDeployments.keySet());
}
}
return result;
}
Aggregations