public static void registerContextMenuAction(Class<?> associatedClass,SelectionDependentAction action){
  List<SelectionDependentAction> actions=contextMenuActions.get(associatedClass);
  if (actions == null) {
    actions=new LinkedList<SelectionDependentAction>();
    contextMenuActions.put(associatedClass,actions);
  }
  actions.add(action);
}

public static void registerContextMenuAction ( Class < ? > associatedClass , SelectionDependentAction action ) { List < SelectionDependentAction > actions = contextMenuActions . get ( associatedClass ) ; if ( actions == null ) { actions = new LinkedList < SelectionDependentAction > ( ) ; contextMenuActions . put ( associatedClass , actions ) ; } actions . add ( action ) ; }
this registers the given action for the given class . actions in context menu will depend on the class the current item has .
