2 * Copyright (C) 2007 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
10 package eu
.etaxonomy
.taxeditor
;
12 import org
.apache
.log4j
.Logger
;
13 import org
.eclipse
.ui
.IFolderLayout
;
14 import org
.eclipse
.ui
.IPageLayout
;
15 import org
.eclipse
.ui
.IPerspectiveFactory
;
16 import org
.eclipse
.ui
.actions
.ActionFactory
;
18 import eu
.etaxonomy
.taxeditor
.navigation
.RecentNamesView
;
19 import eu
.etaxonomy
.taxeditor
.navigation
.TaxonomicTreeView
;
26 public class FreetextPropertiesPerspective
implements IPerspectiveFactory
{
27 private static final Logger logger
= Logger
.getLogger(FreetextPropertiesPerspective
.class);
29 * To remember the user's layout and window sizes for the next time they
30 * start your application, add configurer.setSaveAndRestore(true); to the
31 * initialize() method of WorkbenchAdvisor.
34 public static final String ID
= "eu.etaxonomy.taxeditor.perspective.freetextproperties";
36 public void createInitialLayout(IPageLayout layout
) {
37 String editorArea
= layout
.getEditorArea();
39 // Note: plug-in org.eclipse.ui.ide necessary for
40 // IPageLayout.ID_PROBLEM_VIEW ("org.eclipse.ui.views.ProblemView") to run
41 // layout.addView(IPageLayout.ID_PROBLEM_VIEW, IPageLayout.BOTTOM, 0.8f, editorArea);
43 IFolderLayout folderLayoutLeft
= layout
.createFolder("leftfolder", IPageLayout
.LEFT
, 0.3f
, editorArea
);
45 folderLayoutLeft
.addView(TaxonomicTreeView
.ID
);
46 // folderLayoutLeft.addView(SearchView.ID);
48 IFolderLayout folderLayoutBottomLeft
= layout
.createFolder("bottomleftfolder", IPageLayout
.BOTTOM
, 0.75f
, "leftfolder");
49 folderLayoutBottomLeft
.addView(RecentNamesView
.ID
);
50 // folderLayoutBottomLeft.addView(FavoritesView.ID);
52 IFolderLayout folderLayoutRight
= layout
.createFolder("rightfolder", IPageLayout
.RIGHT
, 0.5f
, editorArea
);
53 folderLayoutRight
.addView(IPageLayout
.ID_PROP_SHEET
);
55 layout
.getViewLayout(IPageLayout
.ID_PROP_SHEET
).setCloseable(false);
56 layout
.getViewLayout(TaxonomicTreeView
.ID
).setCloseable(false);