void (PropertyChangeEvent evt) { final Object newValue = evt.getNewValue(); final Object oldValue = evt.getOldValue(); boolean affectsDebugger = false; if (newValue instanceof Component && isInsideDebuggerDialog((Component)newValue)) { affectsDebugger = true; } if (oldValue instanceof Component && isInsideDebuggerDialog((Component)oldValue)) { affectsDebugger = true; } SimpleColoredText text = new SimpleColoredText(); @NlsSafe String propertyName = evt.getPropertyName(); text.append(propertyName, maybeGrayOut(new SimpleTextAttributes(SimpleTextAttributes.STYLE_UNDERLINE, null), affectsDebugger)); text.append(" " + IdeBundle.message("focus.debugger.label.newvalue"), maybeGrayOut(SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES, affectsDebugger)); text.append(String.valueOf(evt.getNewValue()), maybeGrayOut(SimpleTextAttributes.REGULAR_ATTRIBUTES, affectsDebugger)); text.append(" " + IdeBundle.message("focus.debugger.label.oldvalue") + evt.getOldValue(), maybeGrayOut(SimpleTextAttributes.REGULAR_ATTRIBUTES, affectsDebugger)); myLogModel.addElement(new FocusElement(text, new Throwable())); SwingUtilities.invokeLater(() -> { if (myLog != null && myLog.isShowing()) { final int h = myLog.getFixedCellHeight(); myLog.scrollRectToVisible(new Rectangle(0, myLog.getPreferredSize().height - h, myLog.getWidth(), h)); if (myLog.getModel().getSize() > 0) { myLog.setSelectedIndex(myLog.getModel().getSize() - 1); } } }); }