void (FontRenderContext context) { boolean contextUpdated = false; synchronized (myLock) { if (setFontRenderContext(context)) { myPlainSpaceWidth = -1; contextUpdated = true; } } if (contextUpdated) { myTextLayoutCache.resetToDocumentSize(false); invalidateFoldRegionLayouts(); myCharWidthCache.clear(); myEditor.getFoldingModel().updateCachedOffsets(); } }