protected TestNGMethodWizardPage(List<JavaElement> elements) {
    super(ResourceUtil.getString("NewTestNGClassWizardPage.title"));
    setTitle(ResourceUtil.getString("NewTestNGClassWizardPage.title"));
    setDescription(ResourceUtil.getString("TestNGMethodWizardPage.description"));
    for (JavaElement je : elements) {
      if (je.compilationUnit != null) {
        try {
          for (IType type : je.compilationUnit.getTypes()) {
            for (IMethod method : type.getMethods()) {
              m_elements.add(method);
            }
          }
        } catch (JavaModelException ex) {
          // ignore
        }
      }
    }
    Collections.sort(
        m_elements,
        new Comparator<IMethod>() {

          public int compare(IMethod o1, IMethod o2) {
            return o1.getElementName().compareTo(o2.getElementName());
          }
        });
  }
  private void createBottom(Composite parent) {
    //
    // Annotations
    //
    {
      Group g = new Group(parent, SWT.SHADOW_ETCHED_OUT);
      g.setText("Annotations");
      GridData gd = new GridData(GridData.FILL_HORIZONTAL);
      g.setLayoutData(gd);

      GridLayout layout = new GridLayout();
      g.setLayout(layout);
      layout.numColumns = 3;

      for (String label : ANNOTATIONS) {
        if ("".equals(label)) {
          new Label(g, SWT.NONE);
        } else {
          Button b = new Button(g, "".equals(label) ? SWT.None : SWT.CHECK);
          m_annotations.put(label, b);
          b.setText("@" + label);
        }
      }
    }

    //
    // XML suite file
    //
    {
      Composite container = SWTUtil.createGridContainer(parent, 2);

      //
      // Label
      //
      Label label = new Label(container, SWT.NULL);
      label.setText(ResourceUtil.getString("TestNG.newClass.suitePath"));

      //
      // Text widget
      //
      m_xmlFilePath = new Text(container, SWT.SINGLE | SWT.BORDER);
      GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.GRAB_HORIZONTAL);
      gd.grabExcessHorizontalSpace = true;
      m_xmlFilePath.setLayoutData(gd);
    }
  }
 public NewTestNGClassWizardPage() {
   super(ResourceUtil.getString("NewTestNGClassWizardPage.title"));
   setTitle(ResourceUtil.getString("NewTestNGClassWizardPage.title"));
   setDescription(ResourceUtil.getString("NewTestNGClassWizardPage.description"));
 }