1 11 package org.eclipse.ui.internal; 12 13 import org.eclipse.jface.viewers.ISelectionProvider; 14 import org.eclipse.swt.widgets.Shell; 15 import org.eclipse.ui.IActionBars; 16 import org.eclipse.ui.IKeyBindingService; 17 import org.eclipse.ui.IViewSite; 18 import org.eclipse.ui.IWorkbenchPage; 19 import org.eclipse.ui.IWorkbenchWindow; 20 import org.eclipse.ui.internal.intro.IntroDescriptor; 21 import org.eclipse.ui.intro.IIntroSite; 22 23 29 final class ViewIntroAdapterSite implements IIntroSite { 30 private IntroDescriptor descriptor; 31 32 private IViewSite viewSite; 33 34 public ViewIntroAdapterSite(IViewSite viewSite, IntroDescriptor descriptor) { 35 this.viewSite = viewSite; 36 this.descriptor = descriptor; 37 } 38 39 42 public IActionBars getActionBars() { 43 return viewSite.getActionBars(); 44 } 45 46 49 public Object getAdapter(Class adapter) { 50 return viewSite.getAdapter(adapter); 51 } 52 53 56 public String getId() { 57 return descriptor.getId(); 58 } 59 60 63 public IKeyBindingService getKeyBindingService() { 64 return viewSite.getKeyBindingService(); 65 } 66 67 70 public IWorkbenchPage getPage() { 71 return viewSite.getPage(); 72 } 73 74 77 public String getPluginId() { 78 return descriptor.getPluginId(); 79 } 80 81 84 public ISelectionProvider getSelectionProvider() { 85 return viewSite.getSelectionProvider(); 86 } 87 88 public final Object getService(final Class key) { 89 return viewSite.getService(key); 90 } 91 92 95 public Shell getShell() { 96 return viewSite.getShell(); 97 } 98 99 102 public IWorkbenchWindow getWorkbenchWindow() { 103 return viewSite.getWorkbenchWindow(); 104 } 105 106 public final boolean hasService(final Class key) { 107 return viewSite.hasService(key); 108 } 109 110 113 public void setSelectionProvider(ISelectionProvider provider) { 114 viewSite.setSelectionProvider(provider); 115 } 116 117 120 public String toString() { 121 return viewSite.toString(); 122 } 123 } 124 | Popular Tags |