code: void submit() {
  
          CmsResource target = m_context.getResources().get(0);
          String resPath = m_context.getCms().getSitePath(target);
          try {
              m_context.getCms().copyResourceToProject(resPath);
  
              m_context.finish(Collections.singletonList(target.getStructureId()));
          } catch (CmsException e) {
              m_context.error(e);
          }
      }
docs: Submits the dialog.<p>