1 |
e8409423
|
n.hoffmann
|
package eu.etaxonomy.taxeditor;
|
2 |
|
|
|
3 |
|
|
import org.eclipse.ui.IWorkbenchWindow;
|
4 |
b661d932
|
p.ciardelli
|
import org.eclipse.ui.actions.ActionFactory;
|
5 |
|
|
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
|
6 |
e8409423
|
n.hoffmann
|
import org.eclipse.ui.application.ActionBarAdvisor;
|
7 |
|
|
import org.eclipse.ui.application.IActionBarConfigurer;
|
8 |
|
|
|
9 |
df60b579
|
n.hoffmann
|
import eu.etaxonomy.taxeditor.store.StoreUtil;
|
10 |
e8409423
|
n.hoffmann
|
|
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 |
3be6ef3e
|
n.hoffmann
|
*
|
16 |
|
|
* @author n.hoffmann
|
17 |
|
|
* @version $Id: $
|
18 |
e8409423
|
n.hoffmann
|
*/
|
19 |
|
|
public class ApplicationActionBarAdvisor extends ActionBarAdvisor {
|
20 |
|
|
|
21 |
b661d932
|
p.ciardelli
|
private IWorkbenchAction saveAction;
|
22 |
|
|
private IWorkbenchAction saveAllAction;
|
23 |
|
|
|
24 |
3be6ef3e
|
n.hoffmann
|
/**
|
25 |
|
|
* <p>Constructor for ApplicationActionBarAdvisor.</p>
|
26 |
|
|
*
|
27 |
|
|
* @param configurer a {@link org.eclipse.ui.application.IActionBarConfigurer} object.
|
28 |
|
|
*/
|
29 |
e8409423
|
n.hoffmann
|
public ApplicationActionBarAdvisor(IActionBarConfigurer configurer) {
|
30 |
|
|
super(configurer);
|
31 |
|
|
}
|
32 |
|
|
|
33 |
3be6ef3e
|
n.hoffmann
|
/** {@inheritDoc} */
|
34 |
e8409423
|
n.hoffmann
|
protected void makeActions(final IWorkbenchWindow window) {
|
35 |
df60b579
|
n.hoffmann
|
StoreUtil.setStatusLineManager(getActionBarConfigurer().getStatusLineManager());
|
36 |
b661d932
|
p.ciardelli
|
|
37 |
|
|
saveAction = ActionFactory.SAVE.create(window);
|
38 |
|
|
register(saveAction);
|
39 |
e8409423
|
n.hoffmann
|
|
40 |
b661d932
|
p.ciardelli
|
saveAllAction = ActionFactory.SAVE_ALL.create(window);
|
41 |
|
|
register(saveAllAction);
|
42 |
e8409423
|
n.hoffmann
|
}
|
43 |
|
|
}
|