private void updateUsagePreview(@NotNull Project project, JBTable table) {
    int index = table.getSelectionModel().getLeadSelectionIndex();
    if (index != -1 && index < myKeyValuePairs.size()) {
      myUsagePreviewPanel.updateLayout(project, myUsagePreviewProvider.apply(myKeyValuePairs.get(index).contextData()));
    }
    else {
      myUsagePreviewPanel.updateLayout(project, null);
    }
  }
private void updateUsagePreview(@NotNull Project project, JBTable table)