Search in sources :

Example 6 with ExternalSystemSettingsListenerAdapter

use of com.intellij.openapi.externalSystem.settings.ExternalSystemSettingsListenerAdapter in project intellij-community by JetBrains.

the class GradleImportingTestCase method importProject.

@Override
protected void importProject() {
    ExternalSystemApiUtil.subscribe(myProject, GradleConstants.SYSTEM_ID, new ExternalSystemSettingsListenerAdapter() {

        @Override
        public void onProjectsLinked(@NotNull Collection settings) {
            final Object item = ContainerUtil.getFirstItem(settings);
            if (item instanceof GradleProjectSettings) {
                ((GradleProjectSettings) item).setGradleJvm(GRADLE_JDK_NAME);
            }
        }
    });
    super.importProject();
}
Also used : ExternalSystemSettingsListenerAdapter(com.intellij.openapi.externalSystem.settings.ExternalSystemSettingsListenerAdapter) GradleProjectSettings(org.jetbrains.plugins.gradle.settings.GradleProjectSettings) Collection(java.util.Collection)

Aggregations

ExternalSystemSettingsListenerAdapter (com.intellij.openapi.externalSystem.settings.ExternalSystemSettingsListenerAdapter)6 AbstractExternalSystemSettings (com.intellij.openapi.externalSystem.settings.AbstractExternalSystemSettings)3 Collection (java.util.Collection)3 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 com.intellij.execution (com.intellij.execution)1 TreeState (com.intellij.ide.util.treeView.TreeState)1 NotificationGroup (com.intellij.notification.NotificationGroup)1 Disposable (com.intellij.openapi.Disposable)1 com.intellij.openapi.actionSystem (com.intellij.openapi.actionSystem)1 ApplicationManager (com.intellij.openapi.application.ApplicationManager)1 ModalityState (com.intellij.openapi.application.ModalityState)1 Logger (com.intellij.openapi.diagnostic.Logger)1 ExternalSystemUiAware (com.intellij.openapi.externalSystem.ExternalSystemUiAware)1 ExternalSystemActionUtil (com.intellij.openapi.externalSystem.action.ExternalSystemActionUtil)1 ExternalSystemViewGearAction (com.intellij.openapi.externalSystem.action.ExternalSystemViewGearAction)1 com.intellij.openapi.externalSystem.model (com.intellij.openapi.externalSystem.model)1 ExternalTaskExecutionInfo (com.intellij.openapi.externalSystem.model.execution.ExternalTaskExecutionInfo)1 ProjectData (com.intellij.openapi.externalSystem.model.project.ProjectData)1 TaskData (com.intellij.openapi.externalSystem.model.task.TaskData)1 ExternalSystemFacadeManager (com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager)1