mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
create VfsData manually, no need for app component
This commit is contained in:
@@ -101,10 +101,6 @@ public class VfsData {
|
||||
});
|
||||
}
|
||||
|
||||
public static VfsData getInstance() {
|
||||
return ApplicationManager.getApplication().getComponent(VfsData.class);
|
||||
}
|
||||
|
||||
private void killInvalidatedFiles() {
|
||||
synchronized (myDeadMarker) {
|
||||
if (!myDyingIds.isEmpty()) {
|
||||
|
||||
+3
-2
@@ -68,6 +68,7 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
private final AtomicBoolean myShutDown = new AtomicBoolean(false);
|
||||
private final AtomicInteger myStructureModificationCount = new AtomicInteger();
|
||||
private final BulkFileListener myPublisher;
|
||||
private final VfsData myVfsData = new VfsData();
|
||||
|
||||
public PersistentFSImpl(@NotNull MessageBus bus) {
|
||||
ShutDownTracker.getInstance().registerShutdownTask(this::performShutdown);
|
||||
@@ -994,7 +995,7 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
|
||||
int rootId = FSRecords.findRootRecord(rootUrl);
|
||||
|
||||
VfsData.Segment segment = VfsData.getInstance().getSegment(rootId, true);
|
||||
VfsData.Segment segment = myVfsData.getSegment(rootId, true);
|
||||
VfsData.DirectoryData directoryData = new VfsData.DirectoryData();
|
||||
VirtualFileSystemEntry newRoot = new FsRoot(rootId, segment, directoryData, fs, rootName, StringUtil.trimTrailing(rootPath, '/'));
|
||||
|
||||
@@ -1062,7 +1063,7 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone
|
||||
|
||||
@Override
|
||||
public NewVirtualFile findFileByIdIfCached(final int id) {
|
||||
return VfsData.getInstance().hasLoadedFile(id) ? findFileById(id) : null;
|
||||
return myVfsData.hasLoadedFile(id) ? findFileById(id) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
<interface-class>com.intellij.openapi.vfs.newvfs.ManagingFS</interface-class>
|
||||
<implementation-class>com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl</implementation-class>
|
||||
</component>
|
||||
<component>
|
||||
<implementation-class>com.intellij.openapi.vfs.newvfs.impl.VfsData</implementation-class>
|
||||
</component>
|
||||
|
||||
<component>
|
||||
<interface-class>com.intellij.openapi.vfs.LocalFileSystem</interface-class>
|
||||
|
||||
Reference in New Issue
Block a user