@@ -0,0 +1,2406 @@
+package org.csstudio.iter.alarm.beast.ui.alarmtable.actions;%0A%0Aimport org.csstudio.alarm.beast.client.AlarmTreeItem;%0Aimport org.csstudio.alarm.beast.client.AlarmTreeRoot;%0Aimport org.csstudio.iter.alarm.beast.ui.alarmtable.AlarmTableView;%0Aimport org.csstudio.iter.alarm.beast.ui.alarmtable.Messages;%0Aimport org.eclipse.jface.action.Action;%0Aimport org.eclipse.jface.dialogs.IInputValidator;%0Aimport org.eclipse.jface.dialogs.InputDialog;%0Aimport org.eclipse.jface.window.Window;%0Aimport org.eclipse.osgi.util.NLS;%0A%0A/**%0A * %0A * %3Ccode%3EShowFilterAction%3C/code%3E opens a dialog through which user can type in the name of the alarm tree item %0A * to use for filtering. %0A *%0A * @author %3Ca href=%22mailto:jaka.bobnar@cosylab.com%22%3EJaka Bobnar%3C/a%3E%0A *%0A */%0Apublic class ShowFilterAction extends Action %7B%0A%0A    private final AlarmTableView view;%0A    %0A    public ShowFilterAction(AlarmTableView view) %7B%0A        super(Messages.SelectFilter, AS_PUSH_BUTTON);%0A        this.view = view;%0A    %7D%0A    %0A    @Override%0A    public void run() %7B%0A        AlarmTreeItem currentItem = view.getFilterItem();%0A        final AlarmTreeRoot rootItem = view.getModel().getConfigTree().getRoot();%0A        String item = rootItem.getPathName();%0A        if (currentItem != null) %7B%0A            item = currentItem.getPathName();%0A        %7D%0A        InputDialog dialog = new InputDialog(view.getViewSite().getShell(), %0A                Messages.SelectFilterDialogTitle, Messages.SelectFilterDialogMessage,%0A                item, new IInputValidator()%7B%0A            @Override%0A            public String isValid(String newText) %7B%0A                if (newText == null %7C%7C newText.isEmpty()) %7B%0A                    return null;%0A                %7D%0A                AlarmTreeItem item = rootItem.getItemByPath(newText);%0A                if (item == null) %7B%0A                    return NLS.bind(Messages.SelectFilterItemNonExisting, newText);%0A                %7D%0A                return null;%0A            %7D%0A        %7D);%0A        if (dialog.open() == Window.OK) %7B%0A            String newValue = dialog.getValue();%0A            if (newValue == null %7C%7C newValue.isEmpty() %7C%7C newValue.equals(rootItem.getPathName())) %7B%0A                view.setSyncAlarmsWithTreeSelection(false);%0A            %7D else %7B%0A                view.setSyncAlarmsWithTreeSelection(true);%0A                view.setLockTreeSelection(true);%0A                view.setFilterItem(newValue);%0A            %7D%0A        %7D%0A        %0A    %7D%0A%7D%0A

Add the action.