01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal;
11:
12: import org.eclipse.jface.action.IMenuManager;
13: import org.eclipse.jface.action.IToolBarManager;
14: import org.eclipse.ui.IActionBars;
15: import org.eclipse.ui.SubActionBars;
16: import org.eclipse.ui.services.IServiceLocator;
17:
18: /**
19: * An editor container manages the services for an editor.
20: */
21: public class ViewActionBars extends SubActionBars {
22: private ViewPane pane;
23:
24: /**
25: * ViewActionBars constructor comment.
26: */
27: public ViewActionBars(IActionBars parent,
28: final IServiceLocator serviceLocator, ViewPane pane) {
29: super (parent, serviceLocator);
30: this .pane = pane;
31: }
32:
33: /**
34: * Returns the menu manager. If items are added or removed from the manager
35: * be sure to call <code>updateActionBars</code>.
36: *
37: * @return the menu manager
38: */
39: public IMenuManager getMenuManager() {
40: return pane.getMenuManager();
41: }
42:
43: /**
44: * Returns the tool bar manager. If items are added or removed from the
45: * manager be sure to call <code>updateActionBars</code>.
46: *
47: * @return the tool bar manager
48: */
49: public IToolBarManager getToolBarManager() {
50: return pane.getToolBarManager();
51: }
52:
53: /**
54: * Commits all UI changes. This should be called after additions or
55: * subtractions have been made to a menu, status line, or toolbar.
56: */
57: public void updateActionBars() {
58: pane.updateActionBars();
59: getStatusLineManager().update(false);
60: fireActionHandlersChanged();
61: }
62: }
|