/// /// Copyright © 2003-2008 JetBrains s.r.o. /// You may distribute under the terms of the GNU General Public License, as published by the Free Software Foundation, version 2 (see License.txt in the repository root folder). /// using System; using JetBrains.Omea.OpenAPI; namespace JetBrains.Omea.Jiffa { public static class JiffaSettings { /// /// Gets or sets the list of valid assignees. /// public static string DevelopersList { get { return Core.SettingStore.ReadString("Jiffa.Submission", "DevelopersList", DevelopersList_Default); } set { if(value == null) throw new ArgumentNullException("value"); Core.SettingStore.WriteString("Jiffa.Submission", "DevelopersList", value); } } /// /// Default for the . /// public static string DevelopersList_Default { get { return "andrew.serebryansky\nands\ndsl\ndsha\npasynkov\neugene.petrenko\norangy\nobfuscator\nww\noleg.stepanov@jetbrains.com\nolka\nbaltic\ncoox\nvalentin"; } } /// /// Gets or sets the news reply template. /// public static string Template { get { return Core.SettingStore.ReadString("Jiffa.Submission", "Template", Template_Default); } set { if(value == null) throw new ArgumentNullException("value"); Core.SettingStore.WriteString("Jiffa.Submission", "Template", value); } } /// /// Default for the . /// public static string Template_Default { get { //return "Hello,\n\nWhy, your issue sounds worth creating a JIRA request.\n\nYou could monitor its progress at <%=IssueUri%>.\n\n--\nDev Team"; return "Hello,\n\nWe appreciate your feedback.\n\nThe corresponding JIRA request has been created, and you are welcome to monitor its status at <%=IssueUri%>.\n\nBest regards,\n - Development Team."; } } /// /// Gets or sets the JIRA project to which the requests should be submitted. /// Null if not set. /// public static JiraProject SubmitToProject { get { int nResId = Core.SettingStore.ReadInt("Jiffa.Submission", "SubmitToProject", -1); IResource res = Core.ResourceStore.TryLoadResource(nResId); return res != null ? JiraProject.FromResource(res) : null; } set { int nResId = -1; if(value != null) nResId = value.Resource.Id; Core.SettingStore.WriteInt("Jiffa.Submission", "SubmitToProject", nResId); } } /// /// Gets or sets the regexp mask that should fetch the build number from the news article title. /// public static string BuildNumberMask { get { return Core.SettingStore.ReadString("Jiffa.Submission", "BuildNumberMask", BuildNumberMask_Default); } set { if(value == null) throw new ArgumentNullException("value"); Core.SettingStore.WriteString("Jiffa.Submission", "BuildNumberMask", value); } } /// /// Default for . /// public static string BuildNumberMask_Default { get { return @"\(([^)]+)\)|\[([^]]+)\]|\#(\w+)\b"; } } /// /// The DisplayName of the “Build” custom field in JIRA. /// public static string CustomFieldNames_BuildNumber { get { return Core.SettingStore.ReadString("Jiffa.Submission", "CustomFieldNames.BuildNumber", CustomFieldNames_BuildNumber_Default); } set { Core.SettingStore.WriteString("Jiffa.Submission", "CustomFieldNames.BuildNumber", value); } } /// /// Default for the . /// public static string CustomFieldNames_BuildNumber_Default { get { return "Build"; } } /// /// The DisplayName of the “Original URI” custom field in JIRA. /// public static string CustomFieldNames_OriginalUri { get { return Core.SettingStore.ReadString("Jiffa.Submission", "CustomFieldNames.OriginalUri", CustomFieldNames_OriginalUri_Default); } set { Core.SettingStore.WriteString("Jiffa.Submission", "CustomFieldNames.OriginalUri", value); } } /// /// Default for the . /// public static string CustomFieldNames_OriginalUri_Default { get { return "Old URL"; } } /// /// Gets or sets whether the MRU values should be restored in the dialogs when they are opened. /// public static bool MruEnabled { get { return Core.SettingStore.ReadBool("Jiffa.Submission", "CustomFieldNames.MruEnabled", MruEnabled_Default); } set { Core.SettingStore.WriteBool("Jiffa.Submission", "CustomFieldNames.MruEnabled", value); } } /// /// Default for the . /// public static bool MruEnabled_Default { get { return true; } } } }