1 11 package org.eclipse.team.internal.ui.synchronize; 12 13 import org.eclipse.team.ui.history.IHistoryView; 14 import org.eclipse.team.ui.synchronize.ISynchronizeView; 15 import org.eclipse.ui.*; 16 17 public class TeamSynchronizingPerspective implements IPerspectiveFactory { 18 19 public final static String ID = "org.eclipse.team.ui.TeamSynchronizingPerspective"; 21 24 public void createInitialLayout(IPageLayout layout) { 25 defineActions(layout); 26 defineLayout(layout); 27 } 28 29 33 public void defineActions(IPageLayout layout) { 34 35 layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.project"); layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.folder"); layout.addNewWizardShortcut("org.eclipse.ui.wizards.new.file"); 40 layout.addShowViewShortcut(ISynchronizeView.VIEW_ID); 42 layout.addShowViewShortcut(IPageLayout.ID_RES_NAV); 43 layout.addShowViewShortcut(IPageLayout.ID_OUTLINE); 44 layout.addShowViewShortcut(IPageLayout.ID_TASK_LIST); 45 layout.addShowViewShortcut(IPageLayout.ID_PROBLEM_VIEW); 46 47 layout.addActionSet("org.eclipse.team.ui.actionSet"); 50 layout.addPerspectiveShortcut("org.eclipse.ui.resourcePerspective"); } 53 54 58 public void defineLayout(IPageLayout layout) { 59 String editorArea = layout.getEditorArea(); 60 IFolderLayout top = layout.createFolder("top", IPageLayout.LEFT, 0.45f, editorArea); top.addView(ISynchronizeView.VIEW_ID); 62 IFolderLayout top2 = layout.createFolder("top2", IPageLayout.BOTTOM, 0.80f, editorArea); top2.addView(IHistoryView.VIEW_ID); 64 top2.addView(IPageLayout.ID_TASK_LIST); 65 top2.addView(IPageLayout.ID_PROBLEM_VIEW); 66 layout.setEditorAreaVisible(true); 67 } 68 } 69 | Popular Tags |