@Override
  public void loadedWorkspace(Workspace workspace) {
    closeWorkspaceMenuItem.setEnabled(true);

    String path = workspace.getWorkspaceFilePath();
    if (path.isEmpty()) {
      return;
    }

    HistoryOptions.Builder history =
        Config.getInstance().getPreferencesBuilder().getHistoryBuilder();
    ProtocolStringList recentWorkspace = history.getRecentWorkspaceList();
    if (!recentWorkspace.contains(path)) {
      var workspaces = new ArrayList<>(recentWorkspace);
      workspaces.add(path);
      history.clearRecentWorkspace();
      history.addAllRecentWorkspace(workspaces.subList(0, min(MAX_RECENT, workspaces.size())));

      removeAll();
      addSubmenuEntries();
    }
  }
The workspace menu that is visible under "File" initially and when managing workspaces in the
main window.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/tabpanels/projecttabpanel/menubar/WorkspaceMenu.java