1 17 package org.eclipse.emf.common.ui.action; 18 19 import org.eclipse.jface.action.IAction; 20 import org.eclipse.jface.viewers.ISelection; 21 import org.eclipse.ui.IWorkbenchWindow; 22 import org.eclipse.ui.IWorkbenchWindowActionDelegate; 23 24 27 public abstract class WorkbenchWindowActionDelegate implements IWorkbenchWindowActionDelegate 28 { 29 private IWorkbenchWindow window; 30 private ISelection selection; 31 32 35 protected IWorkbenchWindow getWindow() 36 { 37 return window; 38 } 39 40 43 protected ISelection getSelection() 44 { 45 return selection; 46 } 47 48 51 public void init(IWorkbenchWindow window) 52 { 53 this.window = window; 54 } 55 56 59 public void selectionChanged(IAction action, ISelection selection) 60 { 61 this.selection = selection; 62 } 63 64 67 public void dispose() 68 { 69 window = null; 70 selection = null; 71 } 72 } 73 | Popular Tags |