mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
introduce marker interface to decouple SingleRootFileViewProvider from DummyFileSystem
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2000-2011 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.openapi.vfs;
|
||||
|
||||
/**
|
||||
* Marker interface for filesystem implementations files in which are considered non-physical.
|
||||
*
|
||||
* @author yole
|
||||
*/
|
||||
public interface NonPhysicalFileSystem {
|
||||
}
|
||||
@@ -30,8 +30,8 @@ import com.intellij.openapi.progress.ProcessCanceledException;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.Key;
|
||||
import com.intellij.openapi.util.UserDataHolderBase;
|
||||
import com.intellij.openapi.vfs.NonPhysicalFileSystem;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.ex.dummy.DummyFileSystem;
|
||||
import com.intellij.openapi.vfs.newvfs.persistent.PersistentFSConstants;
|
||||
import com.intellij.psi.impl.PsiFileEx;
|
||||
import com.intellij.psi.impl.PsiManagerEx;
|
||||
@@ -81,7 +81,7 @@ public class SingleRootFileViewProvider extends UserDataHolderBase implements Fi
|
||||
setContent(new VirtualFileContent());
|
||||
myPhysical = isEventSystemEnabled() &&
|
||||
!(virtualFile instanceof LightVirtualFile) &&
|
||||
!(virtualFile.getFileSystem() instanceof DummyFileSystem);
|
||||
!(virtualFile.getFileSystem() instanceof NonPhysicalFileSystem);
|
||||
myExclusionManager = ProjectFileExclusionManager.SERVICE.getInstance(manager.getProject());
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.vfs.ex.dummy;
|
||||
|
||||
import com.intellij.openapi.vfs.DeprecatedVirtualFileSystem;
|
||||
import com.intellij.openapi.vfs.VfsBundle;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.vfs.VirtualFileManager;
|
||||
import com.intellij.openapi.vfs.*;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -28,7 +25,7 @@ import java.io.IOException;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public class DummyFileSystem extends DeprecatedVirtualFileSystem {
|
||||
public class DummyFileSystem extends DeprecatedVirtualFileSystem implements NonPhysicalFileSystem {
|
||||
@NonNls public static final String PROTOCOL = "dummy";
|
||||
private VirtualFileDirectoryImpl myRoot;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user