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.part;
11:
12: import org.eclipse.jface.action.MenuManager;
13: import org.eclipse.jface.viewers.ISelectionProvider;
14: import org.eclipse.ui.IActionBars;
15: import org.eclipse.ui.IWorkbenchSite;
16:
17: /**
18: * The primary interface between a page and the outside world.
19: * <p>
20: * The workbench exposes its implemention of page sites via this interface,
21: * which is not intended to be implemented or extended by clients.
22: * </p>
23: */
24:
25: public interface IPageSite extends IWorkbenchSite {
26: /**
27: * Registers a pop-up menu with a particular id for extension.
28: * <p>
29: * Within the workbench one plug-in may extend the pop-up menus for a view
30: * or editor within another plug-in. In order to be eligible for extension,
31: * the menu must be registered by calling <code>registerContextMenu</code>.
32: * Once this has been done the workbench will automatically insert any action
33: * extensions which exist.
34: * </p>
35: * <p>
36: * A unique menu id must be provided for each registered menu. This id should
37: * be published in the Javadoc for the page.
38: * </p>
39: * <p>
40: * Any pop-up menu which is registered with the workbench should also define a
41: * <code>GroupMarker</code> in the registered menu with id
42: * <code>IWorkbenchActionConstants.MB_ADDITIONS</code>. Other plug-ins will use this
43: * group as a reference point for insertion. The marker should be defined at an
44: * appropriate location within the menu for insertion.
45: * </p>
46: *
47: * @param menuId the menu id
48: * @param menuManager the menu manager
49: * @param selectionProvider the selection provider
50: */
51: public void registerContextMenu(String menuId,
52: MenuManager menuManager,
53: ISelectionProvider selectionProvider);
54:
55: /**
56: * Returns the action bars for this page site.
57: * Pages have exclusive use of their site's action bars.
58: *
59: * @return the action bars
60: */
61: public IActionBars getActionBars();
62: }
|