e6b110225108aa69496f5724b0291fa664090af0
[taxeditor.git] / taxeditor-application / src / main / java / 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 = Perspective.ID;
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 configurer.setSaveAndRestore(true);
27 }
28
29
30 // public void initialize(IWorkbenchConfigurer configurer) {
31 //
32 // WorkbenchAdapterBuilder.registerAdapters();
33 //
34 // final String ICONS_PATH = "icons/full/";
35 // final String PATH_OBJECT = ICONS_PATH + "obj16/";
36 // Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH);
37 // declareWorkbenchImage(configurer, ideBundle,
38 // IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT + "prj_obj.gif",
39 // true);
40 // declareWorkbenchImage(configurer, ideBundle,
41 // IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT
42 // + "cprj_obj.gif", true);
43 //
44 // }
45 //
46 // private void declareWorkbenchImage(IWorkbenchConfigurer configurer_p,
47 // Bundle ideBundle, String symbolicName, String path, boolean shared) {
48 // URL url = ideBundle.getEntry(path);
49 // ImageDescriptor desc = ImageDescriptor.createFromURL(url);
50 // configurer_p.declareImage(symbolicName, desc, shared);
51 // }
52 //
53 // public IAdaptable getDefaultPageInput() {
54 // IWorkspace workspace = ResourcesPlugin.getWorkspace();
55 // return workspace.getRoot();
56 // }
57
58 }