KickJava   Java API By Example, From Geeks To Geeks.

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


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 action that is contributed into an editor-activated menu or
17  * tool bar. It extends <code>IActionDelegate</code> and adds a method for
18  * connecting the delegate to the editor it should work with. Since there is
19  * always only one action delegate per editor type, this method supplies the
20  * link to the currently active editor instance.
21  */

22 public interface IEditorActionDelegate extends IActionDelegate {
23     /**
24      * Sets the active editor for the delegate.
25      * Implementors should disconnect from the old editor, connect to the
26      * new editor, and update the action to reflect the new editor.
27      *
28      * @param action the action proxy that handles presentation portion of the action
29      * @param targetEditor the new editor target
30      */

31     public void setActiveEditor(IAction action, IEditorPart targetEditor);
32 }
33
Popular Tags