com.intellij.execution.configurations.ConfigurationPerRunnerSettings Java Examples

The following examples show how to use com.intellij.execution.configurations.ConfigurationPerRunnerSettings. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ExecutionEnvironment.java    From consulo with Apache License 2.0 6 votes vote down vote up
ExecutionEnvironment(@Nonnull RunProfile runProfile,
                     @Nonnull Executor executor,
                     @Nonnull ExecutionTarget target,
                     @Nonnull Project project,
                     @Nullable RunnerSettings runnerSettings,
                     @Nullable ConfigurationPerRunnerSettings configurationSettings,
                     @javax.annotation.Nullable RunContentDescriptor contentToReuse,
                     @Nullable RunnerAndConfigurationSettings settings,
                     @Nonnull ProgramRunner<?> runner) {
  myExecutor = executor;
  myTarget = target;
  myRunProfile = runProfile;
  myRunnerSettings = runnerSettings;
  myConfigurationSettings = configurationSettings;
  myProject = project;
  setContentToReuse(contentToReuse);
  myRunnerAndConfigurationSettings = settings;

  myRunner = runner;
}
 
Example #2
Source File: SMTRunnerConsoleTest.java    From consulo with Apache License 2.0 5 votes vote down vote up
private MyConsoleView(final TestConsoleProperties consoleProperties, final RunnerSettings runnerSettings,
                      final ConfigurationPerRunnerSettings configurationPerRunnerSettings) {
  super(consoleProperties, "SMTRunnerConsoleTest");

  myTestsOutputConsolePrinter = new TestsOutputConsolePrinter(MyConsoleView.this, consoleProperties, null) {
    @Override
    public void print(final String text, final ConsoleViewContentType contentType) {
      myMockResettablePrinter.print(text, contentType);
    }
  };
}
 
Example #3
Source File: PendingTargetRunConfigurationHandler.java    From intellij with Apache License 2.0 4 votes vote down vote up
/** #api193: remove when 2019.3 no longer supported; default implementation added in 2020.1. */
@Override
public void checkConfiguration(
    RunnerSettings runnerSettings,
    @Nullable ConfigurationPerRunnerSettings configurationPerRunnerSettings) {}
 
Example #4
Source File: PantsJUnitRunnerAndConfigurationSettings.java    From intellij-pants-plugin with Apache License 2.0 4 votes vote down vote up
@Nullable
@Override
public ConfigurationPerRunnerSettings getConfigurationSettings(@NotNull ProgramRunner runner) {
  return null;
}
 
Example #5
Source File: ExecutionEnvironment.java    From consulo with Apache License 2.0 4 votes vote down vote up
@javax.annotation.Nullable
public ConfigurationPerRunnerSettings getConfigurationSettings() {
  return myConfigurationSettings;
}
 
Example #6
Source File: ConfigurationSettingsEditor.java    From consulo with Apache License 2.0 4 votes vote down vote up
private JComponent createCompositePerRunnerSettings(final Executor executor, final ProgramRunner runner) {
  final SettingsEditor<ConfigurationPerRunnerSettings> configEditor = myConfiguration.getRunnerSettingsEditor(runner);
  SettingsEditor<RunnerSettings> runnerEditor;

  try {
    runnerEditor = runner.getSettingsEditor(executor, myConfiguration);
  }
  catch (AbstractMethodError error) {
    // this is stub code for plugin compatibility!
    runnerEditor = null;
  }

  if (configEditor == null && runnerEditor == null) return null;
  SettingsEditor<RunnerAndConfigurationSettings> wrappedConfigEditor = null;
  SettingsEditor<RunnerAndConfigurationSettings> wrappedRunEditor = null;
  if (configEditor != null) {
    wrappedConfigEditor = new SettingsEditorWrapper<RunnerAndConfigurationSettings, ConfigurationPerRunnerSettings>(configEditor,
                                                                                                                    new Convertor<RunnerAndConfigurationSettings, ConfigurationPerRunnerSettings>() {
                                                                                                                      @Override
                                                                                                                      public ConfigurationPerRunnerSettings convert(RunnerAndConfigurationSettings configurationSettings) {
                                                                                                                        return configurationSettings.getConfigurationSettings(runner);
                                                                                                                      }
                                                                                                                    });
    myRunnerEditors.add(wrappedConfigEditor);
    Disposer.register(this, wrappedConfigEditor);
  }

  if (runnerEditor != null) {
    wrappedRunEditor = new SettingsEditorWrapper<RunnerAndConfigurationSettings, RunnerSettings>(runnerEditor,
                                                                                                 new Convertor<RunnerAndConfigurationSettings, RunnerSettings>() {
                                                                                                   @Override
                                                                                                   public RunnerSettings convert(RunnerAndConfigurationSettings configurationSettings) {
                                                                                                     return configurationSettings.getRunnerSettings(runner);
                                                                                                   }
                                                                                                 });
    myRunnerEditors.add(wrappedRunEditor);
    Disposer.register(this, wrappedRunEditor);
  }

  if (wrappedRunEditor != null && wrappedConfigEditor != null) {
    JPanel panel = new JPanel(new BorderLayout());
    panel.add(wrappedConfigEditor.getComponent(), BorderLayout.CENTER);
    JComponent wrappedRunEditorComponent = wrappedRunEditor.getComponent();
    wrappedRunEditorComponent.setBorder(IdeBorderFactory.createEmptyBorder(3, 0, 0, 0));
    panel.add(wrappedRunEditorComponent, BorderLayout.SOUTH);
    return panel;
  }

  if (wrappedRunEditor != null) return wrappedRunEditor.getComponent();
  return wrappedConfigEditor.getComponent();
}