void (ServiceViewItem item, Content content) { if (item != null) { WeakReference<ServiceViewItem> itemRef = new WeakReference<>(item); AppUIExecutor.onUiThread().expireWith(content).submit(() -> { ServiceViewItem viewItem = itemRef.get(); if (viewItem == null) return; ItemPresentation itemPresentation = viewItem.getViewDescriptor().getContentPresentation(); content.setDisplayName(ServiceViewDragHelper.getDisplayName(itemPresentation)); content.setIcon(itemPresentation.getIcon(false)); content.setTabColor(viewItem.getColor()); }); } }