01: /*******************************************************************************
02: * Copyright (c) 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.views.properties.tabbed;
11:
12: import org.eclipse.ui.IActionBars;
13:
14: /**
15: * Allows a tabbed properties view to make contributions to action bars.
16: * <p>
17: * An action provider is called when the tabbed properties view becomes the
18: * active view. It is at this point where the action provider can override the
19: * action bars.
20: * </p>
21: * <p>
22: * Normally {@link TabbedPropertySheetPage#setActionBars(IActionBars)} is
23: * sufficient, but this is only called once and is not sufficient for a
24: * contributor that is selection based. An example is the Project Explorer where
25: * different providers contribute different action sets and properties
26: * configurations.
27: * </p>
28: * <p>
29: * The most frequent use of setActionBars() is to retarget the global actions
30: * for undo and redo based on the active tabbed properties view contributor.
31: * </p>
32: *
33: * @author Anthony Hunter
34: * @since 3.2.1
35: */
36: public interface IActionProvider {
37:
38: /**
39: * Allows the page to make contributions to the given action bars. The
40: * contributions will be visible when the page is visible.
41: *
42: * @param contributor
43: * the tabbed property sheet page contributor.
44: * @param actionBars
45: * the action bars for this page
46: */
47: public void setActionBars(
48: ITabbedPropertySheetPageContributor contributor,
49: IActionBars actionBars);
50: }
|