Java Code Examples for com.intellij.openapi.vfs.VirtualFileFilter#accept()
The following examples show how to use
com.intellij.openapi.vfs.VirtualFileFilter#accept() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PlatformTestUtil.java From consulo with Apache License 2.0 | 5 votes |
private static HashMap<String, VirtualFile> buildNameToFileMap(VirtualFile[] files, @javax.annotation.Nullable VirtualFileFilter filter) { HashMap<String, VirtualFile> map = new HashMap<String, VirtualFile>(); for (VirtualFile file : files) { if (filter != null && !filter.accept(file)) continue; map.put(file.getName(), file); } return map; }
Example 2
Source File: AbstractLayoutCodeProcessor.java From consulo with Apache License 2.0 | 5 votes |
private boolean acceptedByFilters(@Nonnull PsiFile file) { VirtualFile vFile = file.getVirtualFile(); if (vFile == null) { return false; } for (VirtualFileFilter filter : myFilters) { if (!filter.accept(file.getVirtualFile())) { return false; } } return true; }
Example 3
Source File: FileIndexBase.java From consulo with Apache License 2.0 | 4 votes |
@Override public boolean iterateContentUnderDirectory(@Nonnull VirtualFile dir, @Nonnull ContentIterator processor, @Nullable VirtualFileFilter customFilter) { VirtualFileFilter filter = customFilter != null ? file -> myContentFilter.accept(file) && customFilter.accept(file) : myContentFilter; return iterateContentUnderDirectoryWithFilter(dir, processor, filter); }