Search in sources :

Example 6 with TargetMap

use of com.google.idea.blaze.base.ideinfo.TargetMap in project intellij by bazelbuild.

the class BlazeRenderErrorContributorTest method createTargetMapWithNonStandardAndroidManifestName.

private void createTargetMapWithNonStandardAndroidManifestName() {
    Label mainResourceTarget = Label.create("//com/google/example:main");
    ArtifactLocation mainManifest = artifact("com/google/example/main/WeirdManifest.xml", true);
    ArtifactLocation mainResource = artifact("com/google/example/main/res", true);
    ArtifactLocation mainBuildFile = artifact("com/google/example/main/BUILD", true);
    AndroidResourceModuleRegistry registry = AndroidResourceModuleRegistry.getInstance(project);
    registry.put(module, AndroidResourceModule.builder(TargetKey.forPlainTarget(mainResourceTarget)).addResource(mainResource).build());
    TargetMap targetMap = TargetMapBuilder.builder().addTarget(TargetIdeInfo.builder().setLabel(mainResourceTarget).setBuildFile(mainBuildFile).setAndroidInfo(AndroidIdeInfo.builder().setGenerateResourceClass(true).setManifestFile(mainManifest).addResource(mainResource))).build();
    projectDataManager.setTargetMap(targetMap);
}
Also used : Label(com.google.idea.blaze.base.model.primitives.Label) ArtifactLocation(com.google.idea.blaze.base.ideinfo.ArtifactLocation) AndroidResourceModuleRegistry(com.google.idea.blaze.android.sync.model.AndroidResourceModuleRegistry) SourceToTargetMap(com.google.idea.blaze.base.targetmaps.SourceToTargetMap) TargetMap(com.google.idea.blaze.base.ideinfo.TargetMap)

Example 7 with TargetMap

use of com.google.idea.blaze.base.ideinfo.TargetMap in project intellij by bazelbuild.

the class BlazeRenderErrorContributorTest method createTargetMapWithGeneratedResources.

