获取默认JDK选择器的SDK信息
指定为项目创建模块类型为JAVA
public class HywayModuleBuilder extends ModuleBuilder {
@Override
public ModuleType<?> getModuleType() {
return StdModuleTypes.JAVA;
}
}
项目初始化时机
if (ApplicationManager.getApplication().isUnitTestMode()
|| ApplicationManager.getApplication().isHeadlessEnvironment()) {
r.run();
LOGGER.info("=============ApplicationManager.getApplication().isUnitTestMode============");
// return;
}
if (!project.isInitialized()) {
//项目已经初始化
StartupManager.getInstance(project).registerPostStartupActivity(DisposeAwareRunnable.create(r, project));;
LOGGER.info("============!project.isInitialized()=============");
//return;
}
if (DumbService.isDumbAware(r)) {
//如果是无需项目初始化后的接口
LOGGER.info("=============DumbService.isDumbAware============");
r.run();
} else {
//初始化后稍后执行
DumbService.getInstance(project).runWhenSmart(DisposeAwareRunnable.create(rS, project));
}