void (ListSelectionEvent e) { int row = myTable.getSelectedRow(); int column = myTable.getSelectedColumn(); if (row < 0 || column != 1) { return; } String property = myTable.getValueAt(row, 0).toString(); @Nullable Object value = myTable.getValueAt(row, 1); if (property.equals(selectedProperty)) { return; } selectedProperty = property; if (value instanceof Dimension || value instanceof Rectangle || value instanceof Border || value instanceof Insets) { if (myModel.myComponent != null) { setSecondComponent(new DimensionsComponent(myModel.myComponent)); } } else if (myProject != null) { if (myPreviewComponent == null) { myPreviewComponent = TextConsoleBuilderFactory.getInstance().createBuilder(myProject).getConsole(); JComponent consoleComponent = myPreviewComponent.getComponent(); consoleComponent.setBorder(JBUI.Borders.customLine(JBColor.border(), 1, 0, 1, 1)); } String renderedValue = getCellTextValue(row, column); if (previewUpdateIndicator != null) { previewUpdateIndicator.cancel(); } previewUpdateIndicator = new EmptyProgressIndicator(ModalityState.stateForComponent(InspectorTable.this)); myPreviewComponent.clear(); var task = new Task.Backgroundable(myProject, "Invisible title", false) { @Override public void run(@NotNull ProgressIndicator indicator) { fillPreviewComponent(property, value, renderedValue); indicator.checkCanceled(); myPreviewComponent.scrollTo(0); } }; ProgressManager.getInstance().runProcessWithProgressAsynchronously(task, previewUpdateIndicator); setSecondComponent(myPreviewComponent.getComponent()); } }