MenuItem s1 = new MenuItem(menu, SWT.RADIO); s1.setText("1 (Least Severe)"); MenuItem s2 = new MenuItem(menu, SWT.RADIO); s2.setText("2"); MenuItem s3 = new MenuItem(menu, SWT.RADIO); s3.setText("3"); MenuItem s4 = new MenuItem(menu, SWT.RADIO); s4.setText("4"); MenuItem s5 = new MenuItem(menu, SWT.RADIO); s5.setText("5 (Most Severe)");
SelectionListener menuItemSelectionListener = new SelectionAdapter() {  public void widgetSelected(SelectionEvent e) { Widget w = e.widget; int index; for (index = 0; index < severityItemList.length; ++index) { if (w == severityItemList[index]) break; }  if (index < severityItemList.length) { if (bugInstance != null) { bugInstance.setProperty(BugProperty.SEVERITY, String.valueOf(index + 1)); } } } };  severityItemList = new MenuItem[SEVERITY_LABEL_LIST.length]; for (int i = 0; i < SEVERITY_LABEL_LIST.length; ++i) { MenuItem menuItem= new MenuItem(menu, SWT.RADIO); menuItem.setText(SEVERITY_LABEL_LIST[i]); menuItem.addSelectionListener(menuItemSelectionListener);  severityItemList[i] = menuItem; }   menu.addMenuListener(new MenuAdapter() {  public void menuShown(MenuEvent e) { syncMenu(); } });
	private void fillMenu() {		MenuItem s1 = new MenuItem(menu, SWT.RADIO);		s1.setText("1 (Least Severe)");		MenuItem s2 = new MenuItem(menu, SWT.RADIO);		s2.setText("2");		MenuItem s3 = new MenuItem(menu, SWT.RADIO);		s3.setText("3");		MenuItem s4 = new MenuItem(menu, SWT.RADIO);		s4.setText("4");		MenuItem s5 = new MenuItem(menu, SWT.RADIO);		s5.setText("5 (Most Severe)");	}