当前位置: 首页>>代码示例>>Java>>正文


Java ModuleChunk.getModules方法代码示例

本文整理汇总了Java中org.jetbrains.jps.ModuleChunk.getModules方法的典型用法代码示例。如果您正苦于以下问题:Java ModuleChunk.getModules方法的具体用法?Java ModuleChunk.getModules怎么用?Java ModuleChunk.getModules使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jetbrains.jps.ModuleChunk的用法示例。


在下文中一共展示了ModuleChunk.getModules方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: build

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
@Override
public ExitCode build(final CompileContext context,
                      ModuleChunk chunk,
                      DirtyFilesHolder<JavaSourceRootDescriptor, ModuleBuildTarget> dirtyFilesHolder,
                      OutputConsumer outputConsumer)
  throws ProjectBuildException, IOException {
  
  boolean doneSomething = false;
  for (final JpsModule module : chunk.getModules()) {
    JpsAppEngineModuleExtension extension = JpsAppEngineExtensionService.getInstance().getExtension(module);
    if (extension != null && extension.isRunEnhancerOnMake()) {
      doneSomething |= processModule(context, dirtyFilesHolder, extension);
    }
  }

  return doneSomething ? ExitCode.OK : ExitCode.NOTHING_DONE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:AppEngineEnhancerBuilder.java

示例2: getModulesToBuild

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
private List<JpsModule> getModulesToBuild(final ModuleChunk chunk) {
    final List<JpsModule> modules = new ArrayList<>();
    for (final JpsModule module : chunk.getModules()) {

        @Nullable final JpsMetaborgModuleFacetConfig facetConfiguration
                = this.extensionService.getFacetConfiguration(module);

        // The module must have a Metaborg facet and NOT have a Metaborg configuration,
        // as a Metaborg configuration indicates it's a Language Specification project
        // which is treated differently.

        if (facetConfiguration == null) continue;

        if (this.extensionService.hasModuleConfiguration(module)) {
            this.logger.warn("Language Specification module should not have Metaborg facet: {}", module);
            continue;
        }

        modules.add(module);
    }
    return modules;
}
 
开发者ID:metaborg,项目名称:spoofax-intellij,代码行数:23,代码来源:MetaborgLanguageBuilder.java

示例3: getBindingFileList

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
private String[] getBindingFileList(final ModuleChunk moduleChunk) {
    HashSet<String> bindings = new HashSet<String>();
    for (JpsModule module : moduleChunk.getModules()){
        for (String rootUrl : module.getContentRootsList().getUrls()){
            File root = JpsPathUtil.urlToFile(rootUrl);
            File jibxRoot = new File(root, "jibx");
            if (jibxRoot.exists() && jibxRoot.isDirectory()){
                File[] files = jibxRoot.listFiles();
                if (files != null) {
                    for (File binding : files) {
                        bindings.add(binding.getAbsolutePath());
                    }
                }
            }
        }
    }
    return bindings.toArray(new String[bindings.size()]);
}
 
开发者ID:aweigold,项目名称:idea-plugin-jibx,代码行数:19,代码来源:JibxBuilder.java

示例4: getChunkSdkVersion

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
private static int getChunkSdkVersion(ModuleChunk chunk) {
  int chunkSdkVersion = -1;
  for (JpsModule module : chunk.getModules()) {
    final JpsSdk<JpsDummyElement> sdk = module.getSdk(JpsJavaSdkType.INSTANCE);
    if (sdk != null) {
      final int moduleSdkVersion = convertToNumber(sdk.getVersionString());
      if (moduleSdkVersion != 0 /*could determine the version*/&& (chunkSdkVersion < 0 || chunkSdkVersion > moduleSdkVersion)) {
        chunkSdkVersion = moduleSdkVersion;
      }
    }
  }
  return chunkSdkVersion;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:JavaBuilder.java

示例5: getChunkSdkHome

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
private static String getChunkSdkHome(ModuleChunk chunk) {
  for (JpsModule module : chunk.getModules()) {
    final JpsSdk<JpsDummyElement> sdk = module.getSdk(JpsJavaSdkType.INSTANCE);
    if (sdk != null) {
      return sdk.getHomePath();
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:JavaBuilder.java

示例6: getPreferredModuleChunkEncoding

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
@Nullable
public String getPreferredModuleChunkEncoding(@NotNull ModuleChunk moduleChunk) {
  for (JpsModule module : moduleChunk.getModules()) {
    final String encoding = getPreferredModuleEncoding(module);
    if (encoding != null) {
      return encoding;
    }
  }
  return myProjectCharset;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:CompilerEncodingConfiguration.java

示例7: getAllModuleChunkEncodings

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
@NotNull
public Set<String> getAllModuleChunkEncodings(@NotNull ModuleChunk moduleChunk) {
  final Map<JpsModule, Set<String>> map = getModuleCharsetMap();
  Set<String> encodings = new HashSet<String>();
  for (JpsModule module : moduleChunk.getModules()) {
    final Set<String> moduleEncodings = map.get(module);
    if (moduleEncodings != null) {
      encodings.addAll(moduleEncodings);
    }
  }
  return encodings;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:CompilerEncodingConfiguration.java

示例8: chunkContainsAffectedFiles

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
private static boolean chunkContainsAffectedFiles(CompileContext context, ModuleChunk chunk, final Set<File> affected)
  throws IOException {
  final Set<JpsModule> chunkModules = chunk.getModules();
  if (!chunkModules.isEmpty()) {
    for (File file : affected) {
      final JavaSourceRootDescriptor moduleAndRoot = context.getProjectDescriptor().getBuildRootIndex().findJavaRootDescriptor(context,
                                                                                                                               file);
      if (moduleAndRoot != null && chunkModules.contains(moduleAndRoot.target.getModule())) {
        return true;
      }
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:JavaBuilderUtil.java

示例9: getFirstExtension

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
/**
 * Returns the first Android-Gradle facet in the given chunk of IDEA modules.
 *
 * @param chunk the given chunk of IDEA modules.
 * @return the first Android-Gradle facet in the given chunk of IDEA modules, or {@code null} if none of the module contain the
 *         Android-Gradle facet.
 */
@Nullable
public static JpsAndroidGradleModuleExtension getFirstExtension(@NotNull ModuleChunk chunk) {
  for (JpsModule module : chunk.getModules()) {
    JpsAndroidGradleModuleExtension extension = getExtension(module);
    if (extension != null) {
      return extension;
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:AndroidGradleJps.java

示例10: getFirstAndroidSdk

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
/**
 * Returns the first 'Android SDK' in the given chunk of IDEA modules.
 *
 * @param chunk the given chunk of modules.
 * @return the first 'Android SDK' in the given chunk of IDEA modules, or {@code null} if none of the modules contain an 'Android SDK.'
 */
@Nullable
public static JpsSdk<JpsSimpleElement<JpsAndroidSdkProperties>> getFirstAndroidSdk(@NotNull ModuleChunk chunk) {
  for (JpsModule module : chunk.getModules()) {
    JpsSdk<JpsSimpleElement<JpsAndroidSdkProperties>> sdk = module.getSdk(JpsAndroidSdkType.INSTANCE);
    if (sdk != null) {
      return sdk;
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:AndroidGradleJps.java

示例11: getCompilationUnitPatchers

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
@NotNull
@Override
public Collection<String> getCompilationUnitPatchers(@NotNull CompileContext context, @NotNull ModuleChunk chunk) {
  for (JpsModule module : chunk.getModules()) {
    if (shouldInjectGriffon(module)) {
      return Collections.singleton("org.jetbrains.groovy.compiler.rt.GriffonInjector");
    }
  }
  return Collections.emptyList();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:GriffonBuilderExtension.java

示例12: ModulesBasedFileFilter

import org.jetbrains.jps.ModuleChunk; //导入方法依赖的package包/类
private ModulesBasedFileFilter(CompileContext context, ModuleChunk chunk) {
  myContext = context;
  myChunkModules = chunk.getModules();
  myChunkTargets = chunk.getTargets();
  myBuildRootIndex = context.getProjectDescriptor().getBuildRootIndex();
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:JavaBuilderUtil.java


注:本文中的org.jetbrains.jps.ModuleChunk.getModules方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。