mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
review changes: convertLocalPathToRootPath transformed to convertLocalToRootPath
ignore more vfs property changed events for zip file invalidation
This commit is contained in:
@@ -74,7 +74,7 @@ public abstract class ArchiveFileSystem extends NewVirtualFileSystem {
|
||||
protected abstract String extractLocalPath(@NotNull String rootPath);
|
||||
|
||||
@NotNull
|
||||
protected abstract String convertLocalPathToRootPath(@NotNull String localPath);
|
||||
protected abstract String convertLocalToRootPath(@NotNull String localPath);
|
||||
|
||||
@NotNull
|
||||
protected abstract ArchiveHandler getHandler(@NotNull VirtualFile entryFile);
|
||||
|
||||
@@ -105,7 +105,7 @@ public class JarFileSystemImpl extends JarFileSystem {
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
protected String convertLocalPathToRootPath(@NotNull String localPath) {
|
||||
protected String convertLocalToRootPath(@NotNull String localPath) {
|
||||
return localPath + JAR_SEPARATOR;
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ public class JarFileSystemImpl extends JarFileSystem {
|
||||
@Nullable
|
||||
@Override
|
||||
public VirtualFile getRootByLocal(@NotNull VirtualFile file) {
|
||||
return findFileByPath(convertLocalPathToRootPath(file.getPath()));
|
||||
return findFileByPath(convertLocalToRootPath(file.getPath()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -253,7 +253,7 @@ public class VfsImplUtil {
|
||||
if (event instanceof VFileCreateEvent) continue; // created file should not invalidate + getFile is costly
|
||||
|
||||
if (event instanceof VFilePropertyChangeEvent &&
|
||||
VirtualFile.PROP_HIDDEN.equals(((VFilePropertyChangeEvent)event).getPropertyName())) {
|
||||
!VirtualFile.PROP_NAME.equals(((VFilePropertyChangeEvent)event).getPropertyName())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -307,7 +307,7 @@ public class VfsImplUtil {
|
||||
}
|
||||
|
||||
private void registerPathToRefresh(Pair<ArchiveFileSystem, ArchiveHandler> handlerPair, String path) {
|
||||
String rootPath = handlerPair.first.convertLocalPathToRootPath(path);
|
||||
String rootPath = handlerPair.first.convertLocalToRootPath(path);
|
||||
NewVirtualFile root = ManagingFS.getInstance().findRoot(rootPath, handlerPair.first);
|
||||
if (root != null) {
|
||||
root.markDirtyRecursively();
|
||||
|
||||
Reference in New Issue
Block a user