Skip to content

Commit 43361ef

Browse files
Merge branch 'master' into stable
2 parents 7273b60 + 7c60433 commit 43361ef

File tree

154 files changed

+9044
-2012
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+9044
-2012
lines changed

CHANGELOG.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
11
# Changelog
22

3-
## vNext (10.5)
3+
## vNext (10.6)
44

55
These changes have not been released to the Visual Studio marketplace, but (if checked) are available in preview within the [CI build](http://vsixgallery.com/extension/4c82e17d-927e-42d2-8460-b473ac7df316/).
66

7-
- [x] Features
8-
9-
- [x] Fixes
7+
- [ ] Features
8+
- [ ] Fixes
109

1110
## Previous Releases
1211

1312
These are the changes to each version that has been released to the Visual Studio marketplace.
1413

14+
## 10.5
15+
16+
**2018-06-09**
17+
18+
- [x] Features
19+
- [x] [#477](https://github.com/codecadwallader/codemaid/pull/477) - Digging: New radial progress bar - thanks [Jammer77](https://github.com/Jammer77)!
20+
- [x] [#506](https://github.com/codecadwallader/codemaid/pull/506) - Enable localization for Chinese - thanks [maikebing](https://github.com/maikebing)!
21+
- [x] [#519](https://github.com/codecadwallader/codemaid/pull/519) - Simplify the code by removing unnecessary guids - thanks [heku](https://github.com/heku)!
22+
- [x] [#525](https://github.com/codecadwallader/codemaid/pull/525) - Make all features switchable - thanks [heku](https://github.com/heku)!
23+
- [x] [#545](https://github.com/codecadwallader/codemaid/pull/545) - Ignore comment lines starting with certain prefixes - thanks [willemduncan](https://github.com/willemduncan)!
24+
25+
- [x] Fixes
26+
- [x] [#479](https://github.com/codecadwallader/codemaid/pull/479) - Update XAML Styler integration mappings - thanks [grochocki](https://github.com/grochocki)!
27+
- [x] [#496](https://github.com/codecadwallader/codemaid/pull/496) - Fix the .NET Framework minimum required version (which is v4.6)
28+
- [x] [#541](https://github.com/codecadwallader/codemaid/pull/541) - Project file (.csproj) cleanup - thanks [heku](https://github.com/heku)!
29+
- [x] [#546](https://github.com/codecadwallader/codemaid/pull/546) - Fix a setting that would leave a trailing white space when formatting comments - thanks [willemduncan](https://github.com/willemduncan)!
30+
- [x] [#556](https://github.com/codecadwallader/codemaid/issues/556) - Partial fix reducing how long we will block waiting for a code model to be built.
31+
1532
## 10.4
1633

1734
**2017-03-26**

CodeMaid.IntegrationTests/CodeMaid.IntegrationTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
1717
<IsCodedUITest>False</IsCodedUITest>
1818
<TestProjectType>UnitTest</TestProjectType>
19-
<TargetFrameworkProfile />
19+
<LangVersion>latest</LangVersion>
2020
</PropertyGroup>
2121
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2222
<DebugSymbols>true</DebugSymbols>

CodeMaid.IntegrationTests/DialogTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void ShowAboutTest()
2121
{
2222
dialogBoxPurger.Start();
2323

24-
var aboutCommand = new CommandID(PackageGuids.GuidCodeMaidCommandAbout, PackageIds.CmdIDCodeMaidAbout);
24+
var aboutCommand = new CommandID(PackageGuids.GuidCodeMaidMenuSet, PackageIds.CmdIDCodeMaidAbout);
2525
TestUtils.ExecuteCommand(aboutCommand);
2626
}
2727
finally
@@ -43,7 +43,7 @@ public void ShowConfigurationTest()
4343
{
4444
dialogBoxPurger.Start();
4545

46-
var configurationCommand = new CommandID(PackageGuids.GuidCodeMaidCommandOptions, PackageIds.CmdIDCodeMaidOptions);
46+
var configurationCommand = new CommandID(PackageGuids.GuidCodeMaidMenuSet, PackageIds.CmdIDCodeMaidOptions);
4747
TestUtils.ExecuteCommand(configurationCommand);
4848
}
4949
finally

CodeMaid.IntegrationTests/Sorting/SortAtBottomTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private static void RunSort(Document document)
5555
textDocument.Selection.EndOfDocument();
5656
textDocument.Selection.LineUp(true, 4);
5757

58-
var sortCommand = new CommandID(PackageGuids.GuidCodeMaidCommandSortLines, PackageIds.CmdIDCodeMaidSortLines);
58+
var sortCommand = new CommandID(PackageGuids.GuidCodeMaidMenuSet, PackageIds.CmdIDCodeMaidSortLines);
5959
TestUtils.ExecuteCommand(sortCommand);
6060
}
6161

CodeMaid.IntegrationTests/Sorting/SortAtTopTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ private static void RunSort(Document document)
5555
textDocument.Selection.StartOfDocument();
5656
textDocument.Selection.LineDown(true, 4);
5757

58-
var sortCommand = new CommandID(PackageGuids.GuidCodeMaidCommandSortLines, PackageIds.CmdIDCodeMaidSortLines);
58+
var sortCommand = new CommandID(PackageGuids.GuidCodeMaidMenuSet, PackageIds.CmdIDCodeMaidSortLines);
5959
TestUtils.ExecuteCommand(sortCommand);
6060
}
6161

CodeMaid.IntegrationTests/Sorting/SortNoChangeTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ private static void RunSort(Document document)
4747
var textDocument = TestUtils.GetTextDocument(document);
4848
textDocument.Selection.SelectAll();
4949

50-
var sortCommand = new CommandID(PackageGuids.GuidCodeMaidCommandSortLines, PackageIds.CmdIDCodeMaidSortLines);
50+
var sortCommand = new CommandID(PackageGuids.GuidCodeMaidMenuSet, PackageIds.CmdIDCodeMaidSortLines);
5151
TestUtils.ExecuteCommand(sortCommand);
5252
}
5353

CodeMaid.IntegrationTests/ToolWindowTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public void ShowBuildProgressTest()
1515
{
1616
UIThreadInvoker.Invoke(new Action(() =>
1717
{
18-
var buildProgressToolWindowCommand = new CommandID(PackageGuids.GuidCodeMaidCommandBuildProgressToolWindow, PackageIds.CmdIDCodeMaidBuildProgressToolWindow);
18+
var buildProgressToolWindowCommand = new CommandID(PackageGuids.GuidCodeMaidMenuSet, PackageIds.CmdIDCodeMaidBuildProgressToolWindow);
1919
TestUtils.ExecuteCommand(buildProgressToolWindowCommand);
2020

2121
Assert.IsTrue(TestUtils.CanFindToolwindow(PackageGuids.GuidCodeMaidToolWindowBuildProgress));
@@ -28,7 +28,7 @@ public void ShowSpadeTest()
2828
{
2929
UIThreadInvoker.Invoke(new Action(() =>
3030
{
31-
var spadeToolWindowCommand = new CommandID(PackageGuids.GuidCodeMaidCommandSpadeToolWindow, PackageIds.CmdIDCodeMaidSpadeToolWindow);
31+
var spadeToolWindowCommand = new CommandID(PackageGuids.GuidCodeMaidMenuSet, PackageIds.CmdIDCodeMaidSpadeToolWindow);
3232
TestUtils.ExecuteCommand(spadeToolWindowCommand);
3333

3434
Assert.IsTrue(TestUtils.CanFindToolwindow(PackageGuids.GuidCodeMaidToolWindowSpade));

CodeMaid.UnitTests/CodeMaid.UnitTests.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath>
1717
<IsCodedUITest>False</IsCodedUITest>
1818
<TestProjectType>UnitTest</TestProjectType>
19-
<TargetFrameworkProfile />
19+
<LangVersion>latest</LangVersion>
2020
</PropertyGroup>
2121
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
2222
<DebugSymbols>true</DebugSymbols>
@@ -113,11 +113,13 @@
113113
<Compile Include="Formatting\CommentFormatHelper.cs" />
114114
<Compile Include="Formatting\HeaderFormattingTests.cs" />
115115
<Compile Include="Formatting\FormatWithPrefixTests.cs" />
116+
<Compile Include="Formatting\IgnorePrefixesTests.cs" />
116117
<Compile Include="Formatting\SimpleFormattingTests.cs" />
117118
<Compile Include="Formatting\XmlFormattingTests.cs" />
118119
<Compile Include="Formatting\ListFormattingTests.cs" />
119120
<Compile Include="Helpers\CodeItemTypeComparerTests.cs" />
120121
<Compile Include="Helpers\CodeMaidPackageHelper.cs" />
122+
<Compile Include="Helpers\SettingsMonitorTests.cs" />
121123
<Compile Include="Helpers\UIShellServiceMock.cs" />
122124
<Compile Include="Helpers\WindowFrameMock.cs" />
123125
<Compile Include="CodeMaidPackageTest.cs" />

CodeMaid.UnitTests/Formatting/CommentFormatHelper.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
using Microsoft.VisualStudio.TestTools.UnitTesting;
2-
using SteveCadwallader.CodeMaid.Helpers;
32
using SteveCadwallader.CodeMaid.Model.Comments;
43
using System;
54
using System.Collections.Generic;
6-
using System.Xml.Linq;
75

86
namespace SteveCadwallader.CodeMaid.UnitTests.Formatting
97
{
@@ -38,11 +36,7 @@ public static string Format(string text)
3836

3937
public static string Format(string text, string prefix)
4038
{
41-
var xml = XElement.Parse($"<doc>{text}</doc>");
42-
var line = new CommentLineXml(xml);
43-
var regex = CodeCommentHelper.GetCommentRegex(CodeLanguage.CSharp, !string.IsNullOrEmpty(prefix));
44-
var formatter = new CommentFormatter(line, prefix, 4, regex);
45-
return formatter.ToString();
39+
return CodeComment.FormatXml(text, prefix);
4640
}
4741
}
4842
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
using Microsoft.VisualStudio.TestTools.UnitTesting;
2+
using SteveCadwallader.CodeMaid.Properties;
3+
using System;
4+
5+
namespace SteveCadwallader.CodeMaid.UnitTests.Formatting
6+
{
7+
/// <summary>
8+
/// Test for the ignoring of comments lines starting with certain prefixes.
9+
/// </summary>
10+
[TestClass]
11+
public class IgnorePrefixesTests
12+
{
13+
[TestInitialize]
14+
public void TestInitialize()
15+
{
16+
Settings.Default.Reset();
17+
}
18+
19+
[TestMethod]
20+
[TestCategory("Formatting UnitTests")]
21+
public void IgnorePrefixesTests_DoesNotWrapSingleLine()
22+
{
23+
Settings.Default.Formatting_CommentWrapColumn = 30;
24+
CommentFormatHelper.AssertEqualAfterFormat(@"TODO: Lorem ipsum dolor sit amet, consectetur adipiscing elit.");
25+
}
26+
27+
[TestMethod]
28+
[TestCategory("Formatting UnitTests")]
29+
public void IgnorePrefixesTests_DoesNotWrapLineInsideComment()
30+
{
31+
var input =
32+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." + Environment.NewLine +
33+
"TODO: Lorem ipsum dolor sit amet, consectetur adipiscing elit." + Environment.NewLine +
34+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
35+
36+
// Expect all lines to be wrapped except for the one starting with "TODO".
37+
var expected =
38+
"Lorem ipsum dolor sit amet," + Environment.NewLine +
39+
"consectetur adipiscing elit." + Environment.NewLine +
40+
"TODO: Lorem ipsum dolor sit amet, consectetur adipiscing elit." + Environment.NewLine +
41+
"Lorem ipsum dolor sit amet," + Environment.NewLine +
42+
"consectetur adipiscing elit.";
43+
44+
Settings.Default.Formatting_CommentWrapColumn = 30;
45+
CommentFormatHelper.AssertEqualAfterFormat(input, expected);
46+
}
47+
48+
[TestMethod]
49+
[TestCategory("Formatting UnitTests")]
50+
public void IgnorePrefixesTests_DoesNotCombineSubsequentLines()
51+
{
52+
var input =
53+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." + Environment.NewLine +
54+
"TODO: Lorem ipsum dolor sit amet, consectetur adipiscing elit." + Environment.NewLine +
55+
"TODO: Lorem ipsum dolor sit amet, consectetur adipiscing elit." + Environment.NewLine +
56+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit.";
57+
58+
// Expect every "ignored" line to stay on it's own.
59+
var expected =
60+
"Lorem ipsum dolor sit amet," + Environment.NewLine +
61+
"consectetur adipiscing elit." + Environment.NewLine +
62+
"TODO: Lorem ipsum dolor sit amet, consectetur adipiscing elit." + Environment.NewLine +
63+
"TODO: Lorem ipsum dolor sit amet, consectetur adipiscing elit." + Environment.NewLine +
64+
"Lorem ipsum dolor sit amet," + Environment.NewLine +
65+
"consectetur adipiscing elit.";
66+
67+
Settings.Default.Formatting_CommentWrapColumn = 30;
68+
CommentFormatHelper.AssertEqualAfterFormat(input, expected);
69+
}
70+
}
71+
}

0 commit comments

Comments
 (0)