protected override void Update (CommandInfo info) { Document doc; var formatter = GetFormatter (out doc); info.Enabled = formatter != null; }