Search in sources :

Example 6 with ExternalSystemFacadeManager

use of com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager in project intellij-community by JetBrains.

the class ProjectRenameAware method beAware.

public static void beAware(@NotNull Project project) {
    final ExternalSystemFacadeManager facadeManager = ServiceManager.getService(ExternalSystemFacadeManager.class);
    for (ExternalSystemManager<?, ?, ?, ?, ?> manager : ExternalSystemApiUtil.getAllManagers()) {
        AbstractExternalSystemSettings settings = manager.getSettingsProvider().fun(project);
        //noinspection unchecked
        settings.subscribe(new ExternalSystemSettingsListenerAdapter() {

            @Override
            public void onProjectRenamed(@NotNull String oldName, @NotNull String newName) {
                facadeManager.onProjectRename(oldName, newName);
            }
        });
    }
}
Also used : ExternalSystemSettingsListenerAdapter(com.intellij.openapi.externalSystem.settings.ExternalSystemSettingsListenerAdapter) AbstractExternalSystemSettings(com.intellij.openapi.externalSystem.settings.AbstractExternalSystemSettings) ExternalSystemFacadeManager(com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager)

Aggregations

ExternalSystemFacadeManager (com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager)6 RemoteExternalSystemFacade (com.intellij.openapi.externalSystem.service.RemoteExternalSystemFacade)3 ExternalSystemExecutionSettings (com.intellij.openapi.externalSystem.model.settings.ExternalSystemExecutionSettings)2 RemoteExternalSystemProjectResolver (com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolver)2 RemoteExternalSystemTaskManager (com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemTaskManager)2 Project (com.intellij.openapi.project.Project)2 DataNode (com.intellij.openapi.externalSystem.model.DataNode)1 ExternalTaskPojo (com.intellij.openapi.externalSystem.model.execution.ExternalTaskPojo)1 ModuleData (com.intellij.openapi.externalSystem.model.project.ModuleData)1 ProjectData (com.intellij.openapi.externalSystem.model.project.ProjectData)1 ExternalSystemTaskId (com.intellij.openapi.externalSystem.model.task.ExternalSystemTaskId)1 ExternalSystemProgressNotificationManager (com.intellij.openapi.externalSystem.service.notification.ExternalSystemProgressNotificationManager)1 ExternalSystemProgressNotificationManagerImpl (com.intellij.openapi.externalSystem.service.remote.ExternalSystemProgressNotificationManagerImpl)1 AbstractExternalSystemSettings (com.intellij.openapi.externalSystem.settings.AbstractExternalSystemSettings)1 ExternalProjectSettings (com.intellij.openapi.externalSystem.settings.ExternalProjectSettings)1 ExternalSystemSettingsListenerAdapter (com.intellij.openapi.externalSystem.settings.ExternalSystemSettingsListenerAdapter)1 Key (com.intellij.openapi.util.Key)1 KeyFMap (com.intellij.util.keyFMap.KeyFMap)1