private void createTargetMapWithGeneratedResources() {
    Label mainResourcesTarget = Label.create("//com/google/example:main");
    Label dependencyGeneratedResourceTarget = Label.create("//com/google/example:generated");
    Label dependencySourceResourceTarget = Label.create("//com/google/example:source");
    Label transitiveGeneratedResourcesTarget = Label.create("//com/google/example/transitive:generated");
    Label transitiveSourceResourceTarget = Label.create("//com/google/example/transitive:source");
    Label unrelatedGeneratedResourceTarget = Label.create("//com/google/unrelated:generated");
    Label unrelatedSourceResourceTarget = Label.create("//com/google/unrelated:source");
    ArtifactLocation mainGeneratedResource = artifact("com/google/example/main/generated/res", false);
    ArtifactLocation mainSourceResource = artifact("com/google/example/main/source/res", true);
    ArtifactLocation dependencyGeneratedResource = artifact("com/google/example/dependency/generated/res", false);
    ArtifactLocation dependencySourceResource = artifact("com/google/example/dependency/source/res", true);
    ArtifactLocation transitiveGeneratedResourceOne = artifact("com/google/example/transitive/generated/one/res", false);
    ArtifactLocation transitiveGeneratedResourceTwo = artifact("com/google/example/transitive/generated/two/res", false);
    ArtifactLocation transitiveSourceResource = artifact("com/google/example/transitive/source/res", true);
    ArtifactLocation unrelatedGeneratedResource = artifact("com/google/unrelated/generated/res", false);
    ArtifactLocation unrelatedSourceResource = artifact("com/google/unrelated/source/res", true);
    ArtifactLocation mainBuildFile = artifact("com/google/example/main/BUILD", true);
    ArtifactLocation dependencyBuildFile = artifact("com/google/example/dependency/BUILD", true);
    ArtifactLocation transitiveBuildFile = artifact("com/google/example/transitive/BUILD", true);
    ArtifactLocation unrelatedBuildFile = artifact("com/google/unrelated/BUILD", true);
    AndroidResourceModuleRegistry registry = AndroidResourceModuleRegistry.getInstance(project);
    registry.put(module, AndroidResourceModule.builder(TargetKey.forPlainTarget(mainResourcesTarget)).addResource(mainSourceResource).addTransitiveResourceDependency(dependencyGeneratedResourceTarget).addTransitiveResource(dependencyGeneratedResource).addTransitiveResourceDependency(dependencySourceResourceTarget).addTransitiveResource(dependencySourceResource).addTransitiveResourceDependency(transitiveGeneratedResourcesTarget).addTransitiveResource(transitiveGeneratedResourceOne).addTransitiveResource(transitiveGeneratedResourceTwo).addTransitiveResourceDependency(transitiveSourceResourceTarget).addTransitiveResource(transitiveSourceResource).build());
    // Not using these, but they should be in the registry.
    registry.put(mock(Module.class), AndroidResourceModule.builder(TargetKey.forPlainTarget(dependencyGeneratedResourceTarget)).addTransitiveResourceDependency(transitiveSourceResourceTarget).addTransitiveResource(transitiveSourceResource).build());
    registry.put(mock(Module.class), AndroidResourceModule.builder(TargetKey.forPlainTarget(dependencySourceResourceTarget)).addResource(dependencySourceResource).addTransitiveResourceDependency(transitiveGeneratedResourcesTarget).addTransitiveResource(transitiveGeneratedResourceOne).addTransitiveResource(transitiveGeneratedResourceTwo).build());
    registry.put(mock(Module.class), AndroidResourceModule.builder(TargetKey.forPlainTarget(transitiveGeneratedResourcesTarget)).build());
    registry.put(mock(Module.class), AndroidResourceModule.builder(TargetKey.forPlainTarget(transitiveSourceResourceTarget)).addResource(transitiveSourceResource).build());
    registry.put(mock(Module.class), AndroidResourceModule.builder(TargetKey.forPlainTarget(unrelatedGeneratedResourceTarget)).build());
    registry.put(mock(Module.class), AndroidResourceModule.builder(TargetKey.forPlainTarget(unrelatedSourceResourceTarget)).addResource(unrelatedSourceResource).build());
    TargetMap targetMap = TargetMapBuilder.builder().addTarget(TargetIdeInfo.builder().setLabel(mainResourcesTarget).setBuildFile(mainBuildFile).setAndroidInfo(AndroidIdeInfo.builder().setGenerateResourceClass(true).addResource(mainGeneratedResource).addResource(mainSourceResource)).addDependency(dependencyGeneratedResourceTarget).addDependency(dependencySourceResourceTarget)).addTarget(TargetIdeInfo.builder().setLabel(dependencyGeneratedResourceTarget).setBuildFile(dependencyBuildFile).setAndroidInfo(AndroidIdeInfo.builder().setGenerateResourceClass(true).addResource(dependencyGeneratedResource)).addDependency(transitiveSourceResourceTarget)).addTarget(TargetIdeInfo.builder().setLabel(dependencySourceResourceTarget).setBuildFile(dependencyBuildFile).setAndroidInfo(AndroidIdeInfo.builder().setGenerateResourceClass(true).addResource(dependencySourceResource)).addDependency(transitiveGeneratedResourcesTarget)).addTarget(TargetIdeInfo.builder().setLabel(transitiveGeneratedResourcesTarget).setBuildFile(transitiveBuildFile).setAndroidInfo(AndroidIdeInfo.builder().setGenerateResourceClass(true).addResource(transitiveGeneratedResourceOne).addResource(transitiveGeneratedResourceTwo))).addTarget(TargetIdeInfo.builder().setLabel(transitiveSourceResourceTarget).setBuildFile(transitiveBuildFile).setAndroidInfo(AndroidIdeInfo.builder().setGenerateResourceClass(true).addResource(transitiveSourceResource))).addTarget(TargetIdeInfo.builder().setLabel(unrelatedGeneratedResourceTarget).setBuildFile(unrelatedBuildFile).setAndroidInfo(AndroidIdeInfo.builder().setGenerateResourceClass(true).addResource(unrelatedGeneratedResource))).addTarget(TargetIdeInfo.builder().setLabel(unrelatedSourceResourceTarget).setBuildFile(unrelatedBuildFile).setAndroidInfo(AndroidIdeInfo.builder().setGenerateResourceClass(true).addResource(unrelatedSourceResource))).build();
    projectDataManager.setTargetMap(targetMap);
}
Also used : Label(com.google.idea.blaze.base.model.primitives.Label) ArtifactLocation(com.google.idea.blaze.base.ideinfo.ArtifactLocation) AndroidResourceModuleRegistry(com.google.idea.blaze.android.sync.model.AndroidResourceModuleRegistry) MockModule(com.intellij.mock.MockModule) Module(com.intellij.openapi.module.Module) AndroidResourceModule(com.google.idea.blaze.android.sync.model.AndroidResourceModule) SourceToTargetMap(com.google.idea.blaze.base.targetmaps.SourceToTargetMap) TargetMap(com.google.idea.blaze.base.ideinfo.TargetMap)

