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 action that is contributed into an editor-activated menu or
16: * tool bar. It extends <code>IActionDelegate</code> and adds a method for
17: * connecting the delegate to the editor it should work with. Since there is
18: * always only one action delegate per editor type, this method supplies the
19: * link to the currently active editor instance.
20: */
21: public interface IEditorActionDelegate extends IActionDelegate {
22: /**
23: * Sets the active editor for the delegate.
24: * Implementors should disconnect from the old editor, connect to the
25: * new editor, and update the action to reflect the new editor.
26: *
27: * @param action the action proxy that handles presentation portion of the action
28: * @param targetEditor the new editor target
29: */
30: public void setActiveEditor(IAction action, IEditorPart targetEditor);
31: }
|