@Override
  public Action createContextAwareInstance(Lookup actionContext) {
    try {
      Method getDelegateMethod = action.getClass().getDeclaredMethod("getDelegate");
      getDelegateMethod.setAccessible(true);
      Action act = (Action) getDelegateMethod.invoke(action);

      String iconBase = (String) action.getValue("iconBase");

      if (iconBase != null) {
        act.putValue(SMALL_ICON, ImageUtilities.loadImageIcon(iconBase, true));
      }

      return act;

    } catch (Exception ex) {
      return action.createContextAwareInstance(actionContext);
    }
  }
 @Override
 public Object getValue(String key) {
   return action.getValue(key);
 }