IAction openFilterDialogAction= new Action(FilterMessages.getString("OpenCustomFiltersDialogAction.text")) { public void run() { openDialog(); } }; openFilterDialogAction.setToolTipText(FilterMessages.getString("OpenCustomFiltersDialogAction.tooltip")); viewMenu.add(openFilterDialogAction);
viewMenu.add(new ContributionItem() { public void fill(Menu menu, int index) { MenuItem mi= new MenuItem(menu, SWT.RADIO, index); mi.setText(FilterMessages.getString("OpenCustomFiltersDialogAction.text")); mi.setSelection(areUserDefinedPatternsEnabled() || getEnabledFilterIds().length > 0); mi.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { openDialog(); } }); } public boolean isDynamic() { return true; } });
	private void fillViewMenu(IMenuManager viewMenu) {		IAction openFilterDialogAction=			new Action(FilterMessages.getString("OpenCustomFiltersDialogAction.text")) { //$NON-NLS-1$				public void run() {					openDialog();				}			};		openFilterDialogAction.setToolTipText(FilterMessages.getString("OpenCustomFiltersDialogAction.tooltip")); //$NON-NLS-1$		viewMenu.add(openFilterDialogAction);	}