dc82904c1e49e88af73013e8e921585bc3493356
[taxeditor.git] / taxeditor-application / src / main / java / eu / etaxonomy / taxeditor / ApplicationActionBarAdvisor.java
1 package eu.etaxonomy.taxeditor;
2
3 import org.eclipse.jface.action.IMenuManager;
4 import org.eclipse.ui.IWorkbenchWindow;
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.editor.EditorUtil;
10 import eu.etaxonomy.taxeditor.navigation.NavigationUtil;
11
12 /**
13 * An action bar advisor is responsible for creating, adding, and disposing of
14 * the actions added to a workbench window. Each window will be populated with
15 * new actions.
16 */
17 public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
18
19 // Actions - important to allocate these only in makeActions, and then use
20 // them
21 // in the fill methods. This ensures that the actions aren't recreated
22 // when fillActionBars is called with FILL_PROXY.
23 private IWorkbenchAction exitAction;
24
25 public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
26 super(configurer);
27 }
28
29 protected void makeActions(final IWorkbenchWindow window) {
30 NavigationUtil.setStatusLineManager(getActionBarConfigurer().getStatusLineManager());
31 EditorUtil.setStatusLineManager(getActionBarConfigurer().getStatusLineManager());
32 }
33
34 protected void fillMenuBar(IMenuManager menuBar) {
35 }
36
37 }