KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > views > markers > internal > FiltersAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 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 package org.eclipse.ui.views.markers.internal;
13
14 import org.eclipse.jface.action.Action;
15 import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
16
17 /**
18  * This action opens a Filters Dialog and notifies the Marker View if the user has
19  * modified the filter via the filters dialog.
20  */

21 class FiltersAction extends Action {
22
23     private MarkerView view;
24
25     /**
26      * Creates the action
27      */

28     public FiltersAction(MarkerView view) {
29         super(MarkerMessages.filtersAction_title);
30         setImageDescriptor(IDEWorkbenchPlugin.getIDEImageDescriptor("elcl16/filter_ps.gif")); //$NON-NLS-1$
31
setToolTipText(MarkerMessages.filtersAction_tooltip);
32         this.view = view;
33         setEnabled(true);
34     }
35
36     /**
37      * Opens the dialog. Notifies the view if the filter has been modified.
38      */

39     public void run() {
40         view.openFiltersDialog();
41     }
42 }
43
Popular Tags