1 11 package org.eclipse.team.internal.ui.synchronize; 12 13 import org.eclipse.jface.dialogs.IDialogSettings; 14 import org.eclipse.jface.viewers.ISelectionProvider; 15 import org.eclipse.swt.widgets.Shell; 16 import org.eclipse.team.ui.synchronize.ISynchronizePageSite; 17 import org.eclipse.ui.*; 18 import org.eclipse.ui.part.IPageSite; 19 20 23 public class WorkbenchPartSynchronizePageSite implements ISynchronizePageSite { 24 private IWorkbenchPart part; 25 private IDialogSettings settings; 26 private IPageSite site; 27 28 public WorkbenchPartSynchronizePageSite(IWorkbenchPart part, IPageSite site, IDialogSettings settings) { 29 this.part = part; 30 this.site = site; 31 this.settings = settings; 32 } 33 34 37 public IWorkbenchPart getPart() { 38 return part; 39 } 40 41 44 public Shell getShell() { 45 return part.getSite().getShell(); 46 } 47 48 51 public ISelectionProvider getSelectionProvider() { 52 return site.getSelectionProvider(); 53 } 54 55 58 public void setSelectionProvider(ISelectionProvider provider) { 59 site.setSelectionProvider(provider); 60 } 61 62 65 public IWorkbenchSite getWorkbenchSite() { 66 return part.getSite(); 67 } 68 69 72 public IKeyBindingService getKeyBindingService() { 73 return part.getSite().getKeyBindingService(); 74 } 75 76 79 public void setFocus() { 80 part.getSite().getPage().activate(part); 81 } 82 83 86 public IDialogSettings getPageSettings() { 87 return settings; 88 } 89 90 93 public IActionBars getActionBars() { 94 return site.getActionBars(); 95 } 96 97 100 public boolean isModal() { 101 return false; 102 } 103 } 104 | Popular Tags |