KickJava   Java API By Example, From Geeks To Geeks.

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


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.jface.action.Action;
15
16 import org.eclipse.ui.PlatformUI;
17
18 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
19 import org.eclipse.jdt.internal.ui.JavaPluginImages;
20
21 class RefreshAction extends Action {
22     private CallHierarchyViewPart fPart;
23
24     public RefreshAction(CallHierarchyViewPart part) {
25         fPart= part;
26         setText(CallHierarchyMessages.RefreshAction_text);
27         setToolTipText(CallHierarchyMessages.RefreshAction_tooltip);
28         JavaPluginImages.setLocalImageDescriptors(this, "refresh_nav.gif");//$NON-NLS-1$
29
setActionDefinitionId("org.eclipse.ui.file.refresh"); //$NON-NLS-1$
30
PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_REFRESH_ACTION);
31     }
32
33     /**
34      * @see org.eclipse.jface.action.Action#run()
35      */

36     public void run() {
37         fPart.refresh();
38     }
39 }
40
Popular Tags