mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-22159
This commit is contained in:
@@ -514,7 +514,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
myPlainFontMetrics = null;
|
||||
|
||||
boolean softWrapsUsedBefore = mySoftWrapModel.isSoftWrappingEnabled();
|
||||
|
||||
|
||||
mySoftWrapModel.reinitSettings();
|
||||
myCaretModel.reinitSettings();
|
||||
mySelectionModel.reinitSettings();
|
||||
@@ -529,7 +529,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
mySizeContainer.reset();
|
||||
validateSize();
|
||||
}
|
||||
|
||||
|
||||
final EditorColorsScheme scheme =
|
||||
myScheme instanceof DelegateColorScheme? ((DelegateColorScheme)myScheme).getDelegate() : myScheme;
|
||||
if (scheme instanceof MyColorSchemeDelegate) {
|
||||
@@ -606,10 +606,10 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
clearCaretThread();
|
||||
|
||||
myFocusListeners.clear();
|
||||
|
||||
|
||||
if (myConnection != null) {
|
||||
myConnection.disconnect();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void clearCaretThread() {
|
||||
@@ -3425,7 +3425,6 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
VisualPosition oldVisLeadSelectionStart = selectionModel.getLeadSelectionPosition();
|
||||
int oldCaretOffset = getCaretModel().getOffset();
|
||||
LogicalPosition oldLogicalCaret = getCaretModel().getLogicalPosition();
|
||||
VisualPosition oldVisualCaret = getCaretModel().getVisualPosition();
|
||||
moveCaretToScreenPos(x, y);
|
||||
getScrollingModel().scrollToCaret(ScrollType.RELATIVE);
|
||||
|
||||
@@ -3605,6 +3604,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
myFocusListeners.add(listener);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Project getProject() {
|
||||
return myProject;
|
||||
}
|
||||
@@ -5194,9 +5194,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
private int myOldEndLine;
|
||||
|
||||
private Dimension mySize;
|
||||
|
||||
private final Object lock = new Object();
|
||||
private int myMaxWidth = -1;
|
||||
private int myMaxWidth = -1;
|
||||
|
||||
public synchronized void reset() {
|
||||
int lineCount = getDocument().getLineCount();
|
||||
@@ -5315,7 +5313,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
|
||||
private void validateSizes() {
|
||||
if (!myIsDirty) return;
|
||||
|
||||
synchronized (lock) {
|
||||
synchronized (this) {
|
||||
if (!myIsDirty) return;
|
||||
int lineCount = Math.min(myLineWidths.size(), myDocument.getLineCount());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user