diagnostics for IDEA-262221

GitOrigin-RevId: cae3abfaa4081a0b64e21f956506ca6fdfe58b59
This commit is contained in:
Dmitry Batrak
2021-02-18 08:42:37 +00:00
committed by intellij-monorepo-bot
parent 287c80b784
commit c5dd586ae3
@@ -4502,6 +4502,9 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
if (fontSize < MIN_FONT_SIZE) fontSize = MIN_FONT_SIZE;
if (fontSize > myMaxFontSize) fontSize = myMaxFontSize;
if (fontSize == myFontSize) return;
if (LOG.isDebugEnabled()) {
LOG.debug("Font size overridden for " + EditorImpl.this, new Throwable());
}
myFontPreferencesAreSetExplicitly = false;
myFontSize = fontSize;
reinitFontsAndSettings();
@@ -4517,6 +4520,9 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
@Override
public void setFontPreferences(@NotNull FontPreferences preferences) {
if (myFontPreferencesAreSetExplicitly && Comparing.equal(preferences, myFontPreferences)) return;
if (LOG.isDebugEnabled()) {
LOG.debug("Font preferences overridden for " + EditorImpl.this, new Throwable());
}
myFontPreferencesAreSetExplicitly = true;
myFaceName = null;
myFontSize = -1;
@@ -4552,6 +4558,9 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
@Override
public void setEditorFontName(String fontName) {
if (Objects.equals(fontName, myFaceName)) return;
if (LOG.isDebugEnabled()) {
LOG.debug("Font name overridden for " + EditorImpl.this, new Throwable());
}
myFontPreferencesAreSetExplicitly = false;
myFaceName = fontName;
reinitFontsAndSettings();
@@ -4896,6 +4905,11 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi
myInlayModel.validateState();
}
@Override
public String toString() {
return "EditorImpl[" + FileDocumentManager.getInstance().getFile(myDocument) + "]";
}
private class DefaultPopupHandler extends ContextMenuPopupHandler {
@Nullable
@Override