use of com.intellij.remoteServer.runtime.ServerConnection in project intellij-community by JetBrains.
the class DeployToServerState method execute.
@Nullable
@Override
public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
final ServerConnection connection = ServerConnectionManager.getInstance().getOrCreateConnection(myServer);
final Project project = myEnvironment.getProject();
RemoteServersView.getInstance(project).showServerConnection(connection);
final DebugConnector<?, ?> debugConnector;
if (DefaultDebugExecutor.getDebugExecutorInstance().equals(executor)) {
debugConnector = myServer.getType().createDebugConnector();
} else {
debugConnector = null;
}
connection.deploy(new DeploymentTaskImpl(mySource, myConfiguration, project, debugConnector, myEnvironment), s -> RemoteServersView.getInstance(project).showDeployment(connection, (String) s));
return null;
}
use of com.intellij.remoteServer.runtime.ServerConnection in project intellij-community by JetBrains.
the class ServerConnectionManagerImpl method getOrCreateConnection.
@NotNull
@Override
public <C extends ServerConfiguration> ServerConnection getOrCreateConnection(@NotNull RemoteServer<C> server) {
ApplicationManager.getApplication().assertIsDispatchThread();
ServerConnection connection = myConnections.get(server);
if (connection == null) {
connection = doCreateConnection(server, this);
myConnections.put(server, connection);
myEventDispatcher.fireConnectionCreated(connection);
}
return connection;
}
Aggregations