1 11 package org.eclipse.team.internal.ccvs.ui; 12 13 14 import org.eclipse.team.internal.ccvs.ui.repo.RepositoriesView; 15 import org.eclipse.team.ui.history.IHistoryView; 16 import org.eclipse.team.ui.synchronize.ISynchronizeView; 17 import org.eclipse.ui.*; 18 19 public class CVSPerspective implements IPerspectiveFactory { 20 21 public final static String ID = "org.eclipse.team.cvs.ui.cvsPerspective"; 23 26 public void createInitialLayout(IPageLayout layout) { 27 defineActions(layout); 28 defineLayout(layout); 29 } 30 31 34 public void defineActions(IPageLayout layout) { 35 36 layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.project"); layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); 41 layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); 43 layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); 44 layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); 45 layout.addShowViewShortcut(IHistoryView.VIEW_ID); 46 layout.addShowViewShortcut(RepositoriesView.VIEW_ID); 47 layout.addShowViewShortcut(ISynchronizeView.VIEW_ID); 48 49 layout.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); layout.addPerspectiveShortcut("org.eclipse.team.ui.TeamSynchronizingPerspective"); } 53 54 57 public void defineLayout(IPageLayout layout) { 58 String editorArea = layout.getEditorArea(); 59 IFolderLayout top = 60 layout.createFolder("top", IPageLayout.LEFT, 0.40f, editorArea); top.addView(RepositoriesView.VIEW_ID); 62 layout.addView(IHistoryView.VIEW_ID, IPageLayout.BOTTOM, 0.70f, editorArea); 63 layout.setEditorAreaVisible(true); 64 } 65 } 66 | Popular Tags |