Example 8 with TargetMap

use of com.google.idea.blaze.base.ideinfo.TargetMap in project intellij by bazelbuild.

the class BlazeRenderErrorContributorTest method createTargetMapWithMissingClassDependency.

private void createTargetMapWithMissingClassDependency() {
    Label parentTarget = Label.create("//com/google/example:app");
    Label independentLibraryTarget = Label.create("//com/google/example/independent:library");
    Label independentLibrary2Target = Label.create("//com/google/example/independent:library2");
    Label dependentLibraryTarget = Label.create("//com/google/example/dependent:library");
    Label resourcesTarget = Label.create("//com/google/example:resources");
    ArtifactLocation manifest = artifact("com/google/example/AndroidManifest.xml", true);
    ArtifactLocation resources = artifact("com/google/example/res", true);
    ArtifactLocation buildFile = artifact("com/google/example/BUILD", true);
    AndroidResourceModuleRegistry registry = AndroidResourceModuleRegistry.getInstance(project);
    registry.put(module, AndroidResourceModule.builder(TargetKey.forPlainTarget(resourcesTarget)).addResource(resources).build());
    TargetMap targetMap = TargetMapBuilder.builder().addTarget(TargetIdeInfo.builder().setLabel(parentTarget).setBuildFile(buildFile).addDependency(independentLibraryTarget).addDependency(resourcesTarget)).addTarget(TargetIdeInfo.builder().setLabel(independentLibraryTarget).setBuildFile(buildFile).setJavaInfo(JavaIdeInfo.builder()).addDependency(independentLibrary2Target)).addTarget(TargetIdeInfo.builder().setLabel(independentLibrary2Target).setBuildFile(buildFile).setJavaInfo(JavaIdeInfo.builder())).addTarget(TargetIdeInfo.builder().setLabel(resourcesTarget).setBuildFile(buildFile).setAndroidInfo(AndroidIdeInfo.builder().setGenerateResourceClass(true).setManifestFile(manifest).addResource(resources)).addDependency(dependentLibraryTarget)).addTarget(TargetIdeInfo.builder().setLabel(dependentLibraryTarget).setBuildFile(buildFile).setJavaInfo(JavaIdeInfo.builder())).build();
    projectDataManager.setTargetMap(targetMap);
}
Also used : Label(com.google.idea.blaze.base.model.primitives.Label) ArtifactLocation(com.google.idea.blaze.base.ideinfo.ArtifactLocation) AndroidResourceModuleRegistry(com.google.idea.blaze.android.sync.model.AndroidResourceModuleRegistry) SourceToTargetMap(com.google.idea.blaze.base.targetmaps.SourceToTargetMap) TargetMap(com.google.idea.blaze.base.ideinfo.TargetMap)

