mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diagnostics
This commit is contained in:
@@ -37,6 +37,7 @@ public class RangeMarkerImpl extends UserDataHolderBase implements RangeMarkerEx
|
||||
|
||||
private static final AtomicLong counter = new AtomicLong();
|
||||
private final long myId;
|
||||
private volatile int modCount;
|
||||
|
||||
protected RangeMarkerImpl(@NotNull DocumentEx document, int start, int end) {
|
||||
if (start < 0) {
|
||||
@@ -102,6 +103,7 @@ public class RangeMarkerImpl extends UserDataHolderBase implements RangeMarkerEx
|
||||
}
|
||||
|
||||
public final void documentChanged(DocumentEvent e) {
|
||||
int modCount = this.modCount++;
|
||||
int oldStart = myStart;
|
||||
int oldEnd = myEnd;
|
||||
int docLength = myDocument.getTextLength();
|
||||
@@ -119,7 +121,10 @@ public class RangeMarkerImpl extends UserDataHolderBase implements RangeMarkerEx
|
||||
changedUpdateImpl(e);
|
||||
if (isValid && (myStart > myEnd || myStart < 0 || myEnd > docLength)) {
|
||||
LOG.error("RangeMarker" + (isExpandToLeft ? "[" : "(") + oldStart + ", " + oldEnd + (isExpandToRight ? "]" : ")") +
|
||||
" update failed. Event = " + e + ". Result[" + myStart + ", " + myEnd + "], doc length=" + docLength + "; "+getClass());
|
||||
" update failed. Event = " + e + ". Result[" + myStart + ", " + myEnd + "], " +
|
||||
"old doc length=" + docLength + "; real doc length = "+myDocument.getTextLength()+
|
||||
"; old mod count="+modCount+"; mod count="+this.modCount+
|
||||
"; "+getClass());
|
||||
isValid = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user