KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > navigator > resources > actions > EditActionProvider


1 /*******************************************************************************
2  * Copyright (c) 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.internal.navigator.resources.actions;
13
14 import org.eclipse.jface.action.IMenuManager;
15 import org.eclipse.ui.IActionBars;
16 import org.eclipse.ui.actions.ActionContext;
17 import org.eclipse.ui.navigator.CommonActionProvider;
18 import org.eclipse.ui.navigator.ICommonActionExtensionSite;
19
20 /**
21  * @since 3.2
22  *
23  */

24 public class EditActionProvider extends CommonActionProvider {
25      
26     private EditActionGroup editGroup;
27
28     private ICommonActionExtensionSite site;
29
30     /*
31      * (non-Javadoc)
32      *
33      * @see org.eclipse.ui.navigator.CommonActionProvider#init(org.eclipse.ui.navigator.ICommonActionExtensionSite)
34      */

35     public void init(ICommonActionExtensionSite anActionSite) {
36         site = anActionSite;
37         editGroup = new EditActionGroup(site.getViewSite().getShell());
38  
39     }
40
41     public void dispose() {
42         editGroup.dispose();
43     }
44
45     public void fillActionBars(IActionBars actionBars) {
46         editGroup.fillActionBars(actionBars);
47     }
48
49     public void fillContextMenu(IMenuManager menu) {
50         editGroup.fillContextMenu(menu);
51     }
52
53     public void setContext(ActionContext context) {
54         editGroup.setContext(context);
55     }
56
57     public void updateActionBars() {
58         editGroup.updateActionBars();
59     }
60 }
61
Popular Tags