Getting the token tree to appear contextually I'm writing my own file formatter which is supposed to be Token-compatible. As it will be also used on taxonomy term pages, it should accept taxonomy term token. What am I doing wrong in hook_field_formatter_settings_form by saying:

'#token_types' =&gt; array('node', 'taxonomy_term')


so that I don't get term-related tokens at all? Cleared cache many a time.
Preferably, I would like the tokens to appear contextually: taxonomy term - when managing display of taxonomy term page, node - when managing display of a node page. Can this be done?
The surpising answer was:
'#token_types' =&gt; array('node', 'term')
Thanks to davereid!