KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > search > ui > IContextMenuContributor


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.search.ui;
12
13 import org.eclipse.jface.action.IMenuManager;
14 import org.eclipse.jface.viewers.IInputSelectionProvider;
15 import org.eclipse.jface.resource.ImageDescriptor;
16 import org.eclipse.jface.operation.IRunnableWithProgress;
17 import org.eclipse.jface.viewers.ILabelProvider;
18 import org.eclipse.jface.action.IAction;
19
20 /**
21  * Specify how clients can add menu items
22  * to the context menu of the search result view.
23  * A class that contributes context menu items
24  * must implement this interface and pass an
25  * instance of itself to the search result view.
26  *
27  * @see ISearchResultView#searchStarted(IActionGroupFactory, String, String, ImageDescriptor, String, ILabelProvider, IAction, IGroupByKeyComputer, IRunnableWithProgress)
28  * @deprecated Part of the old ('classic') search result view. Since 3.0 clients can create their own search result view pages (see {@link ISearchResultPage}), leaving it up to the page
29  * how to create actions in context menus.
30  */

31 public interface IContextMenuContributor {
32
33     /**
34      * Contributes menu items to the given context menu appropriate for the
35      * given selection.
36      *
37      * @param menu the menu to which the items are added
38      * @param inputProvider the selection and input provider
39      */

40     public void fill(IMenuManager menu, IInputSelectionProvider inputProvider);
41 }
42
Popular Tags