Search in sources :

Example 1 with StartupManager

use of com.intellij.openapi.startup.StartupManager in project intellij-community by JetBrains.

the class ShelvedChangesViewManager method projectOpened.

public void projectOpened() {
    StartupManager startupManager = StartupManager.getInstance(myProject);
    if (startupManager == null) {
        LOG.error("Couldn't start loading shelved changes");
        return;
    }
    startupManager.registerPostStartupActivity((DumbAwareRunnable) () -> updateChangesContent());
}
Also used : StartupManager(com.intellij.openapi.startup.StartupManager)

Example 2 with StartupManager

use of com.intellij.openapi.startup.StartupManager in project intellij-community by JetBrains.

the class ModuleVcsDetector method projectOpened.

@Override
public void projectOpened() {
    if (ApplicationManager.getApplication().isUnitTestMode())
        return;
    final StartupManager manager = StartupManager.getInstance(myProject);
    manager.registerStartupActivity(new Runnable() {

        @Override
        public void run() {
            if (myVcsManager.needAutodetectMappings()) {
                autoDetectVcsMappings(true);
            }
            myVcsManager.updateActiveVcss();
        }
    });
    manager.registerPostStartupActivity(new Runnable() {

        @Override
        public void run() {
            if (myMessageBus != null) {
                myConnection = myMessageBus.connect();
                final MyModulesListener listener = new MyModulesListener();
                myConnection.subscribe(ProjectTopics.MODULES, listener);
                myConnection.subscribe(ProjectTopics.PROJECT_ROOTS, listener);
            }
        }
    });
}
Also used : StartupManager(com.intellij.openapi.startup.StartupManager)

Example 3 with StartupManager

use of com.intellij.openapi.startup.StartupManager in project android by JetBrains.

the class ProjectSetUpTask method populateProject.

private void populateProject(@NotNull DataNode<ProjectData> projectInfo) {
    if (!myProjectIsNew && ApplicationManager.getApplication().isUnitTestMode()) {
        populate(myProject, projectInfo, mySetupRequest, mySelectModulesToImport);
        return;
    }
    StartupManager startupManager = StartupManager.getInstance(myProject);
    startupManager.runWhenProjectIsInitialized(() -> populate(myProject, projectInfo, mySetupRequest, mySelectModulesToImport));
}
Also used : StartupManager(com.intellij.openapi.startup.StartupManager)

Aggregations

StartupManager (com.intellij.openapi.startup.StartupManager)3