mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-23288 EA-2387 fix assertion
This commit is contained in:
@@ -37,6 +37,8 @@ import com.intellij.openapi.module.ModuleUtil;
|
||||
import com.intellij.openapi.project.IndexNotReadyException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.roots.*;
|
||||
import com.intellij.openapi.roots.impl.libraries.LibraryEx;
|
||||
import com.intellij.openapi.roots.libraries.Library;
|
||||
import com.intellij.openapi.startup.StartupManager;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
@@ -336,8 +338,9 @@ public class AndroidFacet extends Facet<AndroidFacetConfiguration> {
|
||||
AndroidPlatform platform = getConfiguration().getAndroidPlatform();
|
||||
if (platform != null) {
|
||||
final ModifiableRootModel model = ModuleRootManager.getInstance(getModule()).getModifiableModel();
|
||||
if (model.findLibraryOrderEntry(platform.getLibrary()) == null) {
|
||||
LibraryOrderEntry entry = model.addLibraryEntry(platform.getLibrary());
|
||||
Library library = platform.getLibrary();
|
||||
if (!((LibraryEx)library).isDisposed() && model.findLibraryOrderEntry(library) == null) {
|
||||
LibraryOrderEntry entry = model.addLibraryEntry(library);
|
||||
entry.setScope(DependencyScope.PROVIDED);
|
||||
}
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
|
||||
Reference in New Issue
Block a user