docs: private void updateProjectResources() throws CmsException {
  
          CmsObject cms = A_CmsUI.getCmsObject();
          Set<String> resourceRootPaths = getResourcePaths();
          // write the edited project resources
          CmsProject currentProject = cms.getRequestContext().getCurrentProject();
          // change the current project
          cms.getRequestContext().setCurrentProject(m_project);
          // store the current site root
          String currentSite = cms.getRequestContext().getSiteRoot();
          // copy the resources to the current project
          try {
              // switch to the root site
              cms.getRequestContext().setSiteRoot("");
              // remove deleted resources
              for (String resName : cms.readProjectResources(m_project)) {
                  if (!resourceRootPaths.contains(resName)) {
                      cms.removeResourceFromProject(resName);
                  }
              }
              // read project resources again!
              List<String> currentResNames = cms.readProjectResources(m_project);
              // copy missing resources
              for (String resName : resourceRootPaths) {
                  if (!currentResNames.contains(resName)) {
                      cms.copyResourceToProject(resName);
                  }
              }
          } finally {
              // switch back to current site and project
              cms.getRequestContext().setSiteRoot(currentSite);
              cms.getRequestContext().setCurrentProject(currentProject);
          }
      }