Package tool.perspectives

Source Code of tool.perspectives.ToolPerspective

/*******************************************************************************
* Copyright (c) 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*     IBM Corporation - initial API and implementation
*******************************************************************************/
package tool.perspectives;

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


public class ToolPerspective implements IPerspectiveFactory {

      @Override
      public void createInitialLayout(IPageLayout layout) {
        // Get the editor area.
            String editorArea = layout.getEditorArea();

            // Top left: Resource Navigator view and Bookmarks view placeholder
            IFolderLayout topLeft = layout.createFolder("topLeft", IPageLayout.LEFT, 0.25f,
                    editorArea);
            topLeft.addView("tool.navigator");
            topLeft.addPlaceholder(IPageLayout.ID_BOOKMARKS);

            // Bottom left: Outline view and Property Sheet view
            IFolderLayout bottomLeft = layout.createFolder("bottomLeft", IPageLayout.BOTTOM, 0.50f,
                    "topLeft");
            bottomLeft.addView(IPageLayout.ID_OUTLINE);
            bottomLeft.addView(IPageLayout.ID_PROP_SHEET);

            // Bottom right: Task List view
            IFolderLayout bottomRight = layout.createFolder("bottomRight", IPageLayout.BOTTOM, 0.66f,
                    editorArea);
            bottomRight.addView(IPageLayout.ID_PROBLEM_VIEW);
            bottomRight.addView(IConsoleConstants.ID_CONSOLE_VIEW);
            bottomRight.addView(IPageLayout.ID_BOOKMARKS);
           
      }

}
TOP

Related Classes of tool.perspectives.ToolPerspective

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.