public @Nullable Component getFocusedComponent(@Nullable Project project) {
    synchronized (myLock) {
      Window window = getFocusedWindowForProject(project);
      if (window == null) {
        return null;
      }
      return getFocusedComponent(window);
    }
  }
public @Nullable Component getFocusedComponent(@Nullable Project project)