p2izing the editor
[taxeditor.git] / eclipseprojects / eu.etaxonomy.taxeditor / src / eu / etaxonomy / taxeditor / ApplicationWorkbenchAdvisor.java
1 package eu.etaxonomy.taxeditor;
2
3 import org.eclipse.ui.application.IWorkbenchConfigurer;
4 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
5 import org.eclipse.ui.application.WorkbenchAdvisor;
6 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
7
8 public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor {
9
10 private static final String PERSPECTIVE_ID = "eu.etaxonomy.taxeditor.perspective.freetextproperties";
11
12 public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
13 IWorkbenchWindowConfigurer configurer) {
14 return new ApplicationWorkbenchWindowAdvisor(configurer);
15 }
16
17 public String getInitialWindowPerspectiveId() {
18 return PERSPECTIVE_ID;
19 }
20
21 public void initialize(IWorkbenchConfigurer configurer) {
22 super.initialize(configurer);
23
24 // Remembers the user's view layout, window size, window location etc.
25 // for the next time application is started
26
27 // IMPORTANT as we don not have a mechanism to open views via a menu
28 // at the moment this has to be set to false everytime a new view is added,
29 // otherwise the view will not show because it is not stored in the memento
30 configurer.setSaveAndRestore(false);
31 }
32 }