/**
  * Returns a text attribute encoded in the given token. If the token's data is not <code>null
  * </code> and a text attribute it is assumed that it is the encoded text attribute. It returns
  * the default text attribute if there is no encoded text attribute found.
  *
  * @param token the token whose text attribute is to be determined
  * @return the token's text attribute
  */
 protected TextAttribute getTokenTextAttribute(IToken token) {
   Object data = token.getData();
   if (data instanceof TextAttribute) return (TextAttribute) data;
   return fDefaultTextAttribute;
 }