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
;
17 import eu
.etaxonomy
.taxeditor
.navigation
.RecentNamesView
;
18 import eu
.etaxonomy
.taxeditor
.navigation
.SearchView
;
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 * If you set configurer.setSaveAndRestore(true) and you are adding a new view
35 * to the perspective make sure you set it to false for at least one start.
36 * Otherwise the new view will not show.
40 public static final String ID
= "eu.etaxonomy.taxeditor.perspective.freetextproperties";
42 public void createInitialLayout(IPageLayout layout
) {
43 String editorArea
= layout
.getEditorArea();
45 // Note: plug-in org.eclipse.ui.ide necessary for
46 // IPageLayout.ID_PROBLEM_VIEW ("org.eclipse.ui.views.ProblemView") to run
47 // layout.addView(IPageLayout.ID_PROBLEM_VIEW, IPageLayout.BOTTOM, 0.8f, editorArea);
49 IFolderLayout folderLayoutLeft
= layout
.createFolder("leftfolder", IPageLayout
.LEFT
, 0.3f
, editorArea
);
51 folderLayoutLeft
.addView(TaxonomicTreeView
.ID
);
52 folderLayoutLeft
.addView(SearchView
.ID
);
54 IFolderLayout folderLayoutBottomLeft
= layout
.createFolder("bottomleftfolder", IPageLayout
.BOTTOM
, 0.75f
, "leftfolder");
55 folderLayoutBottomLeft
.addView(RecentNamesView
.ID
);
56 // folderLayoutBottomLeft.addView(FavoritesView.ID);
58 IFolderLayout folderLayoutRight
= layout
.createFolder("rightfolder", IPageLayout
.RIGHT
, 0.5f
, editorArea
);
59 folderLayoutRight
.addView(IPageLayout
.ID_PROP_SHEET
);
60 folderLayoutRight
.addView(IPageLayout
.ID_PROBLEM_VIEW
);
62 layout
.getViewLayout(IPageLayout
.ID_PROP_SHEET
).setCloseable(false);
63 layout
.getViewLayout(IPageLayout
.ID_PROP_SHEET
);
64 layout
.getViewLayout(TaxonomicTreeView
.ID
).setCloseable(false);