KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 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.core.expressions.Expression;
15 import org.eclipse.jface.action.IContributionItem;
16 import org.eclipse.ui.internal.services.EvaluationResultCache;
17
18 /**
19  * @since 3.3
20  *
21  */

22 public class MenuActivation extends EvaluationResultCache implements
23         IMenuActivation {
24
25     private IContributionItem fItem;
26
27     /**
28      * @param item
29      * this contribution ite
30      * @param visibleWhen
31      * when it's visible
32      * @param auth
33      * the menu authority responsible for this cache
34      */

35     public MenuActivation(IContributionItem item, Expression visibleWhen) {
36         super(visibleWhen);
37         fItem = item;
38     }
39
40     /*
41      * (non-Javadoc)
42      *
43      * @see org.eclipse.ui.internal.menus.IMenuActivation#getContribution()
44      */

45     public IContributionItem getContribution() {
46         return fItem;
47     }
48 }
49
Popular Tags