1 11 package org.eclipse.ui.internal.application; 12 13 import org.eclipse.core.runtime.IAdaptable; 14 import org.eclipse.swt.widgets.Shell; 15 import org.eclipse.ui.WorkbenchException; 16 import org.eclipse.ui.application.ActionBarAdvisor; 17 import org.eclipse.ui.application.IActionBarConfigurer; 18 import org.eclipse.ui.application.IWorkbenchWindowConfigurer; 19 import org.eclipse.ui.application.WorkbenchAdvisor; 20 import org.eclipse.ui.application.WorkbenchWindowAdvisor; 21 22 29 public class CompatibilityWorkbenchWindowAdvisor extends WorkbenchWindowAdvisor { 30 31 private WorkbenchAdvisor wbAdvisor; 32 33 39 public CompatibilityWorkbenchWindowAdvisor(WorkbenchAdvisor wbAdvisor, IWorkbenchWindowConfigurer windowConfigurer) { 40 super(windowConfigurer); 41 this.wbAdvisor = wbAdvisor; 42 } 43 44 public void preWindowOpen() { 45 wbAdvisor.preWindowOpen(getWindowConfigurer()); 46 } 47 48 public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer configurer) { 49 return new CompatibilityActionBarAdvisor(wbAdvisor, configurer); 50 } 51 52 public void postWindowRestore() throws WorkbenchException { 53 wbAdvisor.postWindowRestore(getWindowConfigurer()); 54 } 55 56 public void openIntro() { 57 wbAdvisor.openIntro(getWindowConfigurer()); 58 } 59 60 public void postWindowCreate() { 61 wbAdvisor.postWindowCreate(getWindowConfigurer()); 62 } 63 64 public void postWindowOpen() { 65 wbAdvisor.postWindowOpen(getWindowConfigurer()); 66 } 67 68 public boolean preWindowShellClose() { 69 return wbAdvisor.preWindowShellClose(getWindowConfigurer()); 70 } 71 72 public void postWindowClose() { 73 wbAdvisor.postWindowClose(getWindowConfigurer()); 74 } 75 76 public boolean isApplicationMenu(String menuId) { 77 return wbAdvisor.isApplicationMenu(getWindowConfigurer(), menuId); 78 } 79 80 public IAdaptable getDefaultPageInput() { 81 return wbAdvisor.getDefaultPageInput(); 82 } 83 84 public void createWindowContents(Shell shell) { 85 wbAdvisor.createWindowContents(getWindowConfigurer(), shell); 86 } 87 88 89 } 90 | Popular Tags |