KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > debug > internal > ui > launchConfigurations > FilterLaunchConfigurationAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 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 package org.eclipse.debug.internal.ui.launchConfigurations;
12
13 import org.eclipse.debug.internal.ui.DebugUIPlugin;
14 import org.eclipse.debug.internal.ui.IInternalDebugUIConstants;
15 import org.eclipse.debug.internal.ui.SWTFactory;
16 import org.eclipse.debug.ui.DebugUITools;
17 import org.eclipse.jface.action.Action;
18 import org.eclipse.jface.action.IAction;
19 import org.eclipse.jface.action.IMenuCreator;
20 import org.eclipse.jface.resource.ImageDescriptor;
21
22 /**
23  * provides the implementation of the filtering action for the launch configuration view within the
24  * Launch Configuration Dialog
25  * @since 3.2
26  */

27 public class FilterLaunchConfigurationAction extends Action {
28
29     /**
30      * Action identifier for IDebugView#getAction(String)
31      */

32     public static final String JavaDoc ID_FILTER_ACTION = DebugUIPlugin.getUniqueIdentifier() + ".ID_FILTER_ACTION"; //$NON-NLS-1$
33

34     /**
35      * the menu for this drop down style action
36      */

37     private FilterDropDownMenuCreator fMenuCreator;
38     
39     /**
40      * Constructor
41      * @param text the text for the action
42      * @param viewer the viewer the action acts upon
43      * @param mode the mode
44      */

45     public FilterLaunchConfigurationAction() {
46         super(LaunchConfigurationsMessages.FilterLaunchConfigurationAction_0, IAction.AS_DROP_DOWN_MENU);
47         fMenuCreator = new FilterDropDownMenuCreator();
48     }
49
50     /* (non-Javadoc)
51      * @see org.eclipse.jface.action.Action#run()
52      */

53     public void run() {
54         SWTFactory.showPreferencePage("org.eclipse.debug.ui.LaunchConfigurations"); //$NON-NLS-1$
55
}
56
57     /* (non-Javadoc)
58      * @see org.eclipse.jface.action.Action#getDescription()
59      */

60     public String JavaDoc getDescription() {
61         return LaunchConfigurationsMessages.LaunchConfigurationsDialog_4;
62     }
63
64     /* (non-Javadoc)
65      * @see org.eclipse.jface.action.Action#getDisabledImageDescriptor()
66      */

67     public ImageDescriptor getDisabledImageDescriptor() {
68         return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_FILTER_CONFIGS);
69     }
70
71     /* (non-Javadoc)
72      * @see org.eclipse.jface.action.Action#getImageDescriptor()
73      */

74     public ImageDescriptor getImageDescriptor() {
75         return DebugUITools.getImageDescriptor(IInternalDebugUIConstants.IMG_ELCL_FILTER_CONFIGS);
76     }
77
78     /* (non-Javadoc)
79      * @see org.eclipse.jface.action.Action#getMenuCreator()
80      */

81     public IMenuCreator getMenuCreator() {
82         return fMenuCreator;
83     }
84
85     /* (non-Javadoc)
86      * @see org.eclipse.jface.action.Action#getToolTipText()
87      */

88     public String JavaDoc getToolTipText() {
89         return LaunchConfigurationsMessages.LaunchConfigurationsDialog_4;
90     }
91 }
92
Popular Tags