void (final @Nls String details) { UIUtil.invokeLaterIfNeeded(() -> { if (myPackages.getSelectedValue() == pyPackage) { myDescriptionTextArea.setText(details); myDescriptionTextArea.setCaretPosition(0); }/* else { do nothing, because other package gets selected }*/ }); }