Project

General

Profile

Download (1.27 KB) Statistics
| Branch: | Tag: | Revision:
1
package eu.etaxonomy.taxeditor;
2

    
3
import org.eclipse.ui.IWorkbenchWindow;
4
import org.eclipse.ui.actions.ActionFactory;
5
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
6
import org.eclipse.ui.application.ActionBarAdvisor;
7
import org.eclipse.ui.application.IActionBarConfigurer;
8

    
9
import eu.etaxonomy.taxeditor.store.StoreUtil;
10

    
11
/**
12
 * An action bar advisor is responsible for creating, adding, and disposing of
13
 * the actions added to a workbench window. Each window will be populated with
14
 * new actions.
15
 *
16
 * @author n.hoffmann
17
 * @version $Id: $
18
 */
19
public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
20

    
21
	private IWorkbenchAction saveAction;
22
	private IWorkbenchAction saveAllAction;
23

    
24
	/**
25
	 * <p>Constructor for ApplicationActionBarAdvisor.</p>
26
	 *
27
	 * @param configurer a {@link org.eclipse.ui.application.IActionBarConfigurer} object.
28
	 */
29
	public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
30
		super(configurer);
31
	}
32

    
33
	/** {@inheritDoc} */
34
	protected void makeActions(final IWorkbenchWindow window) {
35
		StoreUtil.setStatusLineManager(getActionBarConfigurer().getStatusLineManager());
36
		
37
		saveAction = ActionFactory.SAVE.create(window);
38
		register(saveAction);
39

    
40
		saveAllAction = ActionFactory.SAVE_ALL.create(window);
41
		register(saveAllAction);
42
	}
43
}
(2-2/10)