void (String property, Object value, String renderedValue) { String strValue = String.valueOf(value); if (property.equals("added-at")) { if (value == null) { printToPreview("Stacktrace is not available. There are two options:\n1. ", NORMAL_OUTPUT); printHyperlinkToPreview("Click", project -> { UiInspectorAction.enableStacktracesSaving(); showHintInPreview("Enabled, please reopen the UI needed to inspect"); }); printToPreview(" to enable stacktraces saving until IDE restart.\n2. ", NORMAL_OUTPUT); printHyperlinkToPreview("Click", project -> { Registry.get("ui.inspector.save.stacktraces").setValue(true); RegistryBooleanOptionDescriptor.suggestRestart(InspectorTable.this.getRootPane()); if (ModalityState.current() != ModalityState.nonModal()) { // If there is a modal context, the restart won't happen until all dialogs are closed, so suggest it. showHintInPreview("Close all active dialogs to perform restart"); } }); printToPreview(""" to enable stacktraces saving by default. Requires restart. Will enable 'ui.inspector.save.stacktraces' Registry property. """, NORMAL_OUTPUT); printToPreview("Note that saving stacktraces for each UI component can consume significant amount of memory.", NORMAL_OUTPUT); } else { printToPreview(strValue, ERROR_OUTPUT); } } else if (property.equals("text")) { printToPreview(strValue, NORMAL_OUTPUT); } else if (property.trim().equals("hierarchy")) { String[] classNames = strValue.split(" *→ *"); printClassNamesToConsole(classNames, true); } else if (property.equals("toString")) { printToStringProperty(strValue); } else if (property.contains("Listeners") && value != null) { String listeners = ValueCellRenderer.getToStringValue(value); String[] classNames = listeners.split(" *, *"); printClassNamesToConsole(classNames, false); } else if (property.equals("clientProperties") && value != null) { Map<Object, Object> properties = ValueCellRenderer.parseClientProperties(value); if (properties != null) { for (Map.Entry<Object, Object> entry : properties.entrySet()) { if (entry.getKey().equals(UiInspectorAction.ADDED_AT_STACKTRACE)) continue; printToPreview(entry.getKey() + " -> ", NORMAL_OUTPUT); printClassName(String.valueOf(entry.getValue())); printToPreview("\n", NORMAL_OUTPUT); } } } else if (value instanceof CachedImageIcon) { printToPreview("Icon path: ", NORMAL_OUTPUT); printIconPath((CachedImageIcon)value); } else { printClassName(renderedValue); } }