1 package eu
.etaxonomy
.taxeditor
;
3 import org
.eclipse
.ui
.PlatformUI
;
4 import org
.eclipse
.ui
.application
.IWorkbenchConfigurer
;
5 import org
.eclipse
.ui
.application
.IWorkbenchWindowConfigurer
;
6 import org
.eclipse
.ui
.application
.WorkbenchAdvisor
;
7 import org
.eclipse
.ui
.application
.WorkbenchWindowAdvisor
;
9 public class ApplicationWorkbenchAdvisor
extends WorkbenchAdvisor
{
11 private static final String PERSPECTIVE_ID
= Perspective
.ID
;
15 * @see org.eclipse.ui.application.WorkbenchAdvisor#createWorkbenchWindowAdvisor(org.eclipse.ui.application.IWorkbenchWindowConfigurer)
17 public WorkbenchWindowAdvisor
createWorkbenchWindowAdvisor(
18 IWorkbenchWindowConfigurer configurer
) {
19 return new ApplicationWorkbenchWindowAdvisor(configurer
);
25 * @see org.eclipse.ui.application.WorkbenchAdvisor#getInitialWindowPerspectiveId()
27 public String
getInitialWindowPerspectiveId() {
28 return PERSPECTIVE_ID
;
33 * @see org.eclipse.ui.application.WorkbenchAdvisor#initialize(org.eclipse.ui.application.IWorkbenchConfigurer)
35 public void initialize(IWorkbenchConfigurer configurer
) {
36 super.initialize(configurer
);
38 // Remembers the user's view layout, window size, window location etc.
39 // for the next time application is started
40 configurer
.setSaveAndRestore(true);
44 * @see org.eclipse.ui.application.WorkbenchAdvisor#preStartup()
47 public void preStartup() {
48 // TODO Auto-generated method stub
50 // XXX check for updates before starting up.
51 // If an update is performed, restart.
52 // if (P2Util.checkForUpdates())
53 // PlatformUI.getWorkbench().restart();
57 * see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=234252
59 // public void initialize(IWorkbenchConfigurer configurer) {
61 // WorkbenchAdapterBuilder.registerAdapters();
63 // final String ICONS_PATH = "icons/full/";
64 // final String PATH_OBJECT = ICONS_PATH + "obj16/";
65 // Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH);
66 // declareWorkbenchImage(configurer, ideBundle,
67 // IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT + "prj_obj.gif",
69 // declareWorkbenchImage(configurer, ideBundle,
70 // IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT
71 // + "cprj_obj.gif", true);
75 // private void declareWorkbenchImage(IWorkbenchConfigurer configurer_p,
76 // Bundle ideBundle, String symbolicName, String path, boolean shared) {
77 // URL url = ideBundle.getEntry(path);
78 // ImageDescriptor desc = ImageDescriptor.createFromURL(url);
79 // configurer_p.declareImage(symbolicName, desc, shared);
82 // public IAdaptable getDefaultPageInput() {
83 // IWorkspace workspace = ResourcesPlugin.getWorkspace();
84 // return workspace.getRoot();