Better align repository hyperlink in commit viewer
[egit/eclipse.git] / org.eclipse.egit.ui / src / org / eclipse / egit / ui / GitRepositoriesPerspectiveFactory.java
blob07315dd0fb2cea3ab88f0e41ac5e76fa84855a22
1 /*******************************************************************************
2 * Copyright (c) 2010, 2011 SAP AG and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
8 * Contributors:
9 * Mathias Kinzler (SAP AG) - initial implementation
10 * Daniel Megert <daniel_megert@ch.ibm.com> - EGit must not pollute toolbars of perspectives it doesn't own - http://bugs.eclipse.org/356554
11 *******************************************************************************/
12 package org.eclipse.egit.ui;
14 import org.eclipse.egit.ui.internal.reflog.ReflogView;
15 import org.eclipse.egit.ui.internal.repository.RepositoriesView;
16 import org.eclipse.egit.ui.internal.staging.StagingView;
17 import org.eclipse.team.ui.history.IHistoryView;
18 import org.eclipse.team.ui.synchronize.ISynchronizeView;
19 import org.eclipse.ui.IFolderLayout;
20 import org.eclipse.ui.IPageLayout;
21 import org.eclipse.ui.IPerspectiveFactory;
23 /**
24 * Git Repository Exploring perspective factory
26 public class GitRepositoriesPerspectiveFactory implements IPerspectiveFactory {
28 @Override
29 public void createInitialLayout(IPageLayout layout) {
31 // repositories on the left hand
32 layout.addView(RepositoriesView.VIEW_ID, IPageLayout.LEFT, (float) 0.5, layout.getEditorArea());
34 IFolderLayout bottom = layout.createFolder(
35 "bottom", IPageLayout.BOTTOM, (float) 0.5, //$NON-NLS-1$
36 layout.getEditorArea());
38 // Views under editor area
39 bottom.addView(IPageLayout.ID_PROP_SHEET);
40 bottom.addView(IHistoryView.VIEW_ID);
41 bottom.addView(ISynchronizeView.VIEW_ID);
42 bottom.addView(StagingView.VIEW_ID);
43 bottom.addView(ReflogView.VIEW_ID);
45 // place holder for Package Explorer under repositories
46 layout.addPlaceholder("org.eclipse.jdt.ui.PackageExplorer", IPageLayout.BOTTOM, (float) 0.7, RepositoriesView.VIEW_ID); //$NON-NLS-1$
48 // shortcut to Package Explorer
49 layout.addShowViewShortcut("org.eclipse.jdt.ui.PackageExplorer"); //$NON-NLS-1$
50 // shortcut to History view
51 layout.addShowViewShortcut(IHistoryView.VIEW_ID);
52 // shortcut to Synchronize view
53 layout.addShowViewShortcut(ISynchronizeView.VIEW_ID);
54 // shortcut to Staging view
55 layout.addShowViewShortcut(StagingView.VIEW_ID);
56 // shortcut to Reflog view
57 layout.addShowViewShortcut(ReflogView.VIEW_ID);
59 layout.addActionSet("org.eclipse.egit.ui.navigation"); //$NON-NLS-1$