KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > IObjectActionDelegate


1 /*******************************************************************************
2  * Copyright (c) 2000, 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 package org.eclipse.ui;
12
13 import org.eclipse.jface.action.IAction;
14
15 /**
16  * Interface for an object action that is contributed into a popup menu
17  * for a view or editor. It extends <code>IActionDelegate</code>
18  * and adds an initialization method for connecting the delegate to the
19  * part it should work with.
20  */

21 public interface IObjectActionDelegate extends IActionDelegate {
22     /**
23      * Sets the active part for the delegate. The active part is commonly used
24      * to get a working context for the action, such as the shell for any dialog
25      * which is needed.
26      * <p>
27      * This method will be called every time the action appears in a popup menu.
28      * The targetPart may change with each invocation.
29      * </p>
30      *
31      * @param action
32      * the action proxy that handles presentation portion of the
33      * action; must not be <code>null</code>.
34      * @param targetPart
35      * the new part target; must not be <code>null</code>.
36      */

37     public void setActivePart(IAction action, IWorkbenchPart targetPart);
38 }
39
Popular Tags