MenuManager filtermenu = new MenuManager("Filters");
StatusFilter filter = new StatusFilter();
nameFilter = new NameFilter();
nameChanges.addPropertyChangeListener(nameFilter);
filtermenu.add(new FilterAction(viewer, "Successful builds", "Show successful builds", Activator.PREF_FILTER_SUCCESS, filter));
filtermenu.add(new FilterAction(viewer, "Failed builds", "Show failed builds", Activator.PREF_FILTER_FAIL, filter));
filtermenu.add(new FilterAction(viewer, "Test failures", "Show builds with test failures", Activator.PREF_FILTER_FAIL_TEST, filter));
filtermenu.add(new FilterAction(viewer, "Unbuilt projects", "Show projects which have not been built yet", Activator.PREF_FILTER_NO_BUILD, filter));
FilterAction nameFilterAction = new FilterAction(viewer, "Name Filter", "Show Projects by Name", Activator.PREF_FILTER_NAME, nameFilter);
nameFilterAction.addPropertyChangeListener(new IPropertyChangeListener() {
public void propertyChange(
org.eclipse.jface.util.PropertyChangeEvent event) {
if(nameText!=null && nameText.isDisposed()==false)
nameText.setEnabled(((Boolean)event.getNewValue()).booleanValue());
}