mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
debugging OfflineModeTest
This commit is contained in:
+13
-1
@@ -51,6 +51,9 @@ public class LastUnchangedContentTracker {
|
||||
|
||||
Integer oldContentId = getSavedContentId(file);
|
||||
if (oldContentId != null && oldContentId > 0) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("releasing content for " + file + ", id = " + oldContentId);
|
||||
}
|
||||
getFS().releaseContent(oldContentId);
|
||||
}
|
||||
|
||||
@@ -88,13 +91,16 @@ public class LastUnchangedContentTracker {
|
||||
|
||||
private static void saveContentReference(VirtualFile file, int contentId) {
|
||||
if (contentId == 0) {
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("saveContentReference without content for file = " + file);
|
||||
}
|
||||
return; // content not loaded yet, nothing to save
|
||||
}
|
||||
|
||||
LOG.assertTrue(contentId > 0, contentId);
|
||||
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("saveContentReference file = " + file);
|
||||
LOG.debug("saveContentReference file = " + file + ", id = " + contentId);
|
||||
}
|
||||
|
||||
long stamp = file.getTimeStamp();
|
||||
@@ -139,6 +145,9 @@ public class LastUnchangedContentTracker {
|
||||
Integer oldContentId = null;
|
||||
try {
|
||||
final DataInputStream stream = ACQUIRED_CONTENT_ATTR.readAttribute(file);
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("getSavedContentId for " + file + "; stream=" + stream);
|
||||
}
|
||||
if (stream != null) {
|
||||
try {
|
||||
oldContentId = stream.readInt();
|
||||
@@ -146,6 +155,9 @@ public class LastUnchangedContentTracker {
|
||||
finally {
|
||||
stream.close();
|
||||
}
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("oldContentId=" + oldContentId);
|
||||
}
|
||||
LOG.assertTrue(oldContentId > 0, oldContentId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user