private static @NotNull DataContext calculateContext() {
      IdeFocusManager focusManager = IdeFocusManager.findInstance();
      Component focusedComponent = focusManager.getFocusOwner();
      Window ideWindow = focusManager.getLastFocusedIdeWindow();
      return ideWindow == focusedComponent || focusedComponent == focusManager.getLastFocusedFor(ideWindow)
             ? DataManager.getInstance().getDataContext(focusedComponent)
             : DataManager.getInstance().getDataContext();
    }
private static @NotNull DataContext calculateContext()