Source Control Related Actions
Наследование: IMenuItem
        /// <summary>
        /// Called when [source control command].
        /// </summary>
        private void OnSetExclusionsMenuCommand()
        {
            if (this.assignProject == null)
            {
                MessageDisplayBox.DisplayMessage("Effort can only be adjusted if project is associated");
                return;
            }

            if (this.model.SelectedItems == null || this.model.SelectedItems.Count == 0)
            {
                return;
            }

            try
            {
                Resource projectToUse = SetExclusionsMenu.GetMainProject(this.assignProject, this.availableProjects);

                if (this.CommandText.Equals("adjust effort"))
                {
                    this.AdjustEffortForRule();
                }
            }
            catch (Exception ex)
            {
                this.manager.ReportMessage(new Message {
                    Id = "SetSqaleMenu", Data = "Failed to perform operation: " + ex.Message
                });
                this.manager.ReportException(ex);
            }
        }
        /// <summary>
        /// The make menu.
        /// </summary>
        /// <param name="rest">The rest.</param>
        /// <param name="model">The model.</param>
        /// <param name="manager">The manager.</param>
        /// <param name="translator">The translator.</param>
        /// <returns>
        /// The <see cref="IMenuItem" />.
        /// </returns>
        public static IMenuItem MakeMenu(ISonarRestService rest, IssueGridViewModel model, INotificationManager manager, ISQKeyTranslator translator, ISonarLocalAnalyser analyser)
        {
            var topLel = new SetExclusionsMenu(rest, model, manager, translator, analyser)
            {
                CommandText = "Exclusions", IsEnabled = false
            };

            topLel.SubItems.Add(new SetExclusionsMenu(rest, model, manager, translator, analyser)
            {
                CommandText = "file", IsEnabled = true
            });
            topLel.SubItems.Add(new SetExclusionsMenu(rest, model, manager, translator, analyser)
            {
                CommandText = "rule in file", IsEnabled = true
            });
            return(topLel);
        }
        /// <summary>
        /// The make menu.
        /// </summary>
        /// <param name="rest">The rest.</param>
        /// <param name="model">The model.</param>
        /// <param name="manager">The manager.</param>
        /// <param name="translator">The translator.</param>
        /// <returns>
        /// The <see cref="IMenuItem" />.
        /// </returns>
        public static IMenuItem MakeMenu(ISonarRestService rest, IssueGridViewModel model, INotificationManager manager, ISQKeyTranslator translator, ISonarLocalAnalyser analyser)
        {
            var topLel = new SetExclusionsMenu(rest, model, manager, translator, analyser) { CommandText = "Exclusions", IsEnabled = false };

            topLel.SubItems.Add(new SetExclusionsMenu(rest, model, manager, translator, analyser) { CommandText = "file", IsEnabled = true });
            topLel.SubItems.Add(new SetExclusionsMenu(rest, model, manager, translator, analyser) { CommandText = "rule in file", IsEnabled = true });
            return topLel;
        }