? use_token_tree.patch
Index: modules/system.eval.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/rules/modules/Attic/system.eval.inc,v
retrieving revision 1.1.2.2
diff -u -p -r1.1.2.2 system.eval.inc
--- modules/system.eval.inc	9 Feb 2011 17:38:18 -0000	1.1.2.2
+++ modules/system.eval.inc	15 Feb 2011 12:28:29 -0000
@@ -181,17 +181,26 @@ class RulesTokenEvaluator extends RulesD
   }
 
   public static function help($var_info) {
+    foreach ($var_info as $name => $info) {
+      $token_types[$name] = _rules_system_token_map_type($info['type']);
+    }
+
+    // Use advanced token tree browser from token.module if available.
+    if (module_exists('token')) {
+      return array(
+        '#theme' => 'token_tree',
+        '#token_types' => $token_types,
+      );
+    }
+
     $render = array(
       '#type' => 'fieldset',
       '#title' => t('Replacement patterns'),
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
     );
-    $token_info = token_info();
-    foreach ($var_info as $name => $info) {
-      $token_types[$name] = _rules_system_token_map_type($info['type']);
-    }
 
+    $token_info = token_info();
     foreach ($token_types as $name => $token_type) {
       if (isset($token_info['types'][$token_type])) {
         $render[$name] = array(
