public ComponentOperator open() {
   EditorWindowOperator.btDown().clickForPopup();
   ComponentOperator popupComponent =
       new ComponentOperator(
           EditorWindowOperator.btDown()
               .getContainer(
                   ComponentSearcher.getTrueChooser(
                       "org.netbeans.core.windows.view.ui.RecentViewListDlg")));
   return popupComponent;
 }
示例#2
0
  public void openProjects() {
    EAR_PROJECT_FILE = new File(getDataDir(), EAR_PROJECT_NAME);
    try {
      openProjects(EAR_PROJECT_FILE.getAbsolutePath());
      waitScanFinished();
      EJB_PROJECT_FILE = new File(EAR_PROJECT_FILE, EAR_PROJECT_NAME + "-ejb");
      openProjects(EJB_PROJECT_FILE.getAbsolutePath());
      waitScanFinished();
      WEB_PROJECT_FILE = new File(EAR_PROJECT_FILE, EAR_PROJECT_NAME + "-war");
      openProjects(WEB_PROJECT_FILE.getAbsolutePath());
      waitScanFinished();
    } catch (IOException ex) {
      System.out.println("IOException " + ex.getMessage());
    }

    String files[] = {"TestingSession", "TestingEntity"};
    for (int i = 0; i < files.length; i++) {
      Node openFile =
          new Node(
              new ProjectsTabOperator().getProjectRootNode(EJBValidation.EJB_PROJECT_NAME),
              Bundle.getStringTrimmed(
                      "org.netbeans.modules.j2ee.ejbjar.project.ui.Bundle", "LBL_node")
                  + "|"
                  + files[i]);
      new OpenAction().performAPI(openFile);
      EditorWindowOperator.getEditor(files[i] + "Bean.java");
    }
    new org.netbeans.jemmy.EventTool().waitNoEvent(2000);
  }
 @Override
 public void shutdown() {
   EditorWindowOperator.closeDiscard();
 }