Java 类com.intellij.openapi.vfs.NonPhysicalFileSystem 实例源码

项目:consulo    文件:AbstractFileViewProvider.java   
protected AbstractFileViewProvider(@Nonnull PsiManager manager,
                                   @Nonnull VirtualFile virtualFile,
                                   boolean eventSystemEnabled,
                                   @Nonnull FileType type) {
  myManager = (PsiManagerEx)manager;
  myVirtualFile = virtualFile;
  myEventSystemEnabled = eventSystemEnabled;
  setContent(new VirtualFileContent());
  myPhysical = isEventSystemEnabled() &&
               !(virtualFile instanceof LightVirtualFile) &&
               !(virtualFile.getFileSystem() instanceof NonPhysicalFileSystem);
  virtualFile.putUserData(FREE_THREADED, isFreeThreaded(this));
  myFileType = type;
  if (virtualFile instanceof VirtualFileWindow && !(this instanceof FreeThreadedFileViewProvider)) {
    throw new IllegalArgumentException("Must not create "+getClass()+" for injected file "+virtualFile+"; InjectedFileViewProvider must be used instead");
  }
}
项目:consulo    文件:PsiManagerImpl.java   
@Override
public boolean isInProject(@Nonnull PsiElement element) {
  if (element instanceof PsiDirectoryContainer) {
    PsiDirectory[] dirs = ((PsiDirectoryContainer)element).getDirectories();
    for (PsiDirectory dir : dirs) {
      if (!isInProject(dir)) return false;
    }
    return true;
  }

  PsiFile file = element.getContainingFile();
  VirtualFile virtualFile = null;
  if (file != null) {
    virtualFile = file.getViewProvider().getVirtualFile();
  }
  else if (element instanceof PsiFileSystemItem) {
    virtualFile = ((PsiFileSystemItem)element).getVirtualFile();
  }
  if (file != null && file.isPhysical() && virtualFile.getFileSystem() instanceof NonPhysicalFileSystem) return true;

  return virtualFile != null && myFileIndex.isInContent(virtualFile);
}
项目:intellij-ce-playground    文件:SingleRootFileViewProvider.java   
protected SingleRootFileViewProvider(@NotNull PsiManager manager,
                                     @NotNull VirtualFile virtualFile,
                                     final boolean eventSystemEnabled,
                                     @NotNull Language language,
                                     @NotNull FileType type) {
  myManager = manager;
  myVirtualFile = virtualFile;
  myEventSystemEnabled = eventSystemEnabled;
  myBaseLanguage = language;
  setContent(new VirtualFileContent());
  myPhysical = isEventSystemEnabled() &&
               !(virtualFile instanceof LightVirtualFile) &&
               !(virtualFile.getFileSystem() instanceof NonPhysicalFileSystem);
  myFileType = type;
}
项目:material-theme-jetbrains    文件:MTNonProjectFiles.java   
@Override
public boolean contains(final VirtualFile file, @NotNull final Project project, @Nullable final NamedScopesHolder holder) {
  // do not include fake-files e.g. fragment-editors, database consoles, etc.
  if (file == null || file.getFileSystem() instanceof NonPhysicalFileSystem) {
    return false;
  }
  if (!file.isInLocalFileSystem()) {
    return true;
  }
  if (isInsideProjectContent(project, file)) {
    return false;
  }
  return !ProjectScope.getProjectScope(project).contains(file);
}
项目:tools-idea    文件:SingleRootFileViewProvider.java   
protected SingleRootFileViewProvider(@NotNull PsiManager manager, @NotNull VirtualFile virtualFile, final boolean physical, @NotNull Language language) {
  myManager = manager;
  myVirtualFile = virtualFile;
  myEventSystemEnabled = physical;
  myBaseLanguage = language;
  setContent(new VirtualFileContent());
  myPhysical = isEventSystemEnabled() &&
               !(virtualFile instanceof LightVirtualFile) &&
               !(virtualFile.getFileSystem() instanceof NonPhysicalFileSystem);
  myExclusionManager = ProjectFileExclusionManager.SERVICE.getInstance(manager.getProject());
}
项目:consulo    文件:FileStatusManagerImpl.java   
@Override
public FileStatus getStatus(@Nonnull final VirtualFile file) {
  if (file.getFileSystem() instanceof NonPhysicalFileSystem) {
    return FileStatus.SUPPRESSED;  // do not leak light files via cache
  }

  FileStatus status = getCachedStatus(file);
  if (status == null || status == FileStatusNull.INSTANCE) {
    status = calcStatus(file);
    cacheChangedFileStatus(file, status);
  }

  return status;
}
项目:intellij-ce-playground    文件:PackagePrefixFileSystemItemImpl.java   
@Override
public boolean isPhysical() {
  final VirtualFile file = getVirtualFile();
  return file != null && !(file.getFileSystem() instanceof NonPhysicalFileSystem);
}
项目:tools-idea    文件:PsiDirectoryImpl.java   
@Override
public boolean isPhysical() {
  return !(myFile.getFileSystem() instanceof NonPhysicalFileSystem) && !(myFile.getFileSystem().getProtocol().equals("temp"));
}
项目:consulo    文件:PsiDirectoryImpl.java   
@Override
public boolean isPhysical() {
  return !(myFile.getFileSystem() instanceof NonPhysicalFileSystem) && !(myFile.getFileSystem().getProtocol().equals("temp"));
}