本文整理汇总了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));
}
}
}
示例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);
}
示例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));
}
示例4: getExcludedEntriesConfiguration
import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
public static ExcludedEntriesConfiguration getExcludedEntriesConfiguration(Project project) {
return ServiceManager.getService(project, ExcludedFromValidationConfiguration.class);
}
示例5: getExcludedEntriesConfiguration
import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
@Override
public ExcludedEntriesConfiguration getExcludedEntriesConfiguration() {
return myExcludedEntriesConfiguration;
}
示例6: getExcludeConfiguration
import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
public static ExcludedEntriesConfiguration getExcludeConfiguration(Project project) {
return getInstance(project).myExcludeFromStubGeneration;
}
示例7: getExcludeFromStubGeneration
import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
public ExcludedEntriesConfiguration getExcludeFromStubGeneration() {
return myExcludeFromStubGeneration;
}
示例8: getExcludedEntriesConfiguration
import com.intellij.openapi.compiler.options.ExcludedEntriesConfiguration; //导入依赖的package包/类
public abstract ExcludedEntriesConfiguration getExcludedEntriesConfiguration();