当前位置: 首页>>代码示例>>Java>>正文


Java JavaRunConfigurationModule类代码示例

本文整理汇总了Java中com.intellij.execution.configurations.JavaRunConfigurationModule的典型用法代码示例。如果您正苦于以下问题:Java JavaRunConfigurationModule类的具体用法?Java JavaRunConfigurationModule怎么用?Java JavaRunConfigurationModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


JavaRunConfigurationModule类属于com.intellij.execution.configurations包,在下文中一共展示了JavaRunConfigurationModule类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createJavaParameters

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
@Override
protected JavaParameters createJavaParameters() throws ExecutionException {
    final JavaParameters params = new JavaParameters();
    final JavaRunConfigurationModule module = myConfiguration.getConfigurationModule();
    final String jreHome = myConfiguration.isAlternativeJrePathEnabled() ? myConfiguration.getAlternativeJrePath() : null;
    final int classPathType = JavaParametersUtil.getClasspathType(module,
            PageObjectRunConfig.MAIN_CLASS_NAME,
            false);

    JavaParametersUtil.configureModule(module, params, classPathType, jreHome);
    params.setJdk(JavaParametersUtil.createProjectJdk(myConfiguration.getProject(), jreHome));
    params.setMainClass(PageObjectRunConfig.MAIN_CLASS_NAME);
    params.getProgramParametersList().add(EvaluationConfig.from(myConfiguration).toArgs());
    params.getClassPath().add(PathUtil.getJarPathForClass(RunPageObjectMain.class));
    params.getClassPath().add(PathUtil.getJarPathForClass(Logger.class));
    setupJavaParameters(params);

    return params;
}
 
开发者ID:bjorm,项目名称:PageObjectEvaluator,代码行数:20,代码来源:PageObjectRunState.java

