@Nullable @Override protected RunContentDescriptor doExecute(@NotNull RunProfileState state, @NotNull ExecutionEnvironment environment) throws ExecutionException { assert state instanceof GoTestRunningState; GoTestRunningState runningState = (GoTestRunningState)state; GoTestRunConfiguration runConfiguration = ObjectUtils.tryCast(environment.getRunProfile(), GoTestRunConfiguration.class); if (runConfiguration == null) { return null; } FileDocumentManager.getInstance().saveAllDocuments(); CoverageEnabledConfiguration coverageEnabledConfiguration = CoverageEnabledConfiguration.getOrCreate(runConfiguration); runningState.setCoverageFilePath(coverageEnabledConfiguration.getCoverageFilePath()); ExecutionResult executionResult = state.execute(environment.getExecutor(), this); if (executionResult == null) { return null; } CoverageHelper.attachToProcess(runConfiguration, executionResult.getProcessHandler(), environment.getRunnerSettings()); return new RunContentBuilder(executionResult, environment).showRunContent(environment.getContentToReuse()); } }
public PerlDebugOptions getDebugOptions() { return (PerlDebugOptions)getEnvironment().getRunProfile(); } }
public PerlRemoteDebuggingRunProfileState(ExecutionEnvironment environment) { super(environment); PerlRemoteDebuggingConfiguration debuggingConfiguration = (PerlRemoteDebuggingConfiguration)environment.getRunProfile(); Project project = environment.getProject(); String projectPath = project.getBaseDir().getCanonicalPath(); myLocalProjectPath = new File(projectPath == null ? "" : projectPath); myRemoteProjectPath = new File(debuggingConfiguration.getRemoteProjectRoot()); }
@NotNull @Override protected List<String> getPerlParameters(PerlRunConfiguration runProfile) throws ExecutionException { List<String> perlParameters = new ArrayList<>(super.getPerlParameters(runProfile)); String coverageBasePath = CoverageEnabledConfiguration.getOrCreate((PerlRunConfiguration)getEnvironment().getRunProfile()).getCoverageFilePath(); Sdk effectiveSdk = runProfile.getEffectiveSdk(); PerlHostData hostData = PerlHostData.notNullFrom(effectiveSdk); perlParameters.add(0, "-MDevel::Cover=-silent,1,-db," + hostData.getRemotePath(coverageBasePath) + ",-dir,."); return perlParameters; } }
@Nullable @Override protected ConsoleView createConsole(@NotNull Executor executor) throws ExecutionException { RunProfile runProfile = getEnvironment().getRunProfile(); PerlHostData hostData = null; if (runProfile instanceof PerlRunConfiguration) { hostData = PerlHostData.from(((PerlRunConfiguration)runProfile).getEffectiveSdk()); } return new PerlRunConsole(getEnvironment().getProject(), hostData); }
@Override protected void execute(@NotNull ExecutionEnvironment environment, Callback callback, @NotNull RunProfileState state) throws ExecutionException { super.execute(environment, descriptor -> { ProcessHandler processHandler = descriptor.getProcessHandler(); if (processHandler != null) { CoverageHelper.attachToProcess((PerlRunConfiguration)environment.getRunProfile(), processHandler, environment.getRunnerSettings()); } if (callback != null) { callback.processStarted(descriptor); } }, new PerlCoverageProfileState(environment)); } }
@NotNull @Override protected ProcessHandler startProcess() throws ExecutionException { ProcessHandler process = super.startProcess(); RunProfile runProfile = getEnvironment().getRunProfile(); if (runProfile instanceof PerlRunConfiguration) { myHostData = PerlHostData.notNullFrom(((PerlRunConfiguration)runProfile).getEffectiveSdk()); } else { myHostData = PerlHostHandler.getDefaultHandler().createData(); } return process; }
@Override public void startPausing() { if (((PerlDebugOptions)myDebugProfileState.getEnvironment().getRunProfile()).isNonInteractiveModeEnabled()) { myDebugThread.sendString("pause"); } else { Notifications.Bus.notify(new Notification( "PERL_DEBUGGER", PerlBundle.message("perl.run.pause.unavailable.title"), PerlBundle.message("perl.run.pause.unavailable.content"), NotificationType.INFORMATION )); } }
@NotNull @Override protected ProcessHandler startProcess() throws ExecutionException { PerlRunConfiguration runConfiguration = (PerlRunConfiguration)getEnvironment().getRunProfile();