本文整理了Java中com.intellij.execution.ExecutionException.<init>()
方法的一些代码示例,展示了ExecutionException.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExecutionException.<init>()
方法的具体详情如下:
包路径:com.intellij.execution.ExecutionException
类名称:ExecutionException
方法名:<init>
暂无
代码示例来源:origin: ballerina-platform/ballerina-lang
@NotNull
@Override
public XDebugProcess start(@NotNull XDebugSession session) throws ExecutionException {
// Get the remote host address.
String address = getRemoteAddress(env);
if (address == null || address.isEmpty()) {
throw new ExecutionException("Invalid remote address.");
}
// Create a new connector. This will be used to communicate with the debugger.
BallerinaWebSocketConnector ballerinaDebugSession = new BallerinaWebSocketConnector(address);
return new BallerinaDebugProcess(session, ballerinaDebugSession, null);
}
}).getRunContentDescriptor();
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
throw new ExecutionException("Cannot create temporary output file", e);
try {
if (!outputFile.exists() && !outputFile.createNewFile()) {
throw new ExecutionException("Cannot create output file " + outputFile.getAbsolutePath());
throw new ExecutionException("Cannot create output file " + outputFile.getAbsolutePath());
throw new ExecutionException("Cannot create output file in " + outputDirectory.getAbsolutePath());
throw new ExecutionException("Cannot make temporary file executable " + outputFile.getAbsolutePath());
代码示例来源:origin: ballerina-platform/ballerina-lang
private ExecutionResult getExecutionResults(@NotNull RunProfileState state, @NotNull ExecutionEnvironment env)
throws ExecutionException {
// Start debugger.
ExecutionResult executionResult = state.execute(env.getExecutor(), new BallerinaDebugger());
if (executionResult == null) {
throw new ExecutionException("Cannot run debugger");
}
return executionResult;
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@NotNull
private RunningState createRunningState(ExecutionEnvironment env) throws ExecutionException {
GoModuleBasedConfiguration configuration = getConfigurationModule();
Module module = configuration.getModule();
if (module == null) {
throw new ExecutionException("Go isn't configured for run configuration: " + getName());
}
return newRunningState(env, module);
}
代码示例来源:origin: ballerina-platform/ballerina-lang
@NotNull
private RunningState createRunningState(ExecutionEnvironment env) throws ExecutionException {
BallerinaModuleBasedConfiguration configuration = getConfigurationModule();
Module module = configuration.getModule();
if (module == null) {
throw new ExecutionException("Ballerina isn't configured for run configuration: " + getName());
}
return newRunningState(env, module);
}
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
throw new ExecutionException("Cannot run debugger");
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
@NotNull
public GeneralCommandLine createCommandLine() throws ExecutionException {
if (myGoRoot == null) {
throw new ExecutionException("Sdk is not set or Sdk home path is empty for module");
}
GeneralCommandLine commandLine = !myPtyDisabled && PtyCommandLine.isEnabled() ? new PtyCommandLine() : new GeneralCommandLine();
commandLine.setExePath(ObjectUtils.notNull(myExePath, GoSdkService.getGoExecutablePath(myGoRoot)));
commandLine.getEnvironment().putAll(myExtraEnvironment);
commandLine.getEnvironment().put(GoConstants.GO_ROOT, StringUtil.notNullize(myGoRoot));
commandLine.getEnvironment().put(GoConstants.GO_PATH, StringUtil.notNullize(myGoPath));
if (myVendoringEnabled != null) {
commandLine.getEnvironment().put(GoConstants.GO_VENDORING_EXPERIMENT, myVendoringEnabled ? "1" : "0");
}
Collection<String> paths = ContainerUtil.newArrayList();
ContainerUtil.addIfNotNull(paths, StringUtil.nullize(commandLine.getEnvironment().get(GoConstants.PATH), true));
ContainerUtil.addIfNotNull(paths, StringUtil.nullize(EnvironmentUtil.getValue(GoConstants.PATH), true));
ContainerUtil.addIfNotNull(paths, StringUtil.nullize(myEnvPath, true));
commandLine.getEnvironment().put(GoConstants.PATH, StringUtil.join(paths, File.pathSeparator));
commandLine.withWorkDirectory(myWorkDirectory);
commandLine.addParameters(myParameterList.getList());
commandLine.withParentEnvironmentType(myParentEnvironmentType);
commandLine.withCharset(CharsetToolkit.UTF8_CHARSET);
return commandLine;
}
代码示例来源:origin: ballerina-platform/ballerina-lang
throw new ExecutionException("Cannot find module for the file '" + file.getVirtualFile().getPath() + "'");
代码示例来源:origin: go-lang-plugin-org/go-lang-idea-plugin
VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByPath(filePath);
if (virtualFile == null) {
throw new ExecutionException("Test file doesn't exist");
throw new ExecutionException("File '" + filePath + "' is not test file");
throw new ExecutionException("Cannot find import path for " + filePath);
代码示例来源:origin: ballerina-platform/ballerina-lang
throw new ExecutionException("Invalid remote address.");
代码示例来源:origin: liias/monkey
@NotNull
public static String get(Integer cmd) throws ExecutionException {
if (SystemInfoRt.isWindows) {
if (win.containsKey(cmd))
return win.get(cmd);
} else if (SystemInfoRt.isLinux) {
if (linux.containsKey(cmd))
return linux.get(cmd);
} else if (SystemInfoRt.isMac) {
if (mac.containsKey(cmd))
return mac.get(cmd);
} else {
throw new ExecutionException("Unsupported OS " + SystemInfoRt.OS_NAME);
}
throw new ExecutionException("Unsupported CMD " + cmd);
}
代码示例来源:origin: Camelcade/Perl5-IDEA
@Override
public int getDebugPort() throws ExecutionException {
if (myDebugPort == null) {
myDebugPort = NetUtils.tryToFindAvailableSocketPort();
if (myDebugPort == -1) {
throw new ExecutionException("No free port to work on");
}
}
return myDebugPort;
}
代码示例来源:origin: Camelcade/Perl5-IDEA
@NotNull
private File createCommandScript(@NotNull PerlCommandLine commandLine) throws ExecutionException {
StringBuilder sb = new StringBuilder();
commandLine.getEnvironment().forEach((key, val) -> sb.append("export ").append(key).append('=').append(val).append("\n"));
sb.append(commandLine.getCommandLineString());
try {
String command = sb.toString();
LOG.info("Executing in " + myData.getImageName());
StringUtil.split(command, "\n").forEach(it -> LOG.info(" " + it));
return ExecUtil.createTempExecutableScript("dockerWrapper", "", command);
}
catch (IOException e) {
throw new ExecutionException(e);
}
}
}
代码示例来源:origin: Camelcade/Perl5-IDEA
@NotNull
public static BaseProcessHandler createProcessHandler(@NotNull PerlCommandLine commandLine) throws ExecutionException {
PerlVersionManagerData versionManagerData = commandLine.getEffectiveVersionManagerData();
if (versionManagerData != null) {
commandLine = versionManagerData.patchCommandLine(commandLine);
}
PerlHostData perlHostData = commandLine.getEffectiveHostData();
if (perlHostData == null) {
throw new ExecutionException("No host data in " + commandLine);
}
BaseProcessHandler processHandler = perlHostData.doCreateProcessHandler(commandLine);
commandLine.getProcessListeners().forEach(processHandler::addProcessListener);
PerlRunUtil.addMissingPackageListener(processHandler, commandLine);
return processHandler;
}
代码示例来源:origin: Camelcade/Perl5-IDEA
@NotNull
public Sdk getEffectiveSdk() throws ExecutionException {
Sdk perlSdk;
if (isUseAlternativeSdk()) {
String alternativeSdkName = getAlternativeSdkName();
perlSdk = PerlSdkTable.getInstance().findJdk(alternativeSdkName);
if (perlSdk == null) {
throw new ExecutionException(PerlBundle.message("perl.run.error.no.alternative.sdk", alternativeSdkName));
}
return perlSdk;
}
else {
perlSdk = PerlProjectManager.getSdk(getProject());
if (perlSdk == null) {
throw new ExecutionException(PerlBundle.message("perl.run.error.no.sdk", getProject()));
}
}
return perlSdk;
}
代码示例来源:origin: GoogleCloudPlatform/google-cloud-intellij
@Override
public J2EEServerInstance createServerInstance() throws ExecutionException {
if (ProjectRootManager.getInstance(commonModel.getProject()).getProjectSdk() == null) {
throw new ExecutionException(AppEngineMessageBundle.getString("appengine.run.server.nojdk"));
}
return new AppEngineServerInstance(commonModel);
}
代码示例来源:origin: liias/monkey
protected void runSimulator(ConsoleView console) throws ExecutionException {
MonkeyParameters monkeyParameters = getMonkeyParameters();
Sdk sdk = monkeyParameters.getSdk();
String outputDir = monkeyParameters.getOutputPath().getPath() + File.separator;
SimulatorHelper simulatorHelper = new SimulatorHelper(console, sdk, outputDir);
GeneralCommandLine runSimulatorCmd = createRunSimulatorCmd();
runSimulatorCmd.createProcess();
if (!simulatorHelper.findSimulatorPortNTimes(5, 1000).isPresent()) {
throw new ExecutionException("Could not connect to simulatorHelper");
}
}
代码示例来源:origin: Camelcade/Perl5-IDEA
private PerlCommandLine patchCommandLine(@NotNull PerlCommandLine perlCommandLine) throws ExecutionException {
WSLDistributionWithRoot distribution = getDistribution();
if (distribution == null) {
throw new ExecutionException(PerlWslBundle.message("perl.host.handler.distribution.unavailable", getDistributionId()));
}
String workingDir = ObjectUtils.doIfNotNull(perlCommandLine.getWorkDirectory(), File::toString);
perlCommandLine.withWorkDirectory((String)null);
return distribution.patchCommandLine(
perlCommandLine,
perlCommandLine.getEffectiveProject(),
getRemotePath(workingDir),
false);
}
代码示例来源:origin: BashSupport/BashSupport
@Override
protected Process createProcess() throws ExecutionException {
String bashLocation = BashInterpreterDetection.instance().findBestLocation();
if (bashLocation == null) {
throw new ExecutionException("Could not locate the bash executable");
}
GeneralCommandLine commandLine = new GeneralCommandLine().withWorkDirectory(getWorkingDir());
commandLine.setExePath(bashLocation);
return commandLine.createProcess();
}
代码示例来源:origin: liias/monkey
protected VirtualFile copyBuiltPrgToDevice() throws ExecutionException {
try {
MonkeyParameters monkeyParameters = getMonkeyParameters();
String prgPath = monkeyParameters.getOutputPath().findChild(getPrgName()).getPath();
String deviceDirectory = getConfiguration().getDeviceDirectory();
return copyPrgTo(prgPath, deviceDirectory);
} catch (IOException e) {
throw new ExecutionException(e);
}
}
内容来源于网络,如有侵权,请联系作者删除!