示例2: getGeneratedName

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public String getGeneratedName(JavaRunConfigurationModule runconfigurationmodule) {
  if (TestType.PACKAGE.getType().equals(TEST_OBJECT)) if (getPackageName().length() == 0) return "<default>";
  else return getPackageName();
  String name = JavaExecutionUtil.getPresentableClassName(getMainClassName(), runconfigurationmodule);
  if (TestType.METHOD.getType().equals(TEST_OBJECT)) {
    return name + '.' + getMethodName();
  }
  else if (TestType.SUITE.getType().equals(TEST_OBJECT)) {
    return getSuiteName();
  }
  else {
    if (TestType.PATTERN.getType().equals(TEST_OBJECT)) {
      final int size = myPatterns.size();
      if (size == 0) return "Temp suite";
      return StringUtil.getShortName(myPatterns.iterator().next()) + (size > 1 ? " and " + (size - 1) + " more" : "");
    }
    return name;
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:TestData.java

示例3: checkConfiguration

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
@Override
public void checkConfiguration() throws RuntimeConfigurationException {
  JavaParametersUtil.checkAlternativeJRE(getConfiguration());
  ProgramParametersUtil.checkWorkingDirectoryExist(
    getConfiguration(), getConfiguration().getProject(), getConfiguration().getConfigurationModule().getModule());
  final String category = getConfiguration().getPersistentData().getCategory();
  if (category == null || category.isEmpty()) {
    throw new RuntimeConfigurationError("Category is not specified");
  }
  final JavaRunConfigurationModule configurationModule = getConfiguration().getConfigurationModule();
  if (getSourceScope() == null) {
    configurationModule.checkForWarning();
  }
  configurationModule.findNotNullClass(category);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:TestCategory.java

示例4: checkJavaSettings

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
/**
 * Validates if the Java Settings are Entered Correctly
 *
 * @param configuration
 * @throws RuntimeConfigurationException
 */
public static void checkJavaSettings(EmbeddedLinuxJVMRunConfiguration configuration) throws RuntimeConfigurationException {
    JavaRunConfigurationModule javaRunConfigurationModule = new JavaRunConfigurationModule(configuration.getProject(), false);
    PsiClass psiClass = javaRunConfigurationModule.findClass(configuration.getRunnerParameters().getMainclass());
    if (psiClass == null) {
        throw new RuntimeConfigurationWarning(ExecutionBundle.message("main.method.not.found.in.class.error.message", configuration.getRunnerParameters().getMainclass()));
    }
}
 
开发者ID:asebak,项目名称:embeddedlinux-jvmdebugger-intellij,代码行数:14,代码来源:EmbeddedLinuxJVMRunnerValidator.java

示例5: checkConfiguration

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public void checkConfiguration() throws RuntimeConfigurationException {
  super.checkConfiguration();
  final String testClassName = myConfiguration.getPersistentData().getMainClassName();
  final JavaRunConfigurationModule configurationModule = myConfiguration.getConfigurationModule();
  final PsiClass testClass = configurationModule.checkModuleAndClassName(testClassName, ExecutionBundle.message("no.test.class.specified.error.text"));
  if (!JUnitUtil.isTestClass(testClass)) {
    throw new RuntimeConfigurationWarning(ExecutionBundle.message("class.isnt.test.class.error.message", testClassName));
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:10,代码来源:TestClass.java

示例6: getPresentableClassName

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
/**
 * {@link JavaExecutionUtil#getPresentableClassName(java.lang.String)}
 */
@DeprecationInfo("Use JavaExecutionUtil#getPresentableClassName(java.lang.String)")
@Deprecated
@Nullable
public static String getPresentableClassName(final String rtClassName, final JavaRunConfigurationModule configurationModule)
{
	return getPresentableClassName(rtClassName);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:11,代码来源:JavaExecutionUtil.java

示例7: JavaTestConfigurationBase

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public JavaTestConfigurationBase(String name,
                                 @NotNull JavaRunConfigurationModule configurationModule,
                                 @NotNull ConfigurationFactory factory) {
  super(name, configurationModule, factory);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:JavaTestConfigurationBase.java

示例8: getConfigurationModule

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public JavaRunConfigurationModule getConfigurationModule() {
  final JavaRunConfigurationModule configurationModule = new JavaRunConfigurationModule(getProject(), false);
  configurationModule.setModule(getModule());
  return configurationModule;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ConfigurationModuleSelector.java

示例9: getConfigurationModule

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public JavaRunConfigurationModule getConfigurationModule() {
  final JavaRunConfigurationModule configurationModule = new JavaRunConfigurationModule(getProject(), false);
  configurationModule.setModule((Module)myModules.getSelectedItem());
  return configurationModule;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:6,代码来源:ConfigurationModuleSelector.java

示例10: JarApplicationConfiguration

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public JarApplicationConfiguration(Project project, ConfigurationFactory factory, String name)
{
	super(project, factory, name);
	myConfigurationModule = new JavaRunConfigurationModule(project, true);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:6,代码来源:JarApplicationConfiguration.java

示例11: tryWithAnotherModule

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public static <T extends ModuleBasedConfiguration<JavaRunConfigurationModule> & CommonJavaRunConfigurationParameters> boolean tryWithAnotherModule(T configuration, boolean isDebug)
{
	final String packageName = configuration.getPackage();
	if(packageName == null)
	{
		return false;
	}
	final Project project = configuration.getProject();
	final PsiJavaPackage aPackage = JavaPsiFacade.getInstance(project).findPackage(packageName);
	if(aPackage == null)
	{
		return false;
	}
	final Module module = configuration.getConfigurationModule().getModule();
	if(module == null)
	{
		return false;
	}
	final Set<Module> modulesWithPackage = new HashSet<>();
	final PsiDirectory[] directories = aPackage.getDirectories();
	for(PsiDirectory directory : directories)
	{
		final Module currentModule = ModuleUtilCore.findModuleForFile(directory.getVirtualFile(), project);
		if(module != currentModule && currentModule != null)
		{
			modulesWithPackage.add(currentModule);
		}
	}
	if(!modulesWithPackage.isEmpty())
	{
		final String testRunDebugId = isDebug ? ToolWindowId.DEBUG : ToolWindowId.RUN;
		final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
		final Function<Module, String> moduleNameRef = module1 ->
		{
			final String moduleName = module1.getName();
			return "<a href=\"" + moduleName + "\">" + moduleName + "</a>";
		};
		String message = "Tests were not found in module \"" + module.getName() + "\".\n" + "Use ";
		if(modulesWithPackage.size() == 1)
		{
			message += "module \"" + moduleNameRef.fun(modulesWithPackage.iterator().next()) + "\" ";
		}
		else
		{
			message += "one of\n" + StringUtil.join(modulesWithPackage, moduleNameRef, "\n") + "\n";
		}
		message += "instead";
		toolWindowManager.notifyByBalloon(testRunDebugId, MessageType.WARNING, message, null, new ResetConfigurationModuleAdapter(configuration, project, isDebug, toolWindowManager,
				testRunDebugId));
		return true;
	}
	return false;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:54,代码来源:ResetConfigurationModuleAdapter.java

示例12: JavaTestConfigurationBase

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public JavaTestConfigurationBase(String name, @NotNull JavaRunConfigurationModule configurationModule, @NotNull ConfigurationFactory factory)
{
	super(name, configurationModule, factory);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:5,代码来源:JavaTestConfigurationBase.java

示例13: getConfigurationModule

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public JavaRunConfigurationModule getConfigurationModule()
{
	final JavaRunConfigurationModule configurationModule = new JavaRunConfigurationModule(getProject(), false);
	configurationModule.setModule(getModule());
	return configurationModule;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:7,代码来源:ConfigurationModuleSelector.java

示例14: RemoteConfiguration

import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public RemoteConfiguration(final Project project, ConfigurationFactory configurationFactory)
{
	super(new JavaRunConfigurationModule(project, true), configurationFactory);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:5,代码来源:RemoteConfiguration.java


注:本文中的com.intellij.execution.configurations.JavaRunConfigurationModule类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。