KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > navigator > filters > SelectFiltersAction


1 /*******************************************************************************
2  * Copyright (c) 2003, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 /*
12  * Created on Feb 9, 2004
13  *
14  */

15 package org.eclipse.ui.internal.navigator.filters;
16
17 import org.eclipse.jface.action.Action;
18 import org.eclipse.jface.action.IAction;
19 import org.eclipse.ui.internal.navigator.CommonNavigatorMessages;
20 import org.eclipse.ui.navigator.CommonViewer;
21
22 /**
23  *
24  * <p>
25  * <strong>EXPERIMENTAL</strong>. This class or interface has been added as part of a work in
26  * progress. There is a guarantee neither that this API will work nor that it will remain the same.
27  * Please do not use this API without consulting with the Platform/UI team.
28  * </p>
29  *
30  * @since 3.2
31  */

32 public class SelectFiltersAction extends Action implements IAction {
33
34     private final CommonViewer commonViewer;
35     private FilterActionGroup filterGroup;
36
37     /**
38      * Create an action to drive the Filter selection dialog
39      * for a particular instance of the CommonViewer.
40      * @param aCommonViewer
41      * @param aFilterGroup
42      */

43     public SelectFiltersAction(CommonViewer aCommonViewer, FilterActionGroup aFilterGroup) {
44         super(CommonNavigatorMessages.SelectFiltersActionDelegate_0);
45         setToolTipText(CommonNavigatorMessages.SelectFiltersActionDelegate_1);
46         commonViewer = aCommonViewer;
47         filterGroup = aFilterGroup;
48     }
49
50     public void run() {
51         CommonFilterSelectionDialog filterSelectionDialog = new CommonFilterSelectionDialog(commonViewer);
52         filterSelectionDialog.open();
53         filterGroup.updateFilterShortcuts();
54     }
55
56 }
57
Popular Tags