/**
   * Adds appropriate testcase libraries to the given project's reused projects set.
   *
   * @param newProject The project that will reuse the testcase libraries.
   */
  private void addUnboundModules(IProjectPO newProject) {

    // Use toolkit-specific module, and modules for all required toolkits
    ToolkitDescriptor desc =
        ComponentBuilder.getInstance()
            .getCompSystem()
            .getToolkitDescriptor(newProject.getToolkit());

    while (desc != null) {
      try {
        String moduleName = LIBRARY_PREFIX + desc.getName();
        IProjectPO ubmProject = ProjectPM.loadLatestVersionOfProjectByName(moduleName);
        if (ubmProject != null) {
          newProject.addUsedProject(PoMaker.createReusedProjectPO(ubmProject));
        } else {
          if (log.isInfoEnabled()) {
            log.info(
                Messages.Project
                    + StringConstants.SPACE
                    + StringConstants.APOSTROPHE
                    + moduleName
                    + StringConstants.APOSTROPHE
                    + Messages.DoesNotExist
                    + StringConstants.DOT);
          }
        }
      } catch (JBException e) {
        log.error(e + StringConstants.COLON + StringConstants.SPACE + e.getMessage());
      }
      desc =
          ComponentBuilder.getInstance().getCompSystem().getToolkitDescriptor(desc.getIncludes());
    }
  }
Beispiel #2
0
 /** Initialize this instance */
 private void init() {
   Map map = ComponentBuilder.getInstance().getCompSystem().getEventTypes();
   Set mapKeySet = map.keySet();
   for (Object object : mapKeySet) {
     String key = (String) object;
     getDefaultEventHandler().put(key, (Integer) map.get(key));
   }
 }