KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2007 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 java.util.List JavaDoc;
15
16 import org.eclipse.core.expressions.Expression;
17 import org.eclipse.jface.action.IContributionItem;
18 import org.eclipse.ui.menus.IMenuService;
19
20 /**
21  * Internal baseclass for Workbench and Window menu service implementations.
22  * Methods in this class might some day make sense to live in IMenuService.
23  *
24  * @since 3.3
25  *
26  */

27 public abstract class InternalMenuService implements IMenuService {
28
29     /**
30      * Ties an expression to {@link IContributionItem#setVisible(boolean)}.
31      *
32      * @param item
33      * the item
34      * @param visibleWhen
35      * the expression
36      * @param restriction
37      * the restriction expression
38      * @param identifierId
39      * the activity identifier id
40      */

41     public abstract void registerVisibleWhen(final IContributionItem item,
42             final Expression visibleWhen, final Expression restriction, String JavaDoc identifierID);
43
44     /**
45      * Removes any expressions bound to
46      * {@link IContributionItem#setVisible(boolean)} of the given item
47      *
48      * @param item
49      * the item to unbind
50      */

51     public abstract void unregisterVisibleWhen(IContributionItem item);
52
53     /**
54      * Return a list of {@link MenuAdditionCacheEntry} objects that are
55      * contributed at the given uri.
56      *
57      * @param uri
58      * the uri to search on
59      * @return the list of items
60      */

61     public abstract List JavaDoc getAdditionsForURI(MenuLocationURI uri);
62
63 }
64
Popular Tags