/*
 * Copyright 1999-2005 The Apache Software Foundation or its licensors,
 * as applicable.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.forrest.eclipse;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;






public class Perspective implements IPerspectiveFactory  {
	
	

	public void createInitialLayout(IPageLayout layout) {
		String editorArea = layout.getEditorArea();
		layout.setEditorAreaVisible(false);
		layout.setFixed(true);
		IFolderLayout top=layout.createFolder("top",IPageLayout.TOP,0.7f,editorArea);
		top.addView("SiteXML");
		top.addView("TabsXML");
		IFolderLayout bottom=layout.createFolder("bottom",IPageLayout.BOTTOM,0.7f,editorArea);
		bottom.addView("Locationmap");
		//FIXME: The views and menues that are needed for the RCP have to be properly defined
		
		
	}

}

@@ -689,16 +689,242 @@
 lipse;%0A%0A
+import org.apache.forrest.eclipse.views.ForrestPropertiesView;%0Aimport org.apache.forrest.eclipse.views.LocationmapView;%0Aimport org.apache.forrest.eclipse.views.SiteXMLView;%0Aimport org.apache.forrest.eclipse.views.TabsXMLView;%0A
 import o
@@ -1101,16 +1101,114 @@
 %7B%0A%09%0A%09%0A%0A%09
+private static final String ID_PERSPECTIVE = %22org.apache.forrest.perspective.ContentObject%22;%0A%0A    
 public v
@@ -1305,71 +1305,198 @@
 ;%0A%09%09
-layout.setEditorAreaVisible(false);%0A%09%09layout.setFixed(true);%0A%09%09
+%0A        IFolderLayout topLeft = layout.createFolder(%22left%22, IPageLayout.LEFT, %0A                0.25f, editorArea);%0A        topLeft.addView(IPageLayout.ID_RES_NAV);%0A                %0A        
 IFol
@@ -1509,12 +1509,21 @@
 out 
-top=
+bottomLeft = 
 layo
@@ -1542,18 +1542,23 @@
 der(%22top
+Left
 %22,
+ 
 IPageLay
@@ -1565,35 +1565,60 @@
 out.
-TOP,0.7f,editorArea);%0A%09%09top
+BOTTOM, %0A                0.5f, %22left%22);%0A%09%09bottomLeft
 .add
@@ -1626,25 +1626,42 @@
 iew(
-%22
 SiteXML
-%22);%0A%09%09top
+View.ID_VIEW);%0A%09%09bottomLeft
 .add
@@ -1669,22 +1669,100 @@
 iew(
-%22
 TabsXML
-%22);%0A%09%09
+View.ID_VIEW);%0A        bottomLeft.addView(LocationmapView.ID_VIEW);%0A        %0A        
 IFol
@@ -1777,17 +1777,19 @@
 t bottom
-=
+ = 
 layout.c
@@ -1850,43 +1850,245 @@
 a);%0A
-%09%09bottom.addView(%22Locationmap%22);%0A%09%09
+        // FIXME: Forrest specific properties editor should be replaced with: bottom.addView(IPageLayout.ID_PROP_SHEET);%0A        bottom.addView(ForrestPropertiesView.ID_VIEW);%0A        bottom.addView(IPageLayout.ID_TASK_LIST);%0A%09%09%0A        
 //FI
@@ -2110,17 +2110,16 @@
 and menu
-e
 s that a
@@ -2172,13 +2172,63 @@
 ned%0A
-%09%09%0A%09%09
+%0A        layout.addPerspectiveShortcut(ID_PERSPECTIVE);
 %0A%09%7D%0A

create a more useful Java perspective