public SingleTokenScanner(TextAttributeProvider textAttributeProvider, String attributeKey) {
   this.textAttributeProvider = textAttributeProvider;
   this.attributeKey = attributeKey;
   initialize();
   textAttributeProvider.addObserver(
       new Observer() {
         @Override
         public void update(Observable o, Object arg) {
           initialize();
         }
       });
 }
 public StoryTokenScanner(
     JBehaveProject jbehaveProject, TextAttributeProvider textAttributeProvider) {
   this.jbehaveProject = jbehaveProject;
   this.textAttributeProvider = textAttributeProvider;
   textAttributeProvider.addObserver(
       new Observer() {
         @Override
         public void update(Observable o, Object arg) {
           initialize();
         }
       });
 }