blob: cdd0e82d85d6bc1d922d31f7c7445918b20adb1b [file] [log] [blame]
/*=============================================================================#
# Copyright (c) 2012, 2021 Stephan Wahlbrink and others.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.eclipse.org/legal/epl-2.0, or the Apache License, Version 2.0
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0
#
# Contributors:
# Stephan Wahlbrink <sw@wahlbrink.eu> - initial API and implementation
#=============================================================================*/
package org.eclipse.statet.internal.rtm.base.ui;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
import org.eclipse.statet.ecommons.ui.workbench.IWorkbenchPerspectiveElements;
public class RGraphPerspectiveFactory implements IPerspectiveFactory, IWorkbenchPerspectiveElements {
public RGraphPerspectiveFactory() {
}
@Override
public void createInitialLayout(final IPageLayout layout) {
final String editorArea= layout.getEditorArea();
// layout.addFastView(PROJECT_EXPLORER_VIEW, 0.25f);
final IFolderLayout leftFolder= layout.createFolder(
"left", IPageLayout.LEFT, 0.20f, editorArea); //$NON-NLS-1$
leftFolder.addView(PROJECT_EXPLORER_VIEW);
leftFolder.addPlaceholder(RESOURCE_NAVIGATOR_VIEW);
final IFolderLayout editorAddFolder= layout.createFolder(
"editor-additions", IPageLayout.RIGHT, 0.50f, editorArea); //$NON-NLS-1$
editorAddFolder.addView("org.eclipse.statet.r.views.RGraphic"); //$NON-NLS-1$
editorAddFolder.addPlaceholder(OUTLINE_VIEW);
editorAddFolder.addPlaceholder(TEMPLATES_VIEW);
editorAddFolder.addPlaceholder(FILTERS_VIEW);
final IFolderLayout propertiesFolder= layout.createFolder(
"bottom", IPageLayout.BOTTOM, 0.75f, editorArea); //$NON-NLS-1$
propertiesFolder.addView(PROPERTIES_VIEW);
propertiesFolder.addView(TASKS_VIEW);
propertiesFolder.addPlaceholder(PROBLEM_VIEW);
propertiesFolder.addPlaceholder(SEARCH_VIEW);
propertiesFolder.addPlaceholder(BOOKMARKS_VIEW);
final IFolderLayout consoleFolder= layout.createFolder(
"console", IPageLayout.BOTTOM, 0.75f, "editor-additions"); //$NON-NLS-1$ //$NON-NLS-2$
consoleFolder.addView(CONSOLE_VIEW);
consoleFolder.addPlaceholder(PROGRESS_VIEW);
final IFolderLayout consoleAddFolder= layout.createFolder(
"console-additions", IPageLayout.BOTTOM, 0.50f, "left"); //$NON-NLS-1$ //$NON-NLS-2$
consoleAddFolder.addView(NICO_OBJECTBROWSER_VIEW);
// layout.addFastView(NICO_CMDHISTORY_VIEW);
// layout.createPlaceholderFolder("console-additions", IPageLayout.BOTTOM, 0.80f, "left"); //$NON-NLS-1$
layout.addActionSet(LAUNCH_ACTION_SET);
layout.addActionSet(NAVIGATE_ACTION_SET);
// views - search
layout.addShowViewShortcut(SEARCH_VIEW);
// views - standard workbench
layout.addShowViewShortcut(PROJECT_EXPLORER_VIEW);
layout.addShowViewShortcut(OUTLINE_VIEW);
layout.addShowViewShortcut(TEMPLATES_VIEW);
layout.addShowViewShortcut(TASKS_VIEW);
layout.addShowViewShortcut(PROBLEM_VIEW);
// views - debugging
layout.addShowViewShortcut(CONSOLE_VIEW);
layout.addShowViewShortcut(NICO_OBJECTBROWSER_VIEW);
layout.addShowViewShortcut(NICO_CMDHISTORY_VIEW);
// new actions
layout.addNewWizardShortcut(NEW_FOLDER_WIZARD);
layout.addNewWizardShortcut(NEW_TEXTFILE_WIZARD);
layout.addPerspectiveShortcut("org.eclipse.statet.base.perspectives.StatetPerspective"); //$NON-NLS-1$
}
}