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


Java ExcludedEntriesConfiguration类代码示例

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


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

示例1: configure

import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
@Override
public void configure(@NotNull MavenProject mavenProject, @NotNull Project project, @Nullable Module module) {
  if (module == null) return;

  String targetLevel = mavenProject.getTargetLevel();
  if (targetLevel != null) {
    CompilerConfigurationImpl configuration = (CompilerConfigurationImpl)CompilerConfiguration.getInstance(project);
    configuration.setBytecodeTargetLevel(module, targetLevel);
  }

  VirtualFile directoryFile = mavenProject.getDirectoryFile();

  // Exclude src/main/archetype-resources
  VirtualFile archetypeResourcesDir = VfsUtil.findRelativeFile(directoryFile, "src", "main", "resources", "archetype-resources");

  if (archetypeResourcesDir != null) {
    CompilerConfigurationImpl compilerConfiguration = (CompilerConfigurationImpl)CompilerConfiguration.getInstance(project);

    if (!compilerConfiguration.isExcludedFromCompilation(archetypeResourcesDir)) {
      ExcludedEntriesConfiguration cfg = compilerConfiguration.getExcludedEntriesConfiguration();

      cfg.addExcludeEntryDescription(new ExcludeEntryDescription(archetypeResourcesDir, true, false, project));
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:26,代码来源:MavenCompilerConfigurer.java

示例2: createExcludedConfigurable

import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
private ExcludedEntriesConfigurable createExcludedConfigurable(final Project project) {
  final ExcludedEntriesConfiguration configuration = myConfig.getExcludeFromStubGeneration();
  final ProjectFileIndex index = ProjectRootManager.getInstance(project).getFileIndex();
  final FileChooserDescriptor descriptor = new FileChooserDescriptor(true, true, false, false, false, true) {
    public boolean isFileVisible(VirtualFile file, boolean showHiddenFiles) {
      return super.isFileVisible(file, showHiddenFiles) && !index.isIgnored(file);
    }
  };
  descriptor.setRoots(ContainerUtil.concat(
    ContainerUtil.map(ModuleManager.getInstance(project).getModules(), new Function<Module, List<VirtualFile>>() {
      @Override
      public List<VirtualFile> fun(final Module module) {
        return Arrays.asList(ModuleRootManager.getInstance(module).getSourceRoots());
      }
    })));
  return new ExcludedEntriesConfigurable(project, descriptor, configuration);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:GroovyCompilerConfigurable.java

示例3: compile

import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
@Override
public void compile(CompileContext compileContext, Chunk<Module> moduleChunk, VirtualFile[] virtualFiles, OutputSink sink) {
  final ExcludedEntriesConfiguration excluded = GroovyCompilerConfiguration.getExcludeConfiguration(myProject);
  
  @SuppressWarnings("MismatchedQueryAndUpdateOfCollection") FactoryMap<Pair<Module, Boolean>, Boolean> hasJava = new FactoryMap<Pair<Module, Boolean>, Boolean>() {
    @Override
    protected Boolean create(Pair<Module, Boolean> key) {
      return containsJavaSources(key.first, key.second);
    }
  };

  ProjectFileIndex index = ProjectRootManager.getInstance(myProject).getFileIndex();

  List<VirtualFile> total = new ArrayList<VirtualFile>();
  for (final VirtualFile virtualFile : virtualFiles) {
    if (!excluded.isExcluded(virtualFile) &&
        GroovyNamesUtil.isIdentifier(virtualFile.getNameWithoutExtension())) {
      Module module = index.getModuleForFile(virtualFile);
      if (module == null || hasJava.get(Pair.create(module, index.isInTestSourceContent(virtualFile)))) {
        total.add(virtualFile);
      }
    }
  }

  if (total.isEmpty()) {
    return;
  }

  //long l = System.currentTimeMillis();
  super.compile(compileContext, moduleChunk, VfsUtil.toVirtualFileArray(total), sink);
  //System.out.println("Stub generation took " + (System.currentTimeMillis() - l));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:33,代码来源:GroovycStubGenerator.java

示例4: getExcludedEntriesConfiguration

import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
public static ExcludedEntriesConfiguration getExcludedEntriesConfiguration(Project project) {
  return ServiceManager.getService(project, ExcludedFromValidationConfiguration.class);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:ValidationConfiguration.java

示例5: getExcludedEntriesConfiguration

import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
@Override
public ExcludedEntriesConfiguration getExcludedEntriesConfiguration() {
  return myExcludedEntriesConfiguration;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:5,代码来源:CompilerConfigurationImpl.java

示例6: getExcludeConfiguration

import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
public static ExcludedEntriesConfiguration getExcludeConfiguration(Project project) {
  return getInstance(project).myExcludeFromStubGeneration;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:GroovyCompilerConfiguration.java

示例7: getExcludeFromStubGeneration

import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
public ExcludedEntriesConfiguration getExcludeFromStubGeneration() {
  return myExcludeFromStubGeneration;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:GroovyCompilerConfiguration.java

示例8: getExcludedEntriesConfiguration

import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
public abstract ExcludedEntriesConfiguration getExcludedEntriesConfiguration(); 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:2,代码来源:CompilerConfiguration.java


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