blob: d86168bea92a9798d31fbd294d65856bd54d4769 [file] [log] [blame]
package com.intellij.remoteServer.impl.runtime;
import com.intellij.execution.configurations.RunProfile;
import com.intellij.execution.executors.DefaultDebugExecutor;
import com.intellij.execution.executors.DefaultRunExecutor;
import com.intellij.execution.runners.DefaultProgramRunner;
import com.intellij.remoteServer.impl.configuration.deployment.DeployToServerRunConfiguration;
import org.jetbrains.annotations.NotNull;
/**
* @author nik
*/
public class DeployToServerRunner extends DefaultProgramRunner {
@NotNull
@Override
public String getRunnerId() {
return "DeployToServer";
}
@Override
public boolean canRun(@NotNull String executorId, @NotNull RunProfile profile) {
if (!(profile instanceof DeployToServerRunConfiguration)) {
return false;
}
if (executorId.equals(DefaultRunExecutor.EXECUTOR_ID)) {
return true;
}
if (executorId.equals(DefaultDebugExecutor.EXECUTOR_ID)) {
return ((DeployToServerRunConfiguration<?, ?>)profile).getServerType().createDebugConnector() != null;
}
return false;
}
}