/// <summary> /// Associates the with new project. /// </summary> /// <param name="configIn">The configuration in.</param> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="providerIn">The provider in.</param> /// <param name="sourcePluginIn">The source plugin in.</param> public void AssociateWithNewProject(ISonarConfiguration configIn, Resource project, string workingDir, ISourceControlProvider providerIn, IIssueTrackerPlugin sourcePluginIn) { this.sourcePlugin = sourcePluginIn; this.sourceDir = workingDir; this.associatedProject = project; this.config = configIn; this.provider = providerIn; if (this.CommandText.Equals("Add to Existent Plan")) { Application.Current.Dispatcher.Invoke( delegate { this.SubItems.Clear(); foreach (var item in this.rest.GetAvailableActionPlan(this.config, project.Key)) { var menu = new PlanMenu(this.rest, this.model, this.manager, null, false) { CommandText = item.Name, IsEnabled = true }; menu.AssociateWithNewProject(configIn, project, workingDir, this.provider, this.sourcePlugin); this.SubItems.Add(menu); } }); } }
/// <summary> /// The init data association. /// </summary> /// <param name="userConnectionConfig">The user connection config.</param> /// <param name="associatedProjectIn">The associated project in.</param> /// <param name="workingDir">The working dir.</param> /// <param name="provider">The provider.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject( ISonarConfiguration userConnectionConfig, Resource associatedProjectIn, string workingDir, ISourceControlProvider provider, IIssueTrackerPlugin sourcePlugin) { this.userConfiguration = userConnectionConfig; this.associatedProject = associatedProjectIn; this.Configuration = userConnectionConfig; if (this.vsenvironmenthelper != null) { this.IsRunningInVisualStudio = this.vsenvironmenthelper.AreWeRunningInVisualStudio(); } else { this.IsRunningInVisualStudio = false; } List <SonarActionPlan> usortedListofPlan = this.restservice.GetAvailableActionPlan(userConnectionConfig, this.associatedProject.Key); if (usortedListofPlan != null && usortedListofPlan.Count > 0) { this.AvailableActionPlans = new ObservableCollection <SonarActionPlan>(usortedListofPlan.OrderBy(i => i.Name)); } }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="configIn">The configuration in.</param> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="sourceModelIn">The source model in.</param> /// <param name="sourcePluginIn">The source plugin in.</param> public void AssociateWithNewProject(ISonarConfiguration configIn, Resource project, string workingDir, ISourceControlProvider sourceModelIn, IIssueTrackerPlugin sourcePluginIn) { this.sourceDir = workingDir; this.associatedProject = project; this.config = configIn; this.issueTrackerPlugin = sourcePluginIn; this.sourceModel = sourceModelIn; }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="sourceModel">The source model.</param> /// <param name="sourcePlugin">The source plugin.</param> /// <param name="profile">The profile.</param> public void AssociateWithNewProject( Resource project, string workingDir, ISourceControlProvider sourceModel, IIssueTrackerPlugin sourcePlugin, Dictionary <string, Profile> profile) { // not necessary }
public void SetUp() { _target = new RtcItPlugin(); var localSettings = new Dictionary <string, string> { { RtcSettings.Host.ToString(), "https://10.5.208.17:9443" //"https://jazz.net" }, { RtcSettings.Ccm.ToString(), "ccm" //"sandbox01-ccm" }, { RtcSettings.Project.ToString(), "SDL" }, { RtcSettings.Username.ToString(), "msharonov" }, { RtcSettings.Password.ToString(), "P@ssw0rd" } }; //var cloudSettings = new Dictionary<string, string> //{ // { // RtcSettings.Host.ToString(), // "https://jazz.net" // }, // { // RtcSettings.Ccm.ToString(), // "sandbox01-ccm" // }, // { // RtcSettings.Project.ToString(), // "MsTest" // }, // { // RtcSettings.Username.ToString(), // "msharonov" // }, // { // RtcSettings.Password.ToString(), // "P@ssw0rd" // } //}; _target.LoadSettingValues(localSettings); }
/// <summary> /// Initializes a new instance of the <see cref="IssueTrackerMenu" /> class. /// </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> /// <param name="parent">The parent.</param> /// <param name="registerPool">if set to <c>true</c> [register pool].</param> private IssueTrackerMenu(ISonarRestService rest, IssueGridViewModel model, INotificationManager manager, ISQKeyTranslator translator, IIssueTrackerPlugin plugin, IssueTrackerMenu parent = null, bool registerPool = true) { this.issueTrackerPlugin = plugin; this.translator = translator; this.manager = manager; this.model = model; this.rest = rest; this.parent = parent; this.ExecuteCommand = new RelayCommand(this.OnAttachToIssueTracker); this.SubItems = new ObservableCollection <IMenuItem>(); if (registerPool) { AssociationModel.RegisterNewModelInPool(this); } }
/// <summary> /// The init data association. /// </summary> /// <param name="userConnectionConfig">The user connection config.</param> /// <param name="associatedProjectIn">The associated project in.</param> /// <param name="workingDir">The working dir.</param> /// <param name="provider">The provider.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject( ISonarConfiguration userConnectionConfig, Resource associatedProjectIn, string workingDir, ISourceControlProvider provider, IIssueTrackerPlugin sourcePlugin) { this.userConfiguration = userConnectionConfig; this.associatedProject = associatedProjectIn; this.Configuration = userConnectionConfig; if (this.vsenvironmenthelper != null) { this.IsRunningInVisualStudio = this.vsenvironmenthelper.AreWeRunningInVisualStudio(); } else { this.IsRunningInVisualStudio = false; } }
/// <summary> /// Selects the issue tracker plugin. /// </summary> private void SelectIssueTrackerPlugin() { int cnt = 0; var builder = new StringBuilder(); foreach (IPlugin plugin in this.IssueTrackerPlugins) { if (plugin.GetPluginDescription().Enabled) { this.issueTrackerPlugin = plugin as IIssueTrackerPlugin; builder.AppendLine("Plugin Enabled: " + plugin.GetPluginDescription().Name); cnt++; } } if (cnt > 1) { MessageDisplayBox.DisplayMessage("More than on issue tracker plugin is enabled, make sure only one pluing is enabled", builder.ToString()); this.issueTrackerPlugin = null; } }
public void SetUp() { _target = new GitLabItPlugin(); _target.LoadSettingValues(new Dictionary <string, string> { { GitLabSetting.Token.ToString(), "z_F1h_F3JRxPThbhYBoZ" }, { GitLabSetting.RepositoryName.ToString(), "Test" }, { GitLabSetting.RepositoryOwner.ToString(), "msharonov" }, { GitLabSetting.Host.ToString(), "https://gitlab.com" } }); }
/// <summary> /// Called when [connect to sonar]. /// </summary> /// <param name="configuration">sonar configuration</param> public void OnConnectToSonar(ISonarConfiguration configuration, IEnumerable<Resource> availableProjects, IIssueTrackerPlugin issuePlugin) { this.issueTrackerPlugin = issuePlugin; this.config = AuthtenticationHelper.AuthToken; }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="config">The configuration.</param> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="sourceModel">The source model.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject(ISonarConfiguration config, Resource project, string workingDir, ISourceControlProvider sourceModel, IIssueTrackerPlugin sourcePlugin) { this.sourceControl = sourceModel; this.userConf = config; this.assignProject = project; }
/// <summary> /// Called when [connect to sonar]. /// </summary> /// <param name="configuration">sonar configuration</param> /// <param name="availableProjectsIn">The available projects in.</param> public void OnConnectToSonar(ISonarConfiguration configuration, IEnumerable<Resource> availableProjectsIn, IIssueTrackerPlugin sourcePlugin) { // does nothing this.availableProjects = availableProjectsIn; this.issuesSearchViewModel.AvailableProjects = availableProjectsIn; this.issuesSearchViewModel.CanQUeryIssues = true; this.notificationmanager.EndedWorking(); List<User> usortedList = this.restService.GetUserList(AuthtenticationHelper.AuthToken); if (usortedList != null && usortedList.Count > 0) { this.issuesSearchViewModel.AssigneeList = new ObservableCollection<User>(usortedList.OrderBy(i => i.Name)); } }
/// <summary> /// Called when [connect to sonar]. /// </summary> /// <param name="configuration">The configuration.</param> /// <param name="availableProjects">The available projects.</param> /// <param name="sourcePlugin">The source control plugin.</param> public void OnConnectToSonar(ISonarConfiguration configuration, IEnumerable<Resource> availableProjects, IIssueTrackerPlugin sourcePlugin) { if (this.PluginManager != null) { this.PluginManager.OnConnectToSonar(configuration, availableProjects, sourcePlugin); } this.RefreshDiagnostics(); }
/// <summary> /// The init data association. /// </summary> /// <param name="config">The configuration.</param> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="sourceModelIn">The source model in.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject(ISonarConfiguration config, Resource project, string workingDir, ISourceControlProvider sourceModelIn, IIssueTrackerPlugin sourcePlugin) { this.sourceModel = sourceModelIn; this.associatedProject = project; this.userConf = config; this.issuesSearchViewModel.CanQUeryIssues = true; this.notificationmanager.EndedWorking(); List<User> usortedList = this.restService.GetUserList(config); if (usortedList != null && usortedList.Count > 0) { this.issuesSearchViewModel.UsersList = new ObservableCollection<User>(usortedList.OrderBy(i => i.Name)); } this.ReloadPlanData(); }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="config">The configuration.</param> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="provider">The provider.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject(ISonarConfiguration config, Resource project, string workingDir, ISourceControlProvider provider, IIssueTrackerPlugin sourcePlugin) { // menu not accessing services }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="configIn">The configuration in.</param> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="sourceModel">The source model.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject(ISonarConfiguration configIn, Resource project, string workingDir, ISourceControlProvider sourceModel, IIssueTrackerPlugin sourcePlugin) { // not neccessary }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="config">The configuration.</param> /// <param name="project">The project.</param> /// <param name="workDir">The work dir.</param> /// <param name="provider">The provider.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject(ISonarConfiguration config, Resource project, string workDir, ISourceControlProvider provider, IIssueTrackerPlugin sourcePlugin) { this.sonarConfig = config; this.associatedProject = project; this.sourceDir = workDir; }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="config">The configuration.</param> /// <param name="projectIn">The project in.</param> /// <param name="workingDir">The working dir.</param> /// <param name="provider">The provider.</param> public void AssociateWithNewProject(ISonarConfiguration config, Resource projectIn, string workingDir, ISourceControlProvider provider, IIssueTrackerPlugin sourcePlugin) { this.project = projectIn; foreach (var availableOption in this.AvailableOptionsModels) { availableOption.ReloadDataFromDisk(projectIn); } }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="config">The configuration.</param> /// <param name="project">The project.</param> /// <param name="workDir">The work dir.</param> /// <param name="provider">The provider.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject(ISonarConfiguration config, Resource project, string workDir, ISourceControlProvider provider, IIssueTrackerPlugin sourcePlugin) { this.SourceDir = workDir; this.userSonarConfig = config; this.associatedProject = project; }
/// <summary> /// The init data association. /// </summary> /// <param name="config">The configuration.</param> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="provider">The provider.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject(ISonarConfiguration config, Resource project, string workingDir, ISourceControlProvider provider, IIssueTrackerPlugin sourcePlugin) { this.userConf = config; this.associatedProject = project; this.IsAssociatedWithProject = this.associatedProject != null; this.SourceWorkingDir = workingDir; if (!string.IsNullOrEmpty(this.SourceWorkingDir) && Directory.Exists(this.SourceWorkingDir)) { this.CanRunAnalysis = true; this.LoadingSonarData = true; this.localAnalyserModule.AssociateWithProject(project, config); } }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="sourceModel">The source model.</param> /// <param name="sourcePlugin">The source plugin.</param> /// <param name="profile">The profile.</param> public void AssociateWithNewProject( Resource project, string workingDir, ISourceControlProvider sourceModel, IIssueTrackerPlugin sourcePlugin, Dictionary<string, Profile> profile) { // not necessary }
/// <summary> /// Called when [connect to sonar]. /// </summary> /// <param name="configuration">sonar configuration</param> /// <param name="availableProjects">The available projects.</param> /// <param name="issuePlugin">The issue plugin.</param> public void OnConnectToSonar(ISonarConfiguration configuration, IEnumerable<Resource> availableProjects, IIssueTrackerPlugin issuePlugin) { foreach (var plugin in this.plugins) { plugin.OnConnectToSonar(configuration); } }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="configIn">The configuration in.</param> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="provider">The provider.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject(ISonarConfiguration configIn, Resource project, string workingDir, ISourceControlProvider provider, IIssueTrackerPlugin sourcePlugin) { this.config = configIn; }
/// <summary> /// Called when [connect to sonar]. /// </summary> /// <param name="configuration">sonar configuration</param> public void OnConnectToSonar(ISonarConfiguration configuration, IEnumerable<Resource> availableProjects, IIssueTrackerPlugin issuePlugin) { this.ExtensionDiagnostics.Clear(); this.embedVersionController.InitializedServerDiagnostics(configuration); this.InitializedServerDiagnostics(configuration); }
/// <summary> /// The init data association. /// </summary> /// <param name="userConnectionConfig">The user connection config.</param> /// <param name="associatedProjectIn">The associated project in.</param> /// <param name="workingDir">The working dir.</param> /// <param name="provider">The provider.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject( ISonarConfiguration userConnectionConfig, Resource associatedProjectIn, string workingDir, ISourceControlProvider provider, IIssueTrackerPlugin sourcePlugin) { this.userConfiguration = userConnectionConfig; this.associatedProject = associatedProjectIn; this.Configuration = userConnectionConfig; if (this.vsenvironmenthelper != null) { this.IsRunningInVisualStudio = this.vsenvironmenthelper.AreWeRunningInVisualStudio(); } else { this.IsRunningInVisualStudio = false; } List<SonarActionPlan> usortedListofPlan = this.restservice.GetAvailableActionPlan(userConnectionConfig, this.associatedProject.Key); if (usortedListofPlan != null && usortedListofPlan.Count > 0) { this.AvailableActionPlans = new ObservableCollection<SonarActionPlan>(usortedListofPlan.OrderBy(i => i.Name)); } }
/// <summary> /// Associates the with new project. /// </summary> /// <param name="configIn">The configuration in.</param> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="provider">The provider.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject(ISonarConfiguration configIn, Resource project, string workingDir, ISourceControlProvider provider, IIssueTrackerPlugin sourcePlugin) { this.sourceDir = workingDir; this.associatedProject = project; this.config = configIn; if (this.CommandText.Equals("Add to Existent Plan")) { Application.Current.Dispatcher.Invoke( delegate { this.SubItems.Clear(); foreach (var item in this.rest.GetAvailableActionPlan(this.config, project.Key)) { var menu = new PlanMenu(this.rest, this.model, this.manager, false) { CommandText = item.Name, IsEnabled = true }; menu.AssociateWithNewProject(configIn, project, workingDir, provider, sourcePlugin); this.SubItems.Add(menu); } }); } }
/// <summary> /// The init data association. /// </summary> /// <param name="config">The configuration.</param> /// <param name="project">The project.</param> /// <param name="workingDir">The working dir.</param> /// <param name="sourceModelIn">The source model in.</param> /// <param name="sourcePlugin">The source plugin.</param> public void AssociateWithNewProject(ISonarConfiguration config, Resource project, string workingDir, ISourceControlProvider sourceModelIn, IIssueTrackerPlugin sourcePlugin) { this.sourceModel = sourceModelIn; this.associatedProject = project; this.userConf = config; this.issuesSearchViewModel.CanQUeryIssues = true; this.notificationmanager.EndedWorking(); List <User> usortedList = this.restService.GetUserList(config); if (usortedList != null && usortedList.Count > 0) { this.issuesSearchViewModel.UsersList = new ObservableCollection <User>(usortedList.OrderBy(i => i.Name)); } this.ReloadPlanData(); }
/// <summary> /// Called when [connect to sonar]. /// </summary> /// <param name="configuration">sonar configuration</param> /// <param name="availableProjectsIn">The available projects in.</param> public void OnConnectToSonar(ISonarConfiguration configuration, IEnumerable<Resource> availableProjectsIn, IIssueTrackerPlugin sourcePlugin) { this.availableProjects = availableProjectsIn.ToList(); }
/// <summary> /// Called when [connect to sonar]. /// </summary> /// <param name="configuration">sonar configuration</param> public void OnConnectToSonar(ISonarConfiguration configuration, IEnumerable<Resource> availableProjects, IIssueTrackerPlugin plugin) { // does nothing }