public void scheduleUpdate(JComponent toUpdate) {
    toUpdate.setVisible(false);
    myDetector.detectProjects(projects -> toUpdate.setVisible(!(myProjectPaths = projects).isEmpty()));
  }
public void scheduleUpdate(JComponent toUpdate)