01: /*******************************************************************************
02: * Copyright (c) 2000, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal;
11:
12: import java.util.List;
13:
14: import org.eclipse.jface.action.IMenuManager;
15: import org.eclipse.jface.viewers.ISelectionProvider;
16: import org.eclipse.ui.IWorkbenchPart;
17:
18: /**
19: * This interface must be implemented in order to contribute
20: * to context (pop-up) menu for an object. Classes
21: * that implement this interface must register
22: * with the popup menu manager.
23: */
24: public interface IObjectActionContributor extends IObjectContributor {
25: /**
26: * Implement this method to add actions that deal with the currently
27: * selected object or objects. Actions should be added to the
28: * provided menu object. Current selection can be obtained from
29: * the given selection provider.
30: *
31: * @return <code>true</code> if any contributions were made, and <code>false</code> otherwise.
32: */
33: public boolean contributeObjectActions(IWorkbenchPart part,
34: IMenuManager menu, ISelectionProvider selProv,
35: List actionIdOverrides);
36:
37: /**
38: * Implement this method to add menus that deal with the currently
39: * selected object or objects. Menus should be added to the
40: * provided menu object. Current selection can be obtained from
41: * the given selection provider.
42: *
43: * @return <code>true</code> if any contributions were made, and <code>false</code> otherwise.
44: */
45: public boolean contributeObjectMenus(IMenuManager menu,
46: ISelectionProvider selProv);
47:
48: /**
49: * Contribute to the list the action identifiers from other contributions that
50: * this contribution wants to override. Actions of these identifiers will
51: * not be contributed.
52: */
53: public void contributeObjectActionIdOverrides(List actionIdOverrides);
54: }
|