本文整理汇总了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;
}
示例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;
}
}
示例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);
}
示例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));
}
}
示例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);
}
示例7: JavaTestConfigurationBase
import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public JavaTestConfigurationBase(String name,
@NotNull JavaRunConfigurationModule configurationModule,
@NotNull ConfigurationFactory factory) {
super(name, configurationModule, factory);
}
示例8: getConfigurationModule
import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public JavaRunConfigurationModule getConfigurationModule() {
final JavaRunConfigurationModule configurationModule = new JavaRunConfigurationModule(getProject(), false);
configurationModule.setModule(getModule());
return configurationModule;
}
示例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;
}
示例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);
}
示例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;
}
示例12: JavaTestConfigurationBase
import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public JavaTestConfigurationBase(String name, @NotNull JavaRunConfigurationModule configurationModule, @NotNull ConfigurationFactory factory)
{
super(name, configurationModule, factory);
}
示例13: getConfigurationModule
import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public JavaRunConfigurationModule getConfigurationModule()
{
final JavaRunConfigurationModule configurationModule = new JavaRunConfigurationModule(getProject(), false);
configurationModule.setModule(getModule());
return configurationModule;
}
示例14: RemoteConfiguration
import com.intellij.execution.configurations.JavaRunConfigurationModule; //导入依赖的package包/类
public RemoteConfiguration(final Project project, ConfigurationFactory configurationFactory)
{
super(new JavaRunConfigurationModule(project, true), configurationFactory);
}