void (@NotNull DocumentEvent e) { // do NOT synchronize before updateLayers due to deadlock with PsiLock boolean changed = updateLayers(e); //noinspection SynchronizeOnThis synchronized (this) { if (changed) { super.setText(e.getDocument().getImmutableCharSequence()); } else { super.documentChanged(e); } } }