Synchronize the menu activation state with document meta data

Fixes adobe-photoshop/generator#31