external system: EA-51656, check for disposable project components added

This commit is contained in:
Vladislav.Soroka
2013-11-06 11:21:37 +04:00
parent ea5159b43a
commit 7337a62b25
16 changed files with 103 additions and 72 deletions
@@ -18,6 +18,7 @@ package com.intellij.externalSystem;
import com.intellij.openapi.externalSystem.model.DataNode;
import com.intellij.openapi.externalSystem.model.Key;
import com.intellij.openapi.externalSystem.service.project.manage.ProjectDataService;
import com.intellij.openapi.externalSystem.util.DisposeAwareProjectChange;
import com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.projectRoots.JavaSdk;
@@ -105,9 +106,9 @@ public class JavaProjectDataService implements ProjectDataService<JavaProjectDat
if (languageLevelExtension.getLanguageLevel().isAtLeast(languageLevel)) {
return;
}
ExternalSystemApiUtil.executeProjectChangeAction(synchronous, new Runnable() {
ExternalSystemApiUtil.executeProjectChangeAction(synchronous, new DisposeAwareProjectChange(project) {
@Override
public void run() {
public void execute() {
languageLevelExtension.setLanguageLevel(languageLevel);
}
});