use of com.intellij.openapi.externalSystem.service.project.autoimport.ExternalSystemProjectsWatcher in project intellij-community by JetBrains.
the class ExternalProjectsManager method init.
public void init() {
synchronized (isInitialized) {
if (isInitialized.getAndSet(true))
return;
myWatcher = new ExternalSystemProjectsWatcher(myProject);
myWatcher.start();
// load external projects data
ExternalProjectsDataStorage.getInstance(myProject).load();
myRunManagerListener.attach();
// init shortcuts manager
myShortcutsManager.init();
for (ExternalSystemManager<?, ?, ?, ?, ?> systemManager : ExternalSystemApiUtil.getAllManagers()) {
final Collection<ExternalProjectInfo> externalProjects = ExternalProjectsDataStorage.getInstance(myProject).list(systemManager.getSystemId());
for (ExternalProjectInfo externalProject : externalProjects) {
if (externalProject.getExternalProjectStructure() == null)
continue;
Collection<DataNode<TaskData>> taskData = ExternalSystemApiUtil.findAllRecursively(externalProject.getExternalProjectStructure(), TASK);
myShortcutsManager.scheduleKeymapUpdate(taskData);
}
if (!externalProjects.isEmpty()) {
myShortcutsManager.scheduleRunConfigurationKeymapUpdate(systemManager.getSystemId());
}
}
// init task activation info
myTaskActivator.init();
}
}
Aggregations