com.intellij.execution.configurations.RunConfigurationModule Java Examples

The following examples show how to use com.intellij.execution.configurations.RunConfigurationModule. 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: PantsClasspathRunConfigurationExtension.java    From intellij-pants-plugin with Apache License 2.0 5 votes vote down vote up
@Nullable
private <T extends RunConfigurationBase> Module findPantsModule(T configuration) {
  if (!(configuration instanceof ModuleBasedConfiguration)) {
    return null;
  }
  final RunConfigurationModule runConfigurationModule = ((ModuleBasedConfiguration) configuration).getConfigurationModule();
  final Module module = runConfigurationModule.getModule();
  if (module == null || !PantsUtil.isPantsModule(module)) {
    return null;
  }
  return module;
}
 
Example #2
Source File: HaxeCompiler.java    From intellij-haxe with Apache License 2.0 5 votes vote down vote up
private static int findProcessingItemIndexByModule(ProcessingItem[] items, RunConfigurationModule moduleConfiguration) {
  final Module module = moduleConfiguration.getModule();
  if (module == null || module.getModuleFile() == null) {
    return -1;
  }
  for (int i = 0; i < items.length; ++i) {
    if (module.getModuleFile().equals(items[i].getFile())) {
      return i;
    }
  }
  return -1;
}
 
Example #3
Source File: XQueryRunProfileState.java    From intellij-xquery with Apache License 2.0 5 votes vote down vote up
private void configureModule(final RunConfigurationModule runConfigurationModule,
                             final SimpleJavaParameters parameters,
                             @Nullable String jreHome) throws CantRunException {
    Module module = runConfigurationModule.getModule();
    if (module == null) {
        throw CantRunException.noModuleConfigured(runConfigurationModule.getModuleName());
    }
    configureByModule(parameters, module, createModuleJdk(module, jreHome));
}
 
Example #4
Source File: BashConfigurationType.java    From BashSupport with Apache License 2.0 4 votes vote down vote up
@NotNull
@Override
public RunConfiguration createTemplateConfiguration(@NotNull Project project) {
    return new BashRunConfiguration("", new RunConfigurationModule(project), this);
}
 
Example #5
Source File: ModuleValidator.java    From intellij-xquery with Apache License 2.0 4 votes vote down vote up
public void validate(XQueryRunConfiguration xQueryRunConfiguration) throws RuntimeConfigurationException {
    final RunConfigurationModule configurationModule = xQueryRunConfiguration.getConfigurationModule();
    ProgramParametersUtil.checkWorkingDirectoryExist(xQueryRunConfiguration, xQueryRunConfiguration.getProject(), configurationModule.getModule());
}
 
Example #6
Source File: XQueryRunProfileState.java    From intellij-xquery with Apache License 2.0 4 votes vote down vote up
private void configureJreRelatedParameters(SimpleJavaParameters parameters) throws CantRunException {
    final RunConfigurationModule module = configuration.getConfigurationModule();
    final String jreHome = configuration.isAlternativeJrePathEnabled() ? configuration.getAlternativeJrePath() : null;
    configureModule(module, parameters, jreHome);
    configureConfiguration(parameters, configuration);
}
 
Example #7
Source File: AbstractRunConfiguration.java    From consulo with Apache License 2.0 4 votes vote down vote up
public AbstractRunConfiguration(String name, RunConfigurationModule configurationModule, ConfigurationFactory factory) {
  super(name, configurationModule, factory);
}
 
Example #8
Source File: AbstractRunConfiguration.java    From consulo with Apache License 2.0 4 votes vote down vote up
public AbstractRunConfiguration(Project project, ConfigurationFactory factory) {
  super(new RunConfigurationModule(project), factory);
}