1 package eu
.etaxonomy
.taxeditor
;
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
;
8 public class ApplicationWorkbenchAdvisor
extends WorkbenchAdvisor
{
10 private static final String PERSPECTIVE_ID
= Perspective
.ID
;
14 * @see org.eclipse.ui.application.WorkbenchAdvisor#createWorkbenchWindowAdvisor(org.eclipse.ui.application.IWorkbenchWindowConfigurer)
16 public WorkbenchWindowAdvisor
createWorkbenchWindowAdvisor(
17 IWorkbenchWindowConfigurer configurer
) {
18 return new ApplicationWorkbenchWindowAdvisor(configurer
);
24 * @see org.eclipse.ui.application.WorkbenchAdvisor#getInitialWindowPerspectiveId()
26 public String
getInitialWindowPerspectiveId() {
27 return PERSPECTIVE_ID
;
32 * @see org.eclipse.ui.application.WorkbenchAdvisor#initialize(org.eclipse.ui.application.IWorkbenchConfigurer)
34 public void initialize(IWorkbenchConfigurer configurer
) {
35 super.initialize(configurer
);
37 // Remembers the user's view layout, window size, window location etc.
38 // for the next time application is started
39 configurer
.setSaveAndRestore(true);
43 * see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=234252
45 // public void initialize(IWorkbenchConfigurer configurer) {
47 // WorkbenchAdapterBuilder.registerAdapters();
49 // final String ICONS_PATH = "icons/full/";
50 // final String PATH_OBJECT = ICONS_PATH + "obj16/";
51 // Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH);
52 // declareWorkbenchImage(configurer, ideBundle,
53 // IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT + "prj_obj.gif",
55 // declareWorkbenchImage(configurer, ideBundle,
56 // IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT
57 // + "cprj_obj.gif", true);
61 // private void declareWorkbenchImage(IWorkbenchConfigurer configurer_p,
62 // Bundle ideBundle, String symbolicName, String path, boolean shared) {
63 // URL url = ideBundle.getEntry(path);
64 // ImageDescriptor desc = ImageDescriptor.createFromURL(url);
65 // configurer_p.declareImage(symbolicName, desc, shared);
68 // public IAdaptable getDefaultPageInput() {
69 // IWorkspace workspace = ResourcesPlugin.getWorkspace();
70 // return workspace.getRoot();