private void createTestMenuItems(JMenu menu){
  JMenu dTests=new JMenu(Messages.getString("menu.tests.declarative"));
  JMenu cTests=new JMenu(Messages.getString("menu.tests.compiled"));
  menu.add(dTests);
  menu.add(cTests);
  ResourceBundle bundle=ResourceBundle.getBundle("org.dyn4j.sandbox.tests.list");
  List<String> keys=Collections.list(bundle.getKeys());
  Collections.sort(keys);
  for (  String key : keys) {
    String value=bundle.getString(key);
    JMenuItem mnuTest=new JMenuItem(key);
    mnuTest.setActionCommand("test+" + value);
    mnuTest.addActionListener(this);
    if (value.contains(".xml")) {
      dTests.add(mnuTest);
    }
 else {
      cTests.add(mnuTest);
    }
  }
}

private void createTestMenuItems ( JMenu menu ) { JMenu dTests = new JMenu ( Messages . getString ( "menu.tests.declarative" ) ) ; JMenu cTests = new JMenu ( Messages . getString ( "menu.tests.compiled" ) ) ; menu . add ( dTests ) ; menu . add ( cTests ) ; ResourceBundle bundle = ResourceBundle . getBundle ( "org.dyn4j.sandbox.tests.list" ) ; List < String > keys = Collections . list ( bundle . getKeys ( ) ) ; Collections . sort ( keys ) ; for ( String key : keys ) { String value = bundle . getString ( key ) ; JMenuItem mnuTest = new JMenuItem ( key ) ; mnuTest . setActionCommand ( "test+" + value ) ; mnuTest . addActionListener ( this ) ; if ( value . contains ( ".xml" ) ) { dTests . add ( mnuTest ) ; } else { cTests . add ( mnuTest ) ; } } }
creates the test menu items and attaches them to the given menu .
