2 * Copyright 2000-2009 JetBrains s.r.o.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 package com
.intellij
.psi
.impl
;
22 import com
.intellij
.openapi
.vfs
.VirtualFile
;
23 import com
.intellij
.psi
.*;
24 import com
.intellij
.psi
.impl
.file
.impl
.FileManager
;
25 import com
.intellij
.psi
.search
.GlobalSearchScope
;
26 import org
.jetbrains
.annotations
.NotNull
;
28 import java
.util
.Collections
;
29 import java
.util
.List
;
31 class EmptyFileManager
implements FileManager
{
32 private final PsiManagerImpl myManager
;
34 EmptyFileManager(final PsiManagerImpl manager
) {
38 public void dispose() {
41 public void runStartupActivity() {
44 public PsiFile
findFile(@NotNull VirtualFile vFile
) {
48 public PsiDirectory
findDirectory(@NotNull VirtualFile vFile
) {
52 public void reloadFromDisk(@NotNull PsiFile file
)
56 public PsiFile
getCachedPsiFile(@NotNull VirtualFile vFile
) {
61 public GlobalSearchScope
getResolveScope(@NotNull PsiElement element
) {
62 return GlobalSearchScope
.EMPTY_SCOPE
;
66 public GlobalSearchScope
getUseScope(@NotNull PsiElement element
) {
67 return GlobalSearchScope
.EMPTY_SCOPE
;
70 public void cleanupForNextTest() {
73 public FileViewProvider
findViewProvider(VirtualFile file
) {
77 public FileViewProvider
findCachedViewProvider(VirtualFile file
) {
81 public FileViewProvider
createFileViewProvider(final VirtualFile file
, final boolean physical
) {
82 return new SingleRootFileViewProvider(myManager
, file
, physical
);
85 public void setViewProvider(final VirtualFile virtualFile
, final FileViewProvider singleRootFileViewProvider
) {
89 public List
<PsiFile
> getAllCachedFiles() {
90 return Collections
.emptyList();