1 19 20 package org.netbeans.modules.editor; 21 22 import javax.swing.ActionMap ; 23 import org.openide.util.Lookup; 24 import org.openide.util.LookupListener; 25 import org.openide.util.Utilities; 26 27 31 abstract class GlobalContextAction implements LookupListener{ 32 33 private Lookup.Result result; 34 35 public GlobalContextAction() { 36 result = Utilities.actionsGlobalContext ().lookup ( 37 new Lookup.Template (ActionMap .class) 38 ); 39 40 result.addLookupListener(this); 41 } 42 43 protected ActionMap getContextActionMap () { 44 return (ActionMap )Utilities.actionsGlobalContext ().lookup (ActionMap .class); 45 } 46 47 public abstract void resultChanged(org.openide.util.LookupEvent ev); 48 49 } 50 | Popular Tags |