code: private void generateCancel(final ActionRef action, Featurable menu)
      {
          menu.getFeature(Actionable.class).setAction(() ->
          {
              clearMenus();
              final Collection<ActionRef> parents = previous.get(action);
              createMenus(parents, parents);
          });
      }
docs: Generate cancel to go back.
  
  @param action The associated action.
  @param menu The current menu to check.