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;
11:
12: import org.eclipse.jface.action.IAction;
13:
14: /**
15: * Interface for an object action that is contributed into a popup menu
16: * for a view or editor. It extends <code>IActionDelegate</code>
17: * and adds an initialization method for connecting the delegate to the
18: * part it should work with.
19: */
20: public interface IObjectActionDelegate extends IActionDelegate {
21: /**
22: * Sets the active part for the delegate. The active part is commonly used
23: * to get a working context for the action, such as the shell for any dialog
24: * which is needed.
25: * <p>
26: * This method will be called every time the action appears in a popup menu.
27: * The targetPart may change with each invocation.
28: * </p>
29: *
30: * @param action
31: * the action proxy that handles presentation portion of the
32: * action; must not be <code>null</code>.
33: * @param targetPart
34: * the new part target; must not be <code>null</code>.
35: */
36: public void setActivePart(IAction action, IWorkbenchPart targetPart);
37: }
|