Skip to main content
summaryrefslogtreecommitdiffstats
blob: e322f4391bad9f67a84862abe285e6721876de60 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*******************************************************************************
 * Copyright (c) 2001, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.wst.wsdl.ui.internal.actions;

import org.eclipse.ui.IActionBars;
import org.eclipse.wst.xml.ui.actions.ActionContributorXML;


/**
 * SourcePageActionContributor
 * 
 * This class is for multi page editor's source page contributor.
 *
 * Use WSDLEditorActionContributor for single page editor
 * */
public class SourcePageActionContributor extends ActionContributorXML {

	private IActionBars fBars;

	/**
	 * This method calls:
	 * <ul>
	 *  <li><code>contributeToMenu</code> with <code>bars</code>' menu manager</li>
	 *  <li><code>contributeToToolBar</code> with <code>bars</code>' tool bar
	 *    manager</li>
	 *  <li><code>contributeToStatusLine</code> with <code>bars</code>' status line
	 *    manager</li>
	 * </ul>
	 * The given action bars are also remembered and made accessible via 
	 * <code>getActionBars</code>.
	 * 
	 * @param bars the action bars
	 * 
	 */
	public void init(IActionBars bars) {
		fBars = bars;
		contributeToMenu(bars.getMenuManager());
		contributeToToolBar(bars.getToolBarManager());
		contributeToStatusLine(bars.getStatusLineManager());
	}

	/**
	 * Returns this contributor's action bars.
	 *
	 * @return the action bars
	 */
	public IActionBars getActionBars() {
		return fBars;
	}
}

Back to the top