1 19 20 package org.netbeans.spi.debugger; 21 22 import java.util.Set ; 23 import org.openide.util.RequestProcessor; 24 25 30 public abstract class ActionsProvider { 31 32 37 public abstract Set getActions (); 38 39 44 public abstract void doAction (Object action); 45 46 51 public abstract boolean isEnabled (Object action); 52 53 58 public abstract void addActionsProviderListener (ActionsProviderListener l); 59 60 61 66 public abstract void removeActionsProviderListener (ActionsProviderListener l); 67 68 78 public void postAction (final Object action, 79 final Runnable actionPerformedNotifier) { 80 RequestProcessor.getDefault().post(new Runnable () { 81 public void run() { 82 try { 83 doAction(action); 84 } finally { 85 actionPerformedNotifier.run(); 86 } 87 } 88 }); 89 } 90 91 } 92 93 | Popular Tags |