KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > part > IPageSite


1 /*******************************************************************************
2  * Copyright (c) 2000, 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 package org.eclipse.ui.part;
12
13 import org.eclipse.jface.action.MenuManager;
14 import org.eclipse.jface.viewers.ISelectionProvider;
15 import org.eclipse.ui.IActionBars;
16 import org.eclipse.ui.IWorkbenchSite;
17
18 /**
19  * The primary interface between a page and the outside world.
20  * <p>
21  * The workbench exposes its implemention of page sites via this interface,
22  * which is not intended to be implemented or extended by clients.
23  * </p>
24  */

25
26 public interface IPageSite extends IWorkbenchSite {
27     /**
28      * Registers a pop-up menu with a particular id for extension.
29      * <p>
30      * Within the workbench one plug-in may extend the pop-up menus for a view
31      * or editor within another plug-in. In order to be eligible for extension,
32      * the menu must be registered by calling <code>registerContextMenu</code>.
33      * Once this has been done the workbench will automatically insert any action
34      * extensions which exist.
35      * </p>
36      * <p>
37      * A unique menu id must be provided for each registered menu. This id should
38      * be published in the Javadoc for the page.
39      * </p>
40      * <p>
41      * Any pop-up menu which is registered with the workbench should also define a
42      * <code>GroupMarker</code> in the registered menu with id
43      * <code>IWorkbenchActionConstants.MB_ADDITIONS</code>. Other plug-ins will use this
44      * group as a reference point for insertion. The marker should be defined at an
45      * appropriate location within the menu for insertion.
46      * </p>
47      *
48      * @param menuId the menu id
49      * @param menuManager the menu manager
50      * @param selectionProvider the selection provider
51      */

52     public void registerContextMenu(String JavaDoc menuId, 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 }
63
Popular Tags