use of com.intellij.ide.startup.StartupManagerEx in project intellij-community by JetBrains.
the class MavenProjectsManager method initComponent.
@Override
public void initComponent() {
if (!isNormalProject())
return;
StartupManagerEx startupManager = StartupManagerEx.getInstanceEx(myProject);
startupManager.registerStartupActivity(() -> {
boolean wasMavenized = !myState.originalFiles.isEmpty();
if (!wasMavenized)
return;
initMavenized();
});
startupManager.registerPostStartupActivity(() -> {
if (!isMavenizedProject()) {
showNotificationOrphanMavenProject(myProject);
}
CompilerManager.getInstance(myProject).addBeforeTask(new CompileTask() {
@Override
public boolean execute(CompileContext context) {
AccessToken token = ReadAction.start();
try {
new MavenResourceCompilerConfigurationGenerator(myProject, myProjectsTree).generateBuildConfiguration(context.isRebuild());
} finally {
token.finish();
}
return true;
}
});
});
}
Aggregations