Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrgodsey committed Mar 30, 2023
1 parent c75f638 commit 5179035
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package com.google.idea.blaze.android.projectsystem;

import static com.google.common.collect.ImmutableList.toImmutableList;

import com.android.ide.common.util.PathString;
import com.android.projectmodel.ExternalAndroidLibrary;
import com.android.projectmodel.ExternalLibraryImpl;
Expand Down Expand Up @@ -44,14 +42,20 @@
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.module.Module;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.Nullable;

import java.io.*;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Collection;
import java.util.Collections;
import java.util.stream.Stream;
import org.jetbrains.annotations.Nullable;

import static com.google.common.collect.ImmutableList.toImmutableList;

/** Blaze implementation of {@link AndroidModuleSystem}. */
public class BlazeModuleSystem extends BlazeModuleSystemBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package com.google.idea.blaze.android.projectsystem;

import static java.util.stream.Collectors.joining;

import com.android.tools.idea.projectsystem.ClassFileFinder;
import com.android.tools.idea.projectsystem.ClassFileFinderUtil;
import com.google.common.annotations.VisibleForTesting;
Expand Down Expand Up @@ -44,14 +42,15 @@
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.JarFileSystem;
import com.intellij.openapi.vfs.VirtualFile;
import org.jetbrains.annotations.Nullable;

import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;

import org.jetbrains.annotations.Nullable;
import static java.util.stream.Collectors.joining;

/**
* A {@link ClassFileFinder} that uses deploy JAR like artifacts (called render jar henceforth) for
Expand All @@ -69,6 +68,8 @@
*
* <p>NOTE: Blaze targets that constitutes the resource module will be called "resource target(s)"
* in comments below.
*
* TODO: The role of this class has expanded beyond just render jar resolution. Should rename it.
*/
public class RenderJarClassFileFinder implements ClassFileFinder {
/** Experiment to control whether class file finding from render jars should be enabled. */
Expand Down Expand Up @@ -320,7 +321,6 @@ private ModuleCache(Module module) {

@Nullable
private VirtualFile searchForFQCNInModule(String fqcn) {
log.warn(String.format("finding class %s in module %s", fqcn, module.getName()));
String pkg = null;
int pkgIdx = fqcn.lastIndexOf('.');
if (pkgIdx != -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package com.google.idea.blaze.android.resources;

import static com.google.common.collect.ImmutableSet.toImmutableSet;

import com.android.tools.idea.projectsystem.LightResourceClassService;
import com.android.tools.idea.res.AndroidLightPackage;
import com.google.common.annotations.VisibleForTesting;
Expand All @@ -35,12 +33,15 @@
import com.intellij.psi.PsiManager;
import com.intellij.psi.PsiPackage;
import com.intellij.psi.search.GlobalSearchScope;
import org.jetbrains.android.facet.AndroidFacet;
import org.jetbrains.annotations.Nullable;

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.jetbrains.android.facet.AndroidFacet;
import org.jetbrains.annotations.Nullable;

import static com.google.common.collect.ImmutableSet.toImmutableSet;

/** Implementation of {@link LightResourceClassService} set up at Blaze sync time. */
public class BlazeLightResourceClassService implements LightResourceClassService {
Expand All @@ -54,7 +55,7 @@ public class BlazeLightResourceClassService implements LightResourceClassService
// (PsiElementFinderImpl has 'order="first"').
// Put under experiment just in case we find a problem w/ other element finders.
private static final BoolExperiment createStubResourcePackages =
new BoolExperiment("create.stub.resource.packages", true); // suspect
new BoolExperiment("create.stub.resource.packages", true);

private final Project project;

Expand Down

0 comments on commit 5179035

Please sign in to comment.