code: public void changeProject(CmsProject project) {
  
          CmsObject cms = getCmsObject();
          if (!cms.getRequestContext().getCurrentProject().equals(project)) {
              cms.getRequestContext().setCurrentProject(project);
              getWorkplaceSettings().setProject(project.getUuid());
              OpenCms.getSessionManager().updateSessionInfo(cms, getHttpSession());
              if (!project.isOnlineProject()) {
                  setAttribute(LAST_OFFLINE_PROJECT, project);
              }
          }
      }
docs: Changes to the given project. Will update session and workplace settings.<p>
  
  @param project the project to change to