mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
file and doc mod stamps should be equal after save
This commit is contained in:
+4
@@ -69,6 +69,10 @@ public abstract class VirtualFileSystemEntry extends NewVirtualFile {
|
||||
private volatile VirtualDirectoryImpl myParent;
|
||||
private volatile int myFlags;
|
||||
private volatile int myId;
|
||||
|
||||
static {
|
||||
assert (~ALL_FLAGS_MASK) == LocalTimeCounter.TIME_MASK;
|
||||
}
|
||||
|
||||
public VirtualFileSystemEntry(int nameId, VirtualDirectoryImpl parent, int id, @PersistentFS.Attributes int attributes) {
|
||||
myParent = parent;
|
||||
|
||||
@@ -18,12 +18,14 @@ package com.intellij.util;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
public class LocalTimeCounter {
|
||||
/**
|
||||
* VirtualFile.modificationStamp is kept modulo this mask, and is compared with other stamps. Let's avoid accidental stamp inequalities
|
||||
* by normalizing all of them.
|
||||
*/
|
||||
public static final int TIME_MASK = 0x00ffffff;
|
||||
private static final AtomicLong ourCurrentTime = new AtomicLong();
|
||||
|
||||
private LocalTimeCounter() {
|
||||
}
|
||||
|
||||
public static long currentTime() {
|
||||
return ourCurrentTime.incrementAndGet();
|
||||
return TIME_MASK & (int)ourCurrentTime.incrementAndGet();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user