本文整理汇总了Java中com.intellij.execution.application.ApplicationConfigurationType类的典型用法代码示例。如果您正苦于以下问题:Java ApplicationConfigurationType类的具体用法?Java ApplicationConfigurationType怎么用?Java ApplicationConfigurationType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ApplicationConfigurationType类属于com.intellij.execution.application包,在下文中一共展示了ApplicationConfigurationType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: isConfigurationFromContext
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
@Override
public boolean isConfigurationFromContext(JavaScratchConfiguration configuration, ConfigurationContext context) {
final PsiElement location = context.getPsiLocation();
final PsiClass aClass = ApplicationConfigurationType.getMainClass(location);
if (aClass != null && Comparing.equal(JavaExecutionUtil.getRuntimeQualifiedName(aClass), configuration.MAIN_CLASS_NAME)) {
// for scratches it is enough to check that the configuration is associated with the same scratch file
final VirtualFile scratchFile = configuration.getScratchVirtualFile();
if (scratchFile != null) {
final PsiFile containingFile = aClass.getContainingFile();
if (containingFile != null && scratchFile.equals(containingFile.getVirtualFile())) {
return true;
}
}
}
return false;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:JavaScratchConfigurationProducer.java
示例2: testRunApplicationName
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
public void testRunApplicationName() {
ApplicationConfiguration configuration = new ApplicationConfiguration(null, getProject(), ApplicationConfigurationType.getInstance());
configuration.MAIN_CLASS_NAME = "com.comp.AClass";
configuration.setGeneratedName();
checkSuggestedName("AClass.main()", configuration);
configuration.setName("Other name");
configuration.setNameChangedByUser(true);
checkSuggestedName("Other name", configuration);
configuration.setName("1234567890123456789012345 other long name");
checkSuggestedName("12345678901234567890...", configuration);
configuration.MAIN_CLASS_NAME = "com.comp.A12345678901234567890123LongName";
configuration.setGeneratedName();
checkSuggestedName("A1234567890123....main()", configuration);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:BaseRunConfigurationActionTest.java
示例3: testCreatingApplicationConfiguration
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
public void testCreatingApplicationConfiguration() throws ConfigurationException {
if (PlatformTestUtil.COVERAGE_ENABLED_BUILD) return;
ApplicationConfiguration configuration = new ApplicationConfiguration(null, myProject, ApplicationConfigurationType.getInstance());
ApplicationConfigurable editor = new ApplicationConfigurable(myProject);
try {
editor.getComponent(); // To get all the watchers installed.
Configurable configurable = new RunConfigurationConfigurableAdapter(editor, configuration);
configurable.reset();
CommonJavaParametersPanel javaParameters = editor.getCommonProgramParameters();
javaParameters.setProgramParameters("prg");
javaParameters.setVMParameters("vm");
javaParameters.setWorkingDirectory("dir");
assertTrue(configurable.isModified());
configurable.apply();
assertEquals("prg", configuration.getProgramParameters());
assertEquals("vm", configuration.getVMParameters());
assertEquals("dir", configuration.getWorkingDirectory());
}
finally {
Disposer.dispose(editor);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:ConfigurationsTest.java
示例4: getMainClass
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
@Nullable
private static PsiClass getMainClass(ConfigurationContext context) {
Location location = context.getLocation();
if (location == null) {
return null;
}
location = JavaExecutionUtil.stepIntoSingleClass(location);
if (location == null) {
return null;
}
PsiElement element = location.getPsiElement();
if (!element.isPhysical()) {
return null;
}
return ApplicationConfigurationType.getMainClass(element);
}
开发者ID:bazelbuild,项目名称:intellij,代码行数:17,代码来源:BlazeJavaMainClassRunConfigurationProducer.java
示例5: findMainClass
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
@Nullable
public static PsiClass findMainClass(@NotNull final PsiElement element) {
PsiMethod method = findMainMethod(element);
while(method != null) {
final PsiClass cls = method.getContainingClass();
if(ConfigurationUtil.MAIN_CLASS.value(cls)) {
return cls;
}
method = findMainMethod(method.getParent());
}
return ApplicationConfigurationType.getMainClass(element);
}
开发者ID:defrac,项目名称:defrac-plugin-intellij,代码行数:17,代码来源:DefracRunUtil.java
示例6: testCreatingApplicationConfiguration
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
public void testCreatingApplicationConfiguration() throws ConfigurationException {
if (IdeaTestUtil.COVERAGE_ENABLED_BUILD) return;
ApplicationConfiguration configuration = new ApplicationConfiguration(null, myProject, ApplicationConfigurationType.getInstance());
ApplicationConfigurable editor = new ApplicationConfigurable(myProject);
try {
editor.getComponent(); // To get all the watchers installed.
Configurable configurable = new RunConfigurationConfigurableAdapter(editor, configuration);
configurable.reset();
CommonJavaParametersPanel javaParameters = editor.getCommonProgramParameters();
javaParameters.setProgramParameters("prg");
javaParameters.setVMParameters("vm");
javaParameters.setWorkingDirectory("dir");
assertTrue(configurable.isModified());
configurable.apply();
assertEquals("prg", configuration.getProgramParameters());
assertEquals("vm", configuration.getVMParameters());
assertEquals("dir", configuration.getWorkingDirectory());
}
finally {
Disposer.dispose(editor);
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:24,代码来源:ConfigurationsTest.java
示例7: testRunThirdPartyApplication
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
public void testRunThirdPartyApplication() throws ExecutionException {
ApplicationConfiguration configuration =
new ApplicationConfiguration("Third party", myProject, ApplicationConfigurationType.getInstance());
configuration.setModule(getModule1());
configuration.MAIN_CLASS_NAME = "third.party.Main";
checkCanRun(configuration);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:ConfigurationsTest.java
示例8: createRunManager
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
private static RunManagerImpl createRunManager(Element element) throws InvalidDataException {
Project project = getProject();
RunManagerImpl runManager = new RunManagerImpl(project, PropertiesComponent.getInstance(project));
runManager.initializeConfigurationTypes(new ConfigurationType[]{ApplicationConfigurationType.getInstance(),
JUnitConfigurationType.getInstance(), UnknownConfigurationType.INSTANCE});
runManager.loadState(element);
return runManager;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:RunConfigurableTest.java
示例9: createApplicationConfiguration
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
protected ApplicationConfiguration createApplicationConfiguration(String className, Module module) {
final ApplicationConfiguration configuration =
new ApplicationConfiguration("app", getProject(), ApplicationConfigurationType.getInstance());
configuration.setModule(module);
configuration.setMainClassName(className);
return configuration;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:GroovyCompilerTestCase.java
示例10: findEntryPoint
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
@Nullable
public static PsiElement findEntryPoint(@Nullable final Location location, @Nullable final Module module) {
if(location == null || module == null) {
return null;
}
final Location classLocation = JavaExecutionUtil.stepIntoSingleClass(location);
if(classLocation == null) {
return null;
}
final PsiElement element = classLocation.getPsiElement();
if(!element.isPhysical()) {
return null;
}
final DefracFacet facet = DefracFacet.getInstance(element);
if(facet == null || !facet.getPlatform().isAvailableOnHostOS() || facet.getPlatform().isGeneric()) {
return null;
}
if(facet.getPlatform().isAndroid()) {
return findActivityClass(module, element);
}
final PsiElement method = findMainMethod(element);
if(method != null) {
return method;
}
return ApplicationConfigurationType.getMainClass(element);
}
开发者ID:defrac,项目名称:defrac-plugin-intellij,代码行数:37,代码来源:DefracRunUtil.java
示例11: buildApplicationConfiguration
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
private ApplicationConfiguration buildApplicationConfiguration() {
SilentApplicationConfiguration config =
new SilentApplicationConfiguration(XMLBEANS_COMPILER_CLASS_FQN, module.getProject(), ApplicationConfigurationType.getInstance());
config.setWorkingDirectory(resolvePath(configuration.getSourcesDirectory()));
config.setMainClassName(XMLBEANS_COMPILER_CLASS_FQN);
config.setModule(module);
String programParameters = getProgramParameters();
config.setProgramParameters(programParameters);
return config;
}
开发者ID:bsblabs,项目名称:intellij-xmlbeans-plugin,代码行数:11,代码来源:XmlBeansCompiler.java
示例12: testRunThridPartyApplication
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
public void testRunThridPartyApplication() throws ExecutionException {
ApplicationConfiguration configuration =
new ApplicationConfiguration("Thrid party", myProject, ApplicationConfigurationType.getInstance());
configuration.setModule(getModule1());
configuration.MAIN_CLASS_NAME = "thrid.party.Main";
checkCanRun(configuration);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:8,代码来源:ConfigurationsTest.java
示例13: createRunManager
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
private static RunManagerImpl createRunManager(Element element) throws InvalidDataException {
RunManagerImpl runManager = new RunManagerImpl(getProject(), PropertiesComponent.getInstance());
runManager.initializeConfigurationTypes(new ConfigurationType[]{ApplicationConfigurationType.getInstance(),
JUnitConfigurationType.getInstance(), UnknownConfigurationType.INSTANCE});
runManager.initComponent();
runManager.readExternal(element);
return runManager;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:RunConfigurableTest.java
示例14: GaugeRunConfiguration
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
public GaugeRunConfiguration(String name, Project project, ConfigurationFactoryEx configurationFactory) {
super(project, configurationFactory, name);
this.programParameters = new ApplicationConfiguration(name, project, ApplicationConfigurationType.getInstance());
}
开发者ID:getgauge,项目名称:Intellij-Plugin,代码行数:5,代码来源:GaugeRunConfiguration.java
示例15: SilentApplicationConfiguration
import com.intellij.execution.application.ApplicationConfigurationType; //导入依赖的package包/类
public SilentApplicationConfiguration(String name, Project project, ApplicationConfigurationType applicationConfigurationType) {
super(name, project, applicationConfigurationType);
}
开发者ID:bsblabs,项目名称:intellij-xmlbeans-plugin,代码行数:4,代码来源:SilentApplicationConfiguration.java
注:本文中的com.intellij.execution.application.ApplicationConfigurationType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论