KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > ui > callhierarchy > CancelSearchAction


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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  * Jesper Kamstrup Linnet (eclipse@kamstrup-linnet.dk) - initial API and implementation
10  * (report 36180: Callers/Callees view)
11  *******************************************************************************/

12 package org.eclipse.jdt.internal.ui.callhierarchy;
13
14 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
15 import org.eclipse.jdt.internal.ui.JavaPluginImages;
16 import org.eclipse.jface.action.Action;
17
18 import org.eclipse.ui.PlatformUI;
19
20 /**
21  * This class is copied from the org.eclipse.search2.internal.ui.CancelSearchAction class.
22  */

23 public class CancelSearchAction extends Action {
24
25     private CallHierarchyViewPart fView;
26
27     public CancelSearchAction(CallHierarchyViewPart view) {
28         super(CallHierarchyMessages.CancelSearchAction_label);
29         fView= view;
30         setToolTipText(CallHierarchyMessages.CancelSearchAction_tooltip);
31         JavaPluginImages.setLocalImageDescriptors(this, "ch_cancel.gif"); //$NON-NLS-1$
32

33         PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_CANCEL_SEARCH_ACTION);
34 }
35     
36     public void run() {
37         fView.cancelJobs();
38     }
39 }
40
Popular Tags