1 19 20 package org.netbeans.modules.utilities; 21 22 import java.util.ArrayList ; 23 import java.util.List ; 24 import org.openide.util.actions.SystemAction; 25 26 42 public final class Manager { 43 44 45 private static List activatedActions = new ArrayList (2); 46 47 57 public static boolean actionActivated(SystemAction a) { 58 synchronized (activatedActions) { 59 if (activatedActions.contains(a)) { 60 return false; 61 } else { 62 activatedActions.add(a); 63 return true; 64 } 65 } 66 } 67 68 74 public static void actionFinished(SystemAction a) { 75 synchronized (activatedActions) { 76 activatedActions.remove(a); 77 } 78 } 79 80 81 private Manager() { 82 } 83 84 } 85 | Popular Tags |