1 11 package org.eclipse.ui.internal.quickaccess; 12 13 import org.eclipse.core.commands.AbstractHandler; 14 import org.eclipse.core.commands.ExecutionEvent; 15 import org.eclipse.jface.dialogs.PopupDialog; 16 import org.eclipse.ui.IWorkbenchWindow; 17 import org.eclipse.ui.handlers.HandlerUtil; 18 19 24 public class QuickAccessHandler extends AbstractHandler { 25 26 private IWorkbenchWindow window; 27 28 31 public QuickAccessHandler() { 32 } 33 34 public Object execute(ExecutionEvent executionEvent) { 35 36 window = HandlerUtil.getActiveWorkbenchWindow(executionEvent); 37 if (window == null) { 38 return null; 39 } 40 41 final PopupDialog popupDialog = new QuickAccessDialog(window, executionEvent.getCommand()); 42 popupDialog.open(); 43 return null; 44 } 45 46 } | Popular Tags |