use of com.intellij.openapi.externalSystem.service.project.IdeModifiableModelsProviderImpl in project android by JetBrains.
the class JavaFacetModuleSetupStepTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
myModelsProvider = new IdeModifiableModelsProviderImpl(getProject());
mySetupStep = new JavaFacetModuleSetupStep();
}
use of com.intellij.openapi.externalSystem.service.project.IdeModifiableModelsProviderImpl in project android by JetBrains.
the class NdkModuleModelDataServiceTest method testGetTargetDataKey.
public void testGetTargetDataKey() {
myModelsProvider = new IdeModifiableModelsProviderImpl(getProject());
assertSame(NDK_MODEL, myDataService.getTargetDataKey());
}
use of com.intellij.openapi.externalSystem.service.project.IdeModifiableModelsProviderImpl in project android by JetBrains.
the class GradleModuleModelDataServiceTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
initMocks(this);
myModelsProvider = new IdeModifiableModelsProviderImpl(getProject());
myDataService = new GradleModuleModelDataService(myModuleSetup);
}
use of com.intellij.openapi.externalSystem.service.project.IdeModifiableModelsProviderImpl in project android by JetBrains.
the class JavaModuleModelDataServiceTest method setUp.
@Override
protected void setUp() throws Exception {
super.setUp();
initMocks(this);
myModelsProvider = new IdeModifiableModelsProviderImpl(getProject());
myDataService = new JavaModuleModelDataService(myModuleSetup);
}
use of com.intellij.openapi.externalSystem.service.project.IdeModifiableModelsProviderImpl in project android by JetBrains.
the class ModuleDisposalDataServiceTest method testImportDataWithAndroidStudioAndSuccessfulSync.
public void testImportDataWithAndroidStudioAndSuccessfulSync() {
when(myIdeInfo.isAndroidStudio()).thenReturn(true);
when(mySyncState.lastSyncFailedOrHasIssues()).thenReturn(false);
IdeaModule moduleModel = mock(IdeaModule.class);
when(moduleModel.getName()).thenReturn(getModule().getName());
ImportedModule importedModule = new ImportedModule(moduleModel);
// This module should be disposed.
Module libModule = createModule("lib");
Project project = getProject();
IdeModifiableModelsProvider modelsProvider = new IdeModifiableModelsProviderImpl(project);
Collection<DataNode<ImportedModule>> nodes = Collections.singleton(new DataNode<>(IMPORTED_MODULE, importedModule, null));
myDataService.importData(nodes, null, project, modelsProvider);
ApplicationManager.getApplication().runWriteAction(modelsProvider::dispose);
Collection<Module> modulesToDispose = Collections.singletonList(libModule);
verify(myModuleDisposer).disposeModulesAndMarkImlFilesForDeletion(modulesToDispose, getProject(), modelsProvider);
}
Aggregations