mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more diagnostics for EA-55006
This commit is contained in:
@@ -4124,7 +4124,8 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
newY = visibleLineToY(getVisibleLogicalLinesCount());
|
||||
}
|
||||
if (newY >= y) {
|
||||
LogMessageEx.error(LOG, "cycled moveCaretToScreenPos() detected", String.format("x=%d, y=%d\nstate=%s", x, y, dumpState()));
|
||||
LogMessageEx.error(LOG, "cycled moveCaretToScreenPos() detected",
|
||||
String.format("x=%d, y=%d\nvisibleLineCount=%d, newY=%d\nstate=%s", x, y, visibleLineCount, newY, dumpState()));
|
||||
throw new IllegalStateException("cycled moveCaretToScreenPos() detected");
|
||||
}
|
||||
return getLogicalPositionForScreenPos(x, newY, trimToLineWidth);
|
||||
|
||||
@@ -703,8 +703,8 @@ public class SoftWrapModelImpl implements SoftWrapModelEx, PrioritizedDocumentLi
|
||||
@NotNull
|
||||
@Override
|
||||
public String dumpState() {
|
||||
return String.format("appliance manager state: %s; soft wraps mapping info: %s",
|
||||
myApplianceManager.dumpState(), myDataMapper.dumpState());
|
||||
return String.format("appliance manager state: %s; soft wraps mapping info: %s; soft wraps: %s",
|
||||
myApplianceManager.dumpState(), myDataMapper.dumpState(), myStorage.dumpState());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+9
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2010 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.editor.impl.softwrap;
|
||||
|
||||
import com.intellij.diagnostic.Dumpable;
|
||||
import com.intellij.openapi.editor.SoftWrap;
|
||||
import com.intellij.openapi.editor.TextChange;
|
||||
import com.intellij.openapi.editor.ex.SoftWrapChangeListener;
|
||||
@@ -34,7 +35,7 @@ import java.util.List;
|
||||
* @author Denis Zhdanov
|
||||
* @since Jun 29, 2010 3:04:20 PM
|
||||
*/
|
||||
public class SoftWrapsStorage {
|
||||
public class SoftWrapsStorage implements Dumpable {
|
||||
|
||||
private final List<SoftWrapImpl> myWraps = new ArrayList<SoftWrapImpl>();
|
||||
private final List<SoftWrapImpl> myWrapsView = Collections.unmodifiableList(myWraps);
|
||||
@@ -204,4 +205,10 @@ public class SoftWrapsStorage {
|
||||
listener.softWrapsChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public String dumpState() {
|
||||
return myWraps.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user