KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > menus > IMenuContribution


1 /*******************************************************************************
2  * Copyright (c) 2005, 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.menus;
13
14 import org.eclipse.ui.internal.services.IEvaluationResultCache;
15
16 /**
17  * <p>
18  * A token representing the contribution of a menu element. This token can later
19  * be used to remove the contribution. Without this token, then the contribution
20  * will only become inactive if the component in which the handler was activated
21  * is destroyed.
22  * </p>
23  * <p>
24  * This interface is not intended to be implemented or extended by clients.
25  * </p>
26  * <p>
27  * <strong>PROVISIONAL</strong>. This class or interface has been added as part
28  * of a work in progress. There is a guarantee neither that this API will work
29  * nor that it will remain the same. Please do not use this API without
30  * consulting with the Platform/UI team.
31  * </p>
32  * <p>
33  * This class is meant to exist in the <code>org.eclipse.ui.menus</code>
34  * package.
35  * </p>
36  *
37  * @since 3.2
38  * @see org.eclipse.ui.ISources
39  * @see org.eclipse.ui.ISourceProvider
40  */

41 public interface IMenuContribution extends IEvaluationResultCache {
42
43     /**
44      * Returns the handler that should be activated.
45      *
46      * @return The handler; may be <code>null</code>.
47      */

48     public MenuElement getMenuElement();
49
50     /**
51      * Returns the menu service from which this contribution was requested. This
52      * is used to ensure that a contribution can only be retracted from the same
53      * service which issued it.
54      *
55      * @return The menu service; never <code>null</code>.
56      */

57     public IMenuService getMenuService();
58 }
59
Popular Tags