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
;
10 * <p>ApplicationWorkbenchAdvisor class.</p>
15 public class ApplicationWorkbenchAdvisor
extends WorkbenchAdvisor
{
19 * @see org.eclipse.ui.application.WorkbenchAdvisor#createWorkbenchWindowAdvisor(org.eclipse.ui.application.IWorkbenchWindowConfigurer)
22 public WorkbenchWindowAdvisor
createWorkbenchWindowAdvisor(
23 IWorkbenchWindowConfigurer configurer
) {
24 return new ApplicationWorkbenchWindowAdvisor(configurer
);
30 * @see org.eclipse.ui.application.WorkbenchAdvisor#getInitialWindowPerspectiveId()
33 * <p>getInitialWindowPerspectiveId</p>
35 * @return a {@link java.lang.String} object.
37 public String
getInitialWindowPerspectiveId() {
38 return "eu.etaxonomy.taxeditor.application.perspective.taxonomic";
43 * @see org.eclipse.ui.application.WorkbenchAdvisor#initialize(org.eclipse.ui.application.IWorkbenchConfigurer)
46 public void initialize(IWorkbenchConfigurer configurer
) {
47 super.initialize(configurer
);
49 // Remembers the user's view layout, window size, window location etc.
50 // for the next time application is started
51 configurer
.setSaveAndRestore(true);
55 * @see org.eclipse.ui.application.WorkbenchAdvisor#preStartup()
59 public void preStartup() {
60 // TODO Auto-generated method stub
62 // XXX check for updates before starting up.
63 // If an update is performed, restart.
64 // if (P2Util.checkForUpdates())
65 // PlatformUI.getWorkbench().restart();
69 * see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=234252
71 // public void initialize(IWorkbenchConfigurer configurer) {
73 // WorkbenchAdapterBuilder.registerAdapters();
75 // final String ICONS_PATH = "icons/full/";
76 // final String PATH_OBJECT = ICONS_PATH + "obj16/";
77 // Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH);
78 // declareWorkbenchImage(configurer, ideBundle,
79 // IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT + "prj_obj.gif",
81 // declareWorkbenchImage(configurer, ideBundle,
82 // IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT
83 // + "cprj_obj.gif", true);
87 // private void declareWorkbenchImage(IWorkbenchConfigurer configurer_p,
88 // Bundle ideBundle, String symbolicName, String path, boolean shared) {
89 // URL url = ideBundle.getEntry(path);
90 // ImageDescriptor desc = ImageDescriptor.createFromURL(url);
91 // configurer_p.declareImage(symbolicName, desc, shared);
94 // public IAdaptable getDefaultPageInput() {
95 // IWorkspace workspace = ResourcesPlugin.getWorkspace();
96 // return workspace.getRoot();