Search in sources :

Example 1 with ClassJarProvider

use of com.android.tools.idea.model.ClassJarProvider in project intellij by bazelbuild.

the class BlazeClassJarProviderIntegrationTest method doSetup.

@Before
public void doSetup() {
    module = testFixture.getModule();
    ArtifactLocationDecoder decoder = (location) -> new File("/src", location.getExecutionRootRelativePath());
    BlazeProjectData blazeProjectData = MockBlazeProjectDataBuilder.builder(workspaceRoot).setTargetMap(buildTargetMap()).setArtifactLocationDecoder(decoder).build();
    registerProjectService(BlazeProjectDataManager.class, new MockBlazeProjectDataManager(blazeProjectData));
    classJarProvider = new BlazeClassJarProvider(getProject());
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) LibraryArtifact(com.google.idea.blaze.base.ideinfo.LibraryArtifact) RunWith(org.junit.runner.RunWith) ClassJarProvider(com.android.tools.idea.model.ClassJarProvider) AndroidIntegrationTestSetupRule(com.google.idea.blaze.android.AndroidIntegrationTestSetupRule) JavaIdeInfo(com.google.idea.blaze.base.ideinfo.JavaIdeInfo) MockBlazeProjectDataManager(com.google.idea.blaze.base.model.MockBlazeProjectDataManager) AndroidIdeInfo(com.google.idea.blaze.base.ideinfo.AndroidIdeInfo) Kind(com.google.idea.blaze.base.model.primitives.Kind) BlazeIntegrationTestCase(com.google.idea.blaze.base.BlazeIntegrationTestCase) BlazeProjectData(com.google.idea.blaze.base.model.BlazeProjectData) ModifiableFacetModel(com.intellij.facet.ModifiableFacetModel) AppResourceRepository(com.android.tools.idea.res.AppResourceRepository) TargetIdeInfo(com.google.idea.blaze.base.ideinfo.TargetIdeInfo) MockBlazeProjectDataBuilder(com.google.idea.blaze.base.model.MockBlazeProjectDataBuilder) Module(com.intellij.openapi.module.Module) Before(org.junit.Before) AndroidResourceModuleRegistry(com.google.idea.blaze.android.sync.model.AndroidResourceModuleRegistry) ResourceClassRegistry(com.android.tools.idea.res.ResourceClassRegistry) AndroidResourceModule(com.google.idea.blaze.android.sync.model.AndroidResourceModule) ArtifactLocation(com.google.idea.blaze.base.ideinfo.ArtifactLocation) VfsUtilCore(com.intellij.openapi.vfs.VfsUtilCore) IOException(java.io.IOException) AndroidFacet(org.jetbrains.android.facet.AndroidFacet) Test(org.junit.Test) JUnit4(org.junit.runners.JUnit4) Truth.assertThat(com.google.common.truth.Truth.assertThat) FacetManager(com.intellij.facet.FacetManager) AndroidFacetConfiguration(org.jetbrains.android.facet.AndroidFacetConfiguration) BlazeProjectDataManager(com.google.idea.blaze.base.sync.data.BlazeProjectDataManager) File(java.io.File) List(java.util.List) Rule(org.junit.Rule) Label(com.google.idea.blaze.base.model.primitives.Label) ApplicationManager(com.intellij.openapi.application.ApplicationManager) TargetKey(com.google.idea.blaze.base.ideinfo.TargetKey) ArtifactLocationDecoder(com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder) TargetMap(com.google.idea.blaze.base.ideinfo.TargetMap) TargetMapBuilder(com.google.idea.blaze.base.ideinfo.TargetMapBuilder) Mockito.mock(org.mockito.Mockito.mock) BlazeProjectData(com.google.idea.blaze.base.model.BlazeProjectData) ArtifactLocationDecoder(com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File) MockBlazeProjectDataManager(com.google.idea.blaze.base.model.MockBlazeProjectDataManager) Before(org.junit.Before)

Aggregations

ClassJarProvider (com.android.tools.idea.model.ClassJarProvider)1 AppResourceRepository (com.android.tools.idea.res.AppResourceRepository)1 ResourceClassRegistry (com.android.tools.idea.res.ResourceClassRegistry)1 Truth.assertThat (com.google.common.truth.Truth.assertThat)1 AndroidIntegrationTestSetupRule (com.google.idea.blaze.android.AndroidIntegrationTestSetupRule)1 AndroidResourceModule (com.google.idea.blaze.android.sync.model.AndroidResourceModule)1 AndroidResourceModuleRegistry (com.google.idea.blaze.android.sync.model.AndroidResourceModuleRegistry)1 BlazeIntegrationTestCase (com.google.idea.blaze.base.BlazeIntegrationTestCase)1 AndroidIdeInfo (com.google.idea.blaze.base.ideinfo.AndroidIdeInfo)1 ArtifactLocation (com.google.idea.blaze.base.ideinfo.ArtifactLocation)1 JavaIdeInfo (com.google.idea.blaze.base.ideinfo.JavaIdeInfo)1 LibraryArtifact (com.google.idea.blaze.base.ideinfo.LibraryArtifact)1 TargetIdeInfo (com.google.idea.blaze.base.ideinfo.TargetIdeInfo)1 TargetKey (com.google.idea.blaze.base.ideinfo.TargetKey)1 TargetMap (com.google.idea.blaze.base.ideinfo.TargetMap)1 TargetMapBuilder (com.google.idea.blaze.base.ideinfo.TargetMapBuilder)1 BlazeProjectData (com.google.idea.blaze.base.model.BlazeProjectData)1 MockBlazeProjectDataBuilder (com.google.idea.blaze.base.model.MockBlazeProjectDataBuilder)1 MockBlazeProjectDataManager (com.google.idea.blaze.base.model.MockBlazeProjectDataManager)1 Kind (com.google.idea.blaze.base.model.primitives.Kind)1