• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java LibraryKind类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.openapi.roots.libraries.LibraryKind的典型用法代码示例。如果您正苦于以下问题:Java LibraryKind类的具体用法?Java LibraryKind怎么用?Java LibraryKind使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LibraryKind类属于com.intellij.openapi.roots.libraries包,在下文中一共展示了LibraryKind类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getProjectUsages

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@NotNull
@Override
public Set<UsageDescriptor> getProjectUsages(@NotNull Project project) {
  final Set<LibraryKind> usedKinds = new HashSet<LibraryKind>();
  final Processor<Library> processor = new Processor<Library>() {
    @Override
    public boolean process(Library library) {
      usedKinds.addAll(LibraryPresentationManagerImpl.getLibraryKinds(library, null));
      return true;
    }
  };
  for (Module module : ModuleManager.getInstance(project).getModules()) {
    ModuleRootManager.getInstance(module).orderEntries().librariesOnly().forEachLibrary(processor);
  }

  final HashSet<UsageDescriptor> usageDescriptors = new HashSet<UsageDescriptor>();
  for (LibraryKind kind : usedKinds) {
    usageDescriptors.add(new UsageDescriptor(kind.getKindId(), 1));
  }
  return usageDescriptors;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:LibraryUsageCollector.java


示例2: check

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@NotNull
@Override
public ValidationResult check() {
  final Set<? extends LibraryKind> libraryKinds = myLibraryDescription.getSuitableLibraryKinds();
  final Ref<Boolean> found = Ref.create(false);
  myContext.getRootModel().orderEntries().using(myContext.getModulesProvider()).recursively().librariesOnly().forEachLibrary(new Processor<Library>() {
    @Override
    public boolean process(Library library) {
      if (LibraryPresentationManager.getInstance().isLibraryOfKind(library, myContext.getLibrariesContainer(), libraryKinds)) {
        found.set(true);
        return false;
      }
      return true;
    }
  });
  if (found.get()) return ValidationResult.OK;

  return new ValidationResult(IdeBundle.message("label.missed.libraries.text", myLibraryCategoryName), new LibrariesQuickFix(myLibraryDescription));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:FrameworkLibraryValidatorImpl.java


示例3: check

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@Override
public ValidationResult check() {
  final Set<? extends LibraryKind> libraryKinds = myLibraryDescription.getSuitableLibraryKinds();
  final Ref<Boolean> found = Ref.create(false);
  myContext.getRootModel().orderEntries().using(myContext.getModulesProvider()).recursively().librariesOnly().forEachLibrary(new Processor<Library>() {
    @Override
    public boolean process(Library library) {
      if (LibraryPresentationManager.getInstance().isLibraryOfKind(library, myContext.getLibrariesContainer(), libraryKinds)) {
        found.set(true);
        return false;
      }
      return true;
    }
  });
  if (found.get()) return ValidationResult.OK;

  return new ValidationResult(StringUtil.capitalize(myLibraryCategoryName) + " library not found in the module dependencies list", new LibrariesQuickFix(myLibraryDescription));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:FrameworkLibraryValidatorImpl.java


示例4: getProjectUsages

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@Nonnull
@Override
public Set<UsageDescriptor> getProjectUsages(@Nonnull Project project) {
  final Set<LibraryKind> usedKinds = new HashSet<LibraryKind>();
  final Processor<Library> processor = new Processor<Library>() {
    @Override
    public boolean process(Library library) {
      usedKinds.addAll(LibraryPresentationManagerImpl.getLibraryKinds(library, null));
      return true;
    }
  };
  for (Module module : ModuleManager.getInstance(project).getModules()) {
    ModuleRootManager.getInstance(module).orderEntries().librariesOnly().forEachLibrary(processor);
  }

  final HashSet<UsageDescriptor> usageDescriptors = new HashSet<UsageDescriptor>();
  for (LibraryKind kind : usedKinds) {
    usageDescriptors.add(new UsageDescriptor(kind.getKindId(), 1));
  }
  return usageDescriptors;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:22,代码来源:LibraryUsageCollector.java


示例5: updatePropertiesLabel

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
public void updatePropertiesLabel() {
  StringBuilder text = new StringBuilder();
  final LibraryType<?> type = getLibraryEditor().getType();
  final Set<LibraryKind> excluded =
    type != null ? Collections.<LibraryKind>singleton(type.getKind()) : Collections.<LibraryKind>emptySet();
  for (String description : LibraryPresentationManager.getInstance().getDescriptions(getLibraryEditor().getFiles(OrderRootType.CLASSES),
                                                                                     excluded)) {
    if (text.length() > 0) {
      text.append("\n");
    }
    text.append(description);
  }
  myPropertiesLabel.setText(text.toString());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:LibraryRootsComponent.java


示例6: forLibraryType

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@Nullable
public static LibrarySettingsProvider forLibraryType(LibraryKind libType) {
  for (LibrarySettingsProvider provider : Extensions.getExtensions(EP_NAME)) {
    if (provider.getLibraryKind().equals(libType)) {
      return provider;
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:LibrarySettingsProvider.java


示例7: getAllGroovyKinds

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
public static Set<? extends LibraryKind> getAllGroovyKinds() {
  final HashSet<LibraryKind> kinds = new HashSet<LibraryKind>();
  for (LibraryPresentationProvider provider : LibraryPresentationProvider.EP_NAME.getExtensions()) {
    if (provider instanceof GroovyLibraryPresentationProviderBase) {
      kinds.add(provider.getKind());
    }
  }
  return kinds;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:GroovyLibraryDescription.java


示例8: updatePropertiesLabel

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
public void updatePropertiesLabel() {
  StringBuilder text = new StringBuilder();
  final LibraryType<?> type = getLibraryEditor().getType();
  final Set<LibraryKind> excluded =
    type != null ? Collections.<LibraryKind>singleton(type.getKind()) : Collections.<LibraryKind>emptySet();
  for (String description : LibraryPresentationManager.getInstance().getDescriptions(getLibraryEditor().getFiles(BinariesOrderRootType.getInstance()),
                                                                                     excluded)) {
    if (text.length() > 0) {
      text.append("\n");
    }
    text.append(description);
  }
  myPropertiesLabel.setText(text.toString());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:15,代码来源:LibraryRootsComponent.java


示例9: MuleLibraryDescription

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
private MuleLibraryDescription(@NotNull final Set<? extends LibraryKind> libraryKinds)
{
    myLibraryKinds = libraryKinds;
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:5,代码来源:MuleLibraryDescription.java


示例10: getSuitableLibraryKinds

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@NotNull
@Override
public Set<? extends LibraryKind> getSuitableLibraryKinds()
{
    return myLibraryKinds;
}
 
开发者ID:machaval,项目名称:mule-intellij-plugins,代码行数:7,代码来源:MuleLibraryDescription.java


示例11: getDescriptions

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@NotNull
public abstract List<String> getDescriptions(@NotNull VirtualFile[] classRoots, Set<LibraryKind> excludedKinds);
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:LibraryPresentationManager.java


示例12: isLibraryOfKind

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
public abstract boolean isLibraryOfKind(@NotNull Library library, @NotNull LibrariesContainer librariesContainer,
@NotNull Set<? extends LibraryKind> acceptedKinds);
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:LibraryPresentationManager.java


示例13: getSuitableLibraryKinds

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@NotNull
public abstract Set<? extends LibraryKind> getSuitableLibraryKinds();
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:CustomLibraryDescription.java


示例14: createLibrary

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@NotNull
public abstract Library createLibrary(@NotNull Set<? extends LibraryKind> suitableLibraryKinds);
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:FrameworkLibraryProvider.java


示例15: getSuitableLibraryKinds

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@NotNull
@Override
public Set<? extends LibraryKind> getSuitableLibraryKinds() {
  return Collections.singleton(myLibraryType.getKind());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:CustomLibraryDescriptionImpl.java


示例16: getSuitableLibraryKinds

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@NotNull
@Override
public Set<? extends LibraryKind> getSuitableLibraryKinds() {
  return Collections.emptySet();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:OldCustomLibraryDescription.java


示例17: getLibraryKind

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@NotNull
public abstract LibraryKind getLibraryKind();
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:LibrarySettingsProvider.java


示例18: getAdditionalSettingsConfigurable

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@Nullable
public static Configurable getAdditionalSettingsConfigurable(Project project, LibraryKind libKind) {
  LibrarySettingsProvider provider = forLibraryType(libKind);
  if (provider == null) return null;
  return provider.getAdditionalSettingsConfigurable(project);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:LibrarySettingsProvider.java


示例19: getLibraryKind

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
@Override
public LibraryKind getLibraryKind() {
  return GriffonLibraryPresentationProvider.GRIFFON_KIND;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GriffonFramework.java


示例20: GroovyLibraryDescription

import com.intellij.openapi.roots.libraries.LibraryKind; //导入依赖的package包/类
public GroovyLibraryDescription(@NotNull String envVariable, @NotNull LibraryKind libraryKind, String frameworkName) {
  this(envVariable, Collections.singleton(libraryKind), frameworkName);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:GroovyLibraryDescription.java



注:本文中的com.intellij.openapi.roots.libraries.LibraryKind类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java UIMessage类代码示例发布时间:2022-05-22
下一篇:
Java Matrix4类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap