本文整理汇总了Java中org.jetbrains.android.util.AndroidUtils.getAllAndroidDependencies方法的典型用法代码示例。如果您正苦于以下问题:Java AndroidUtils.getAllAndroidDependencies方法的具体用法?Java AndroidUtils.getAllAndroidDependencies怎么用?Java AndroidUtils.getAllAndroidDependencies使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jetbrains.android.util.AndroidUtils
的用法示例。
在下文中一共展示了AndroidUtils.getAllAndroidDependencies方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findActivityAlias
import org.jetbrains.android.util.AndroidUtils; //导入方法依赖的package包/类
@Nullable
private static ActivityAlias findActivityAlias(@NotNull AndroidFacet facet, @NotNull String name) {
ActivityAlias alias = doFindActivityAlias(facet, name);
if (alias != null) {
return alias;
}
for (AndroidFacet depFacet : AndroidUtils.getAllAndroidDependencies(facet.getModule(), true)) {
alias = doFindActivityAlias(depFacet, name);
if (alias != null) {
return alias;
}
}
return null;
}
示例2: computeRepositories
import org.jetbrains.android.util.AndroidUtils; //导入方法依赖的package包/类
private static List<LocalResourceRepository> computeRepositories(@NotNull final AndroidFacet facet) {
LocalResourceRepository main = ModuleResourceRepository.getModuleResources(facet, true);
// List of module facets the given module depends on
List<AndroidFacet> dependentFacets = AndroidUtils.getAllAndroidDependencies(facet.getModule(), true);
if (dependentFacets.isEmpty()) {
return Collections.singletonList(main);
}
List<LocalResourceRepository> resources = Lists.newArrayListWithExpectedSize(dependentFacets.size());
for (AndroidFacet f : dependentFacets) {
LocalResourceRepository r = ModuleResourceRepository.getModuleResources(f, true);
resources.add(r);
}
resources.add(main);
return resources;
}
示例3: testParents
import org.jetbrains.android.util.AndroidUtils; //导入方法依赖的package包/类
public void testParents() {
myFixture.copyFileToProject(LAYOUT, "res/layout/layout1.xml");
List<AndroidFacet> libraries = AndroidUtils.getAllAndroidDependencies(myModule, true);
assertEquals(2, libraries.size());
ModuleRootModificationUtil.addDependency(libraries.get(0).getModule(), libraries.get(1).getModule());
addArchiveLibraries();
ProjectResourceRepository repository = ProjectResourceRepository.create(myFacet);
assertEquals(3, repository.getChildCount());
Collection<String> items = repository.getItemsOfType(ResourceType.STRING);
assertTrue(items.isEmpty());
for (AndroidFacet facet : libraries) {
LocalResourceRepository moduleRepository = facet.getModuleResources(true);
assertNotNull(moduleRepository);
LocalResourceRepository moduleSetRepository = facet.getProjectResources(true);
assertNotNull(moduleSetRepository);
LocalResourceRepository librarySetRepository = facet.getAppResources(true);
assertNotNull(librarySetRepository);
}
myFacet.getModuleResources(true);
myFacet.getProjectResources(true);
myFacet.getAppResources(true);
}
示例4: collectResourceDirs
import org.jetbrains.android.util.AndroidUtils; //导入方法依赖的package包/类
private static void collectResourceDirs(AndroidFacet facet, Set<VirtualFile> result, Set<Module> visited) {
if (!visited.add(facet.getModule())) {
return;
}
for (VirtualFile resDir : facet.getAllResourceDirectories()) {
if (!result.add(resDir)) {
// We've already encountered this resource directory: that means that we are probably
// processing a library facet as part of a dependency, when that dependency was present
// and processed from an earlier module as well. No need to continue with this module at all;
// already handled.
return;
}
}
// Add in local AAR dependencies, if any
Set<File> dirs = Sets.newHashSet();
ResourceFolderManager.addAarsFromModuleLibraries(facet, dirs);
if (!dirs.isEmpty()) {
for (File dir : dirs) {
VirtualFile virtualFile = LocalFileSystem.getInstance().findFileByIoFile(dir);
if (virtualFile != null) {
result.add(virtualFile);
}
}
}
for (AndroidFacet depFacet : AndroidUtils.getAllAndroidDependencies(facet.getModule(), false)) {
collectResourceDirs(depFacet, result, visited);
}
}
示例5: collectActivityAliases
import org.jetbrains.android.util.AndroidUtils; //导入方法依赖的package包/类
@NotNull
private static Set<String> collectActivityAliases(@NotNull AndroidFacet facet) {
final Set<String> result = new HashSet<String>();
doCollectActivityAliases(facet, result);
for (AndroidFacet depFacet : AndroidUtils.getAllAndroidDependencies(facet.getModule(), true)) {
doCollectActivityAliases(depFacet, result);
}
return result;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:AndroidActivityAliasCompletionContributor.java
示例6: computeLibraries
import org.jetbrains.android.util.AndroidUtils; //导入方法依赖的package包/类
private static List<FileResourceRepository> computeLibraries(@NotNull final AndroidFacet facet) {
List<AndroidFacet> dependentFacets = AndroidUtils.getAllAndroidDependencies(facet.getModule(), true);
List<File> aarDirs = findAarLibraries(facet, dependentFacets);
if (aarDirs.isEmpty()) {
return Collections.emptyList();
}
List<FileResourceRepository> resources = Lists.newArrayListWithExpectedSize(aarDirs.size());
for (File root : aarDirs) {
resources.add(FileResourceRepository.get(root));
}
return resources;
}
示例7: findAarLibraries
import org.jetbrains.android.util.AndroidUtils; //导入方法依赖的package包/类
@NotNull
public static Collection<AndroidLibrary> findAarLibraries(@NotNull AndroidFacet facet) {
List<AndroidLibrary> libraries = Lists.newArrayList();
if (facet.isGradleProject()) {
IdeaAndroidProject project = facet.getIdeaAndroidProject();
if (project != null) {
List<AndroidFacet> dependentFacets = AndroidUtils.getAllAndroidDependencies(facet.getModule(), true);
addGradleLibraries(libraries, facet);
for (AndroidFacet dependentFacet : dependentFacets) {
addGradleLibraries(libraries, dependentFacet);
}
}
}
return libraries;
}
示例8: getAllManifests
import org.jetbrains.android.util.AndroidUtils; //导入方法依赖的package包/类
@NotNull
private static Set<VirtualFile> getAllManifests(@NotNull AndroidFacet facet) {
Set<VirtualFile> allManifests = Sets.newHashSet();
allManifests.addAll(IdeaSourceProvider.getManifestFiles(facet));
for (AndroidFacet dependency : AndroidUtils.getAllAndroidDependencies(facet.getModule(), true)) {
allManifests.addAll(IdeaSourceProvider.getManifestFiles(dependency));
}
return allManifests;
}