protected override void Update(MonoDevelop.Components.Commands.CommandInfo info) { var possibleTasks = provider.GetPossibleRefactoring(); validTasks = possibleTasks.Where(t => t.IsValid()); info.Enabled = validTasks.Any(); }
protected override void Update(RefactoringOptions options, MonoDevelop.Components.Commands.CommandInfo info) { var renameRefactoring = new DRenameRefactoring(); if (!renameRefactoring.IsValid(options)) { info.Bypass = true; } }
public void Enables_command_info_when_any_valid_tasks_were_found() { var info = new MonoDevelop.Components.Commands.CommandInfo { Enabled = false }; subject.Update(info); Assert.IsTrue(info.Enabled, "Command info was not enabled as expected"); }
public new void Update(MonoDevelop.Components.Commands.CommandInfo info) { base.Update(info); }
public void Enables_command_info_when_any_valid_tasks_were_found() { var info = new MonoDevelop.Components.Commands.CommandInfo{Enabled = false}; subject.Update(info); Assert.IsTrue(info.Enabled, "Command info was not enabled as expected"); }