diff --git a/EditorExtensions/BrowserLink/UnusedCss/UnusedCssExtension.cs b/EditorExtensions/BrowserLink/UnusedCss/UnusedCssExtension.cs index 0965cef55..6d1de1092 100644 --- a/EditorExtensions/BrowserLink/UnusedCss/UnusedCssExtension.cs +++ b/EditorExtensions/BrowserLink/UnusedCss/UnusedCssExtension.cs @@ -48,7 +48,7 @@ public UnusedCssExtension(BrowserLinkConnection connection) _uploadHelper = new UploadHelper(); _connection = connection; - UnusedCssOptions.SettingsUpdated += InstallIgnorePatterns; + BrowserLinkOptions.SettingsUpdated += InstallIgnorePatterns; } private void ToggleRecordingModeAction(BrowserLinkAction obj) @@ -177,7 +177,7 @@ public override void OnDisconnecting(BrowserLinkConnection connection) ExtensionByConnection.TryRemove(connection, out extension); - UnusedCssOptions.SettingsUpdated -= InstallIgnorePatterns; + BrowserLinkOptions.SettingsUpdated -= InstallIgnorePatterns; } [BrowserLinkCallback] diff --git a/EditorExtensions/EditorExtensionsPackage.cs b/EditorExtensions/EditorExtensionsPackage.cs index 29450cb61..576c515a7 100644 --- a/EditorExtensions/EditorExtensionsPackage.cs +++ b/EditorExtensions/EditorExtensionsPackage.cs @@ -25,7 +25,7 @@ namespace MadsKristensen.EditorExtensions [ProvideOptionPage(typeof(LessOptions), "Web Essentials", "LESS", 101, 105, true)] [ProvideOptionPage(typeof(CoffeeScriptOptions), "Web Essentials", "CoffeeScript", 101, 106, true, new[] { "Iced", "JavaScript", "JS", "JScript" })] [ProvideOptionPage(typeof(JavaScriptOptions), "Web Essentials", "JavaScript", 101, 107, true, new[] { "JScript", "JS", "Minify", "Minification", "EcmaScript" })] - [ProvideOptionPage(typeof(UnusedCssOptions), "Web Essentials", "Unused CSS", 101, 108, true, new[] { "Ignore", "Filter" })] + [ProvideOptionPage(typeof(BrowserLinkOptions), "Web Essentials", "Browser Link", 101, 108, true, new[] { "HTML menu", "BrowserLink" })] [ProvideOptionPage(typeof(MarkdownOptions), "Web Essentials", "Markdown", 101, 109, true, new[] { "markdown", "Markdown", "md" })] [ProvideOptionPage(typeof(CodeGenerationOptions), "Web Essentials", "Code Generation", 101, 210, true, new[] { "CodeGeneration", "codeGeneration" })] [ProvideOptionPage(typeof(TypeScriptOptions), "Web Essentials", "TypeScript", 101, 210, true, new[] { "TypeScript", "TS" })] diff --git a/EditorExtensions/Options/UnusedCssOptions.cs b/EditorExtensions/Options/BrowserLinkOptions.cs similarity index 57% rename from EditorExtensions/Options/UnusedCssOptions.cs rename to EditorExtensions/Options/BrowserLinkOptions.cs index 66ceefe3e..14d3cdd37 100644 --- a/EditorExtensions/Options/UnusedCssOptions.cs +++ b/EditorExtensions/Options/BrowserLinkOptions.cs @@ -4,22 +4,17 @@ namespace MadsKristensen.EditorExtensions { - class UnusedCssOptions : DialogPage + class BrowserLinkOptions : DialogPage { - [LocDisplayName("File patterns to ignore")] - [Description("A semicolon-separated list of file patterns to ignore.")] - [Category("CSS")] - public string IgnorePatterns { get; set; } - - //[LocDisplayName("Ignore remote files")] - //[Description("Ignore files that are not part of the project")] - //[Category("CSS")] - //public bool IgnoreRemoteFiles { get; set; } + public BrowserLinkOptions() + { + Settings.Updated += delegate { LoadSettingsFromStorage(); }; + } public override void SaveSettingsToStorage() { Settings.SetValue(WESettings.Keys.UnusedCss_IgnorePatterns, IgnorePatterns); - //Settings.SetValue(WESettings.Keys.UnusedCss_IgnoreRemoteFiles, IgnoreRemoteFiles); + Settings.SetValue(WESettings.Keys.EnableBrowserLinkMenu, EnableBrowserLinkMenu); Settings.Save(); } @@ -27,9 +22,18 @@ public override void SaveSettingsToStorage() public override void LoadSettingsFromStorage() { IgnorePatterns = WESettings.GetString(WESettings.Keys.UnusedCss_IgnorePatterns); - //IgnoreRemoteFiles = WESettings.GetBoolean(WESettings.Keys.UnusedCss_IgnoreRemoteFiles); + EnableBrowserLinkMenu = WESettings.GetBoolean(WESettings.Keys.EnableBrowserLinkMenu); } + [LocDisplayName("CSS usage files to ignore")] + [Description("A semicolon-separated list of file patterns to ignore.")] + [Category("Browser Link")] + public string IgnorePatterns { get; set; } + + [LocDisplayName("Enable Browser Link menu")] + [Description("Enable the menu that shows up in the browser. Requires restart.")] + [Category("Browser Link")] + public bool EnableBrowserLinkMenu { get; set; } protected override void OnApply(DialogPage.PageApplyEventArgs e) { diff --git a/EditorExtensions/Options/General.cs b/EditorExtensions/Options/General.cs index 6e97dd6fe..414f2a436 100644 --- a/EditorExtensions/Options/General.cs +++ b/EditorExtensions/Options/General.cs @@ -13,7 +13,6 @@ public GeneralOptions() public override void SaveSettingsToStorage() { Settings.SetValue(WESettings.Keys.KeepImportantComments, KeepImportantComments); - Settings.SetValue(WESettings.Keys.EnableBrowserLinkMenu, EnableBrowserLinkMenu); Settings.SetValue(WESettings.Keys.AllMessagesToOutputWindow, AllMessagesToOutputWindow); Settings.SetValue(WESettings.Keys.SvgShowPreviewWindow, SvgShowPreviewWindow); @@ -23,7 +22,6 @@ public override void SaveSettingsToStorage() public override void LoadSettingsFromStorage() { KeepImportantComments = WESettings.GetBoolean(WESettings.Keys.KeepImportantComments); - EnableBrowserLinkMenu = WESettings.GetBoolean(WESettings.Keys.EnableBrowserLinkMenu); AllMessagesToOutputWindow = WESettings.GetBoolean(WESettings.Keys.AllMessagesToOutputWindow); SvgShowPreviewWindow = WESettings.GetBoolean(WESettings.Keys.SvgShowPreviewWindow); } @@ -34,11 +32,6 @@ public override void LoadSettingsFromStorage() [Category("Minification")] public bool KeepImportantComments { get; set; } - [LocDisplayName("Enable Browser Link menu")] - [Description("Enable the menu that shows up in the browser. Requires restart.")] - [Category("Browser Link")] - public bool EnableBrowserLinkMenu { get; set; } - [LocDisplayName("Redirect Messages to Output Window")] [Description("Redirect messages/notifications to output window.")] [Category("Messages")] diff --git a/EditorExtensions/Options/WebEssentialsSettings.cs b/EditorExtensions/Options/WebEssentialsSettings.cs index 5a75a8c15..2dd923470 100644 --- a/EditorExtensions/Options/WebEssentialsSettings.cs +++ b/EditorExtensions/Options/WebEssentialsSettings.cs @@ -8,8 +8,7 @@ public static class Keys public const string JavaScriptCamelCasePropertyNames = "JavaScriptCamelCasePropertyNames"; public const string JavaScriptCamelCaseClassNames = "JavaScriptCamelCaseClassNames"; // General - public const string KeepImportantComments = "KeepImportantComments"; - public const string EnableBrowserLinkMenu = "EnableBrowserLinkMenu"; + public const string KeepImportantComments = "KeepImportantComments"; public const string AllMessagesToOutputWindow = "AllMessagesToOutputWindow"; // HTML @@ -140,9 +139,9 @@ public static class Keys public const string JsHint_worker = "JsHint_worker"; public const string JsHint_wsh = "JsHint_wsh"; - //Unused Css + // Browser Link public const string UnusedCss_IgnorePatterns = "UnusedCss_IgnorePatterns"; - public const string UnusedCss_IgnoreRemoteFiles = "UnusedCss_IgnoreRemoteFiles"; + public const string EnableBrowserLinkMenu = "EnableBrowserLinkMenu"; //Pixel Pushing mode public const string PixelPushing_OnByDefault = "PixelPushing_OnByDefault"; diff --git a/EditorExtensions/WebEssentials2013.csproj b/EditorExtensions/WebEssentials2013.csproj index 1d7bef5bd..326b5a7a9 100644 --- a/EditorExtensions/WebEssentials2013.csproj +++ b/EditorExtensions/WebEssentials2013.csproj @@ -522,7 +522,7 @@ Component - + Component