Example 9 with TargetMap

use of com.google.idea.blaze.base.ideinfo.TargetMap in project intellij by bazelbuild.

the class BlazeAndroidWorkspaceImporterTest method testEmptyResourceModuleIsAddedAsJar.

/**
 * Test adding empty resource modules as jars.
 */
@Test
public void testEmptyResourceModuleIsAddedAsJar() {
    ProjectView projectView = ProjectView.builder().add(ListSection.builder(DirectorySection.KEY).add(DirectoryEntry.include(new WorkspacePath("java/apps/example"))).add(DirectoryEntry.include(new WorkspacePath("javatests/apps/example")))).build();
    /**
     * Deps are project -> lib0 (no res) -> lib1 (has res) \ -> lib2 (has res)
     */
    TargetMapBuilder response = TargetMapBuilder.builder().addTarget(TargetIdeInfo.builder().setLabel("//java/apps/example/lib0:lib0").setKind("android_library").setBuildFile(source("java/apps/example/lib0/BUILD")).addSource(source("java/apps/example/lib0/SharedActivity.java")).setAndroidInfo(AndroidIdeInfo.builder().setManifestFile(source("java/apps/example/lib0/AndroidManifest.xml")).setGenerateResourceClass(true).setResourceJavaPackage("com.google.android.apps.example.lib0").setResourceJar(LibraryArtifact.builder().setInterfaceJar(gen("java/apps/example/lib0/lib0_resources.jar")).setClassJar(gen("java/apps/example/lib0/lib0_resources.jar")))).addDependency("//java/apps/example/lib1:lib1").addDependency("//java/apps/example/lib2:lib2").setJavaInfo(JavaIdeInfo.builder().addJar(LibraryArtifact.builder().setInterfaceJar(gen("java/apps/example/lib0/lib0.jar")).setClassJar(gen("java/apps/example/lib0/lib0.jar"))).addJar(LibraryArtifact.builder().setInterfaceJar(gen("java/apps/example/lib0/lib0_resources.jar")).setClassJar(gen("java/apps/example/lib0/lib0_resources.jar"))))).addTarget(TargetIdeInfo.builder().setLabel("//java/apps/example/lib1:lib1").setKind("android_library").setBuildFile(source("java/apps/example/lib1/BUILD")).addSource(source("java/apps/example/lib1/SharedActivity.java")).setAndroidInfo(AndroidIdeInfo.builder().setManifestFile(source("java/apps/example/lib1/AndroidManifest.xml")).addResource(source("java/apps/example/lib1/res")).setGenerateResourceClass(true).setResourceJavaPackage("com.google.android.apps.example.lib1").setResourceJar(LibraryArtifact.builder().setInterfaceJar(gen("java/apps/example/lib1/li11_resources.jar")).setClassJar(gen("java/apps/example/lib1/lib1_resources.jar")))).setJavaInfo(JavaIdeInfo.builder().addJar(LibraryArtifact.builder().setInterfaceJar(gen("java/apps/example/lib1/lib1.jar")).setClassJar(gen("java/apps/example/lib1/lib1.jar"))).addJar(LibraryArtifact.builder().setInterfaceJar(gen("java/apps/example/lib1/lib1_resources.jar")).setClassJar(gen("java/apps/example/lib1/lib1_resources.jar"))))).addTarget(TargetIdeInfo.builder().setLabel("//java/apps/example/lib2:lib2").setBuildFile(source("java/apps/example/lib2/BUILD")).setKind("android_library").addSource(source("java/apps/example/lib2/SharedActivity.java")).setAndroidInfo(AndroidIdeInfo.builder().setManifestFile(source("java/apps/example/lib2/AndroidManifest.xml")).addResource(source("java/apps/example/lib2/res")).setGenerateResourceClass(true).setResourceJavaPackage("com.google.android.libraries.example.lib2").setResourceJar(LibraryArtifact.builder().setInterfaceJar(gen("java/apps/example/lib2/lib2_resources.jar")).setClassJar(gen("java/apps/example/lib2/lib2_resources.jar")))).setBuildFile(source("java/apps/example/lib2/BUILD")).setJavaInfo(JavaIdeInfo.builder().addJar(LibraryArtifact.builder().setInterfaceJar(gen("java/apps/example/lib2/lib2.jar")).setClassJar(gen("java/apps/example/lib2/lib2.jar"))).addJar(LibraryArtifact.builder().setInterfaceJar(gen("java/apps/example/lib2/lib2_resources.jar")).setClassJar(gen("java/apps/example/lib2/lib2_resources.jar"))))).addTarget(TargetIdeInfo.builder().setLabel("//java/apps/example:example_debug").setKind("android_binary").setBuildFile(source("java/apps/example/BUILD")).addSource(source("java/apps/example/MainActivity.java")).setAndroidInfo(AndroidIdeInfo.builder().setManifestFile(source("java/apps/example/AndroidManifest.xml")).addResource(source("java/apps/example/res")).setGenerateResourceClass(true).setResourceJavaPackage("com.google.android.apps.example")).addDependency("//java/apps/example/lib0:lib0").setJavaInfo(JavaIdeInfo.builder().addJar(LibraryArtifact.builder().setInterfaceJar(gen("java/apps/example/example_debug.jar")).setClassJar(gen("java/apps/example/example_debug.jar")))));
    TargetMap targetMap = response.build();
    BlazeAndroidJavaSyncAugmenter syncAugmenter = new BlazeAndroidJavaSyncAugmenter();
    List<BlazeJarLibrary> jars = Lists.newArrayList();
    List<BlazeJarLibrary> genJars = Lists.newArrayList();
    ImportRoots importRoots = ImportRoots.builder(workspaceRoot, BuildSystem.Blaze).add(ProjectViewSet.builder().add(projectView).build()).build();
    ProjectViewSet projectViewSet = ProjectViewSet.builder().add(projectView).build();
    for (TargetIdeInfo target : targetMap.targets()) {
        if (importRoots.importAsSource(target.key.label)) {
            syncAugmenter.addJarsForSourceTarget(workspaceLanguageSettings, projectViewSet, target, jars, genJars);
        }
    }
    assertThat(jars.stream().map(library -> library.libraryArtifact.interfaceJar).map(artifactLocation -> new File(artifactLocation.relativePath).getName()).collect(Collectors.toList())).containsExactly("lib0_resources.jar");
}
Also used : WorkspacePath(com.google.idea.blaze.base.model.primitives.WorkspacePath) ProjectViewSet(com.google.idea.blaze.base.projectview.ProjectViewSet) TargetIdeInfo(com.google.idea.blaze.base.ideinfo.TargetIdeInfo) GeneratedAndroidResourcesSection(com.google.idea.blaze.android.projectview.GeneratedAndroidResourcesSection) BlazeAndroidJavaSyncAugmenter(com.google.idea.blaze.android.sync.BlazeAndroidJavaSyncAugmenter) PrefetchService(com.google.idea.blaze.base.prefetch.PrefetchService) JavaWorkingSet(com.google.idea.blaze.java.sync.workingset.JavaWorkingSet) WorkingSet(com.google.idea.blaze.base.sync.workspace.WorkingSet) JavaLikeLanguage(com.google.idea.blaze.java.sync.source.JavaLikeLanguage) BlazeAndroidLibrarySource(com.google.idea.blaze.android.sync.BlazeAndroidLibrarySource) JavaSourceFilter(com.google.idea.blaze.java.sync.importer.JavaSourceFilter) ImmutableSet(com.google.common.collect.ImmutableSet) AndroidResourceModule(com.google.idea.blaze.android.sync.model.AndroidResourceModule) Predicate(java.util.function.Predicate) ProjectView(com.google.idea.blaze.base.projectview.ProjectView) WorkspaceLanguageSettings(com.google.idea.blaze.base.sync.projectview.WorkspaceLanguageSettings) Collectors(java.util.stream.Collectors) FileOperationProvider(com.google.idea.blaze.base.io.FileOperationProvider) BlazeAndroidImportResult(com.google.idea.blaze.android.sync.model.BlazeAndroidImportResult) SourceArtifact(com.google.idea.blaze.java.sync.source.SourceArtifact) List(java.util.List) ErrorCollector(com.google.idea.blaze.base.scope.ErrorCollector) ProjectViewSet(com.google.idea.blaze.base.projectview.ProjectViewSet) WorkspaceRoot(com.google.idea.blaze.base.model.primitives.WorkspaceRoot) 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) BlazeContext(com.google.idea.blaze.base.scope.BlazeContext) JavaSourcePackageReader(com.google.idea.blaze.java.sync.source.JavaSourcePackageReader) PackageManifestReader(com.google.idea.blaze.java.sync.source.PackageManifestReader) LibraryArtifact(com.google.idea.blaze.base.ideinfo.LibraryArtifact) DirectorySection(com.google.idea.blaze.base.projectview.section.sections.DirectorySection) RunWith(org.junit.runner.RunWith) BlazeJavaWorkspaceImporter(com.google.idea.blaze.java.sync.importer.BlazeJavaWorkspaceImporter) MockJdepsMap(com.google.idea.blaze.java.sync.jdeps.MockJdepsMap) JavaIdeInfo(com.google.idea.blaze.base.ideinfo.JavaIdeInfo) BlazeJavaImportResult(com.google.idea.blaze.java.sync.model.BlazeJavaImportResult) ExperimentService(com.google.idea.common.experiments.ExperimentService) BlazeResourceLibrary(com.google.idea.blaze.android.sync.model.BlazeResourceLibrary) MockBlazeExecutor(com.google.idea.blaze.base.async.executor.MockBlazeExecutor) AndroidIdeInfo(com.google.idea.blaze.base.ideinfo.AndroidIdeInfo) Kind(com.google.idea.blaze.base.model.primitives.Kind) BlazeJarLibrary(com.google.idea.blaze.java.sync.model.BlazeJarLibrary) WorkspaceType(com.google.idea.blaze.base.model.primitives.WorkspaceType) Lists(com.google.common.collect.Lists) ImmutableList(com.google.common.collect.ImmutableList) BuildSystem(com.google.idea.blaze.base.settings.Blaze.BuildSystem) AarLibrary(com.google.idea.blaze.android.sync.model.AarLibrary) IssueOutput(com.google.idea.blaze.base.scope.output.IssueOutput) TargetIdeInfo(com.google.idea.blaze.base.ideinfo.TargetIdeInfo) Nullable(javax.annotation.Nullable) LanguageClass(com.google.idea.blaze.base.model.primitives.LanguageClass) ImportRoots(com.google.idea.blaze.base.sync.projectview.ImportRoots) ArtifactLocation(com.google.idea.blaze.base.ideinfo.ArtifactLocation) BlazeTestCase(com.google.idea.blaze.base.BlazeTestCase) BlazeImportSettingsManager(com.google.idea.blaze.base.settings.BlazeImportSettingsManager) Test(org.junit.Test) JUnit4(org.junit.runners.JUnit4) Truth.assertThat(com.google.common.truth.Truth.assertThat) AndroidAarIdeInfo(com.google.idea.blaze.base.ideinfo.AndroidAarIdeInfo) MockPrefetchService(com.google.idea.blaze.base.prefetch.MockPrefetchService) BlazeJavaSyncAugmenter(com.google.idea.blaze.java.sync.BlazeJavaSyncAugmenter) File(java.io.File) BlazeImportSettings(com.google.idea.blaze.base.settings.BlazeImportSettings) BlazeExecutor(com.google.idea.blaze.base.async.executor.BlazeExecutor) DirectoryEntry(com.google.idea.blaze.base.projectview.section.sections.DirectoryEntry) Label(com.google.idea.blaze.base.model.primitives.Label) MockExperimentService(com.google.idea.common.experiments.MockExperimentService) GenfilesPath(com.google.idea.blaze.android.projectview.GenfilesPath) WorkspacePath(com.google.idea.blaze.base.model.primitives.WorkspacePath) ListSection(com.google.idea.blaze.base.projectview.section.ListSection) ImportRoots(com.google.idea.blaze.base.sync.projectview.ImportRoots) BlazeAndroidJavaSyncAugmenter(com.google.idea.blaze.android.sync.BlazeAndroidJavaSyncAugmenter) TargetMapBuilder(com.google.idea.blaze.base.ideinfo.TargetMapBuilder) BlazeJarLibrary(com.google.idea.blaze.java.sync.model.BlazeJarLibrary) ProjectView(com.google.idea.blaze.base.projectview.ProjectView) File(java.io.File) TargetMap(com.google.idea.blaze.base.ideinfo.TargetMap) Test(org.junit.Test)

Example 10 with TargetMap

use of com.google.idea.blaze.base.ideinfo.TargetMap in project intellij by bazelbuild.

the class BlazeAndroidWorkspaceImporterTest method importWorkspace.

private BlazeAndroidImportResult importWorkspace(WorkspaceRoot workspaceRoot, TargetMapBuilder targetMapBuilder, ProjectView projectView) {
    ProjectViewSet projectViewSet = ProjectViewSet.builder().add(projectView).build();
    TargetMap targetMap = targetMapBuilder.build();
    JavaSourceFilter sourceFilter = new JavaSourceFilter(project, workspaceRoot, projectViewSet, targetMap);
    BlazeAndroidWorkspaceImporter workspaceImporter = new BlazeAndroidWorkspaceImporter(project, context, workspaceRoot, projectViewSet, targetMap, sourceFilter, FAKE_ARTIFACT_DECODER);
    return workspaceImporter.importWorkspace();
}
Also used : ProjectViewSet(com.google.idea.blaze.base.projectview.ProjectViewSet) JavaSourceFilter(com.google.idea.blaze.java.sync.importer.JavaSourceFilter) TargetMap(com.google.idea.blaze.base.ideinfo.TargetMap)

Aggregations

TargetMap (com.google.idea.blaze.base.ideinfo.TargetMap)77 Test (org.junit.Test)56 ProjectView (com.google.idea.blaze.base.projectview.ProjectView)33 BlazeProjectData (com.google.idea.blaze.base.model.BlazeProjectData)27 WorkspacePath (com.google.idea.blaze.base.model.primitives.WorkspacePath)26 WorkspaceLanguageSettings (com.google.idea.blaze.base.sync.projectview.WorkspaceLanguageSettings)17 TargetKey (com.google.idea.blaze.base.ideinfo.TargetKey)16 TargetIdeInfo (com.google.idea.blaze.base.ideinfo.TargetIdeInfo)15 ProjectViewSet (com.google.idea.blaze.base.projectview.ProjectViewSet)12 TargetMapBuilder (com.google.idea.blaze.base.ideinfo.TargetMapBuilder)11 ArtifactLocationDecoder (com.google.idea.blaze.base.sync.workspace.ArtifactLocationDecoder)11 ArtifactLocation (com.google.idea.blaze.base.ideinfo.ArtifactLocation)10 BlazeSyncParams (com.google.idea.blaze.base.sync.BlazeSyncParams)10 BlazeScalaImportResult (com.google.idea.blaze.scala.sync.model.BlazeScalaImportResult)10 File (java.io.File)10 MockBlazeProjectDataManager (com.google.idea.blaze.base.model.MockBlazeProjectDataManager)9 BlazeJavaImportResult (com.google.idea.blaze.java.sync.model.BlazeJavaImportResult)9 ImmutableList (com.google.common.collect.ImmutableList)8 WorkspaceRoot (com.google.idea.blaze.base.model.primitives.WorkspaceRoot)8 ImmutableSet (com.google.common.collect.ImmutableSet)7