1 11 package org.eclipse.team.internal.ui.mapping; 12 13 import java.util.HashMap ; 14 import java.util.Map ; 15 16 import org.eclipse.core.commands.IHandler; 17 import org.eclipse.jface.action.MenuManager; 18 19 22 public class CommonMenuManager extends MenuManager { 23 24 private Map handlers = new HashMap (); 25 26 public CommonMenuManager(String id) { 27 super(id); 28 } 29 30 34 public void clearHandlers() { 35 handlers.clear(); 36 } 37 38 45 public void registerHandler(String actionId, IHandler handler) { 46 handlers.put(actionId, handler); 48 } 49 50 public IHandler getHandler(String actionId) { 51 return (IHandler)handlers.get(actionId); 52 } 53 54 } 55 | Popular Tags |