HyperlinkInfo (List<String> options) { return (project) -> { RunnerAndConfigurationSettings settings = myEnv.getRunnerAndConfigurationSettings(); if (settings == null) return; RunConfiguration conf = settings.getConfiguration(); if (!(conf instanceof ExternalSystemRunConfiguration)) return; ExternalSystemTaskExecutionSettings taskExecutionSettings = ((ExternalSystemRunConfiguration)conf).getSettings(); String scriptParameters = taskExecutionSettings.getScriptParameters(); List<String> params; if (StringUtil.isEmpty(scriptParameters)) { params = new SmartList<>(); } else { params = new ArrayList<>(StringUtil.split(scriptParameters, " ")); params.remove("--stacktrace"); params.remove("--info"); params.remove("--debug"); } params.addAll(options); taskExecutionSettings.setScriptParameters(StringUtil.join(params, " ")); ExecutionUtil.restart(myEnv); }; }