示例#1
0
 protected override void Update(CommandInfo info)
 {
     if (IdeApp.Workspace.IsOpen)
     {
         IBuildTarget buildTarget = IdeApp.ProjectOperations.CurrentSelectedBuildTarget;
         info.Enabled = (buildTarget != null) && (IdeApp.ProjectOperations.CurrentBuildOperation.IsCompleted) && buildTarget.CanBuild(IdeApp.Workspace.ActiveConfiguration);
         if (buildTarget != null)
         {
             info.Text        = GettextCatalog.GetString("R_ebuild {0}", IdeApp.ProjectOperations.CurrentSelectedBuildTarget.Name.Replace("_", "__"));
             info.Description = GettextCatalog.GetString("Rebuild {0}", IdeApp.ProjectOperations.CurrentSelectedBuildTarget.Name);
         }
     }
     else
     {
         info.Enabled = false;
     }
 }