Skip to content

Commit d15dcdf

Browse files
authored
Recompiled with R# SDK 2022.1.0 (#90)
1 parent e7a65dd commit d15dcdf

File tree

13 files changed

+1089
-976
lines changed

13 files changed

+1089
-976
lines changed

Project/Src/InstallSupport/TestCop.nuspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
<id>Resharper.TestCop.R9</id>
55
<version>0.0.0-internal</version>
66

7-
<title>TestCop for ReSharper 2021.3</title>
7+
<title>TestCop for ReSharper 2022.1</title>
88
<authors>Alcaeus</authors>
99
<description>Easily switch between unit tests and code. Create missing associated files. Includes highlightings and test templates to keep test projects neat and tidy. Works with NUnit, MSTest, xUnit ...</description>
1010
<releaseNotes>
11+
1.10.16.0 Recompiled with R# SDK 2022.1.0
1112
1.10.15.7 Fixed focus issue when logging output
1213
1.10.15.6 Recompiled with R# SDK 2021.3.1
1314
1.10.15.5-EAP Recompiled with R# SDK 2021.3.0-eap07 and applied api changes

Project/Src/TestCop.Plugin.Tests/CSharpHighlightingWithinSolutionTestBase.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
using JetBrains.TextControl;
3535
using JetBrains.TextControl.DataContext;
3636
using JetBrains.Util;
37+
3738
using NUnit.Framework;
3839
using TestCop.Plugin.Extensions;
3940

@@ -223,7 +224,8 @@ protected virtual IExecutableAction GetShortcutAction(TextWriter textwriter)
223224

224225
protected ITextControl OpenTextControl(IProjectFile projectFile, int? caretOffset = null)
225226
{
226-
Task<ITextControl> openProjectFileAsync = EditorManager.GetInstance(projectFile.GetSolution()).OpenProjectFileAsync(projectFile, new OpenFileOptions(true));
227+
IEditorManager editorManager = projectFile.GetSolution().GetComponent<IEditorManager>();
228+
Task<ITextControl> openProjectFileAsync = editorManager.OpenProjectFileAsync(projectFile, new OpenFileOptions(true));
227229
openProjectFileAsync.Wait();
228230
return openProjectFileAsync.Result;
229231
}

Project/Src/TestCop.Plugin.Tests/RenameRefactoring/RenameTestFilesTooRefactoringTestBase.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ private static IDeclaredElement FindTypeInFile(ISolution solution, string testFi
9595
throw new Exception("Whilst configuring test I didn't find project item: "+testFile);
9696
}
9797

98-
var document = DocumentManager.GetInstance(solution).GetOrCreateDocument(projectFile);
98+
DocumentManager documentManager = solution.GetComponent<DocumentManager>();
99+
var document = documentManager.GetOrCreateDocument(projectFile);
99100
var findFirstTypeInFile = ResharperHelper.FindDeclaredElementInFile(solution, document, typeSequenceInFile);
100101
return findFirstTypeInFile;
101102
}

Project/Src/TestCop.Plugin.Tests/TestCop.Plugin.Tests.csproj

Lines changed: 387 additions & 365 deletions
Large diffs are not rendered by default.

Project/Src/TestCop.Plugin.Tests/app.config

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,26 @@
2222
<assemblyIdentity name="Microsoft.VisualStudio.TestPlatform.ObjectModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
2323
<bindingRedirect oldVersion="0.0.0.0-15.0.0.0" newVersion="15.0.0.0" />
2424
</dependentAssembly>
25+
<dependentAssembly>
26+
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
27+
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
28+
</dependentAssembly>
29+
<dependentAssembly>
30+
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
31+
<bindingRedirect oldVersion="0.0.0.0-42.42.42.42" newVersion="42.42.42.42" />
32+
</dependentAssembly>
33+
<dependentAssembly>
34+
<assemblyIdentity name="Microsoft.CodeAnalysis.Workspaces" publicKeyToken="31bf3856ad364e35" culture="neutral" />
35+
<bindingRedirect oldVersion="0.0.0.0-42.42.42.42" newVersion="42.42.42.42" />
36+
</dependentAssembly>
37+
<dependentAssembly>
38+
<assemblyIdentity name="Microsoft.CodeAnalysis.CSharp" publicKeyToken="31bf3856ad364e35" culture="neutral" />
39+
<bindingRedirect oldVersion="0.0.0.0-42.42.42.42" newVersion="42.42.42.42" />
40+
</dependentAssembly>
41+
<dependentAssembly>
42+
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
43+
<bindingRedirect oldVersion="0.0.0.0-4.0.4.1" newVersion="4.0.4.1" />
44+
</dependentAssembly>
2545
</assemblyBinding>
2646
</runtime>
2747
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /></startup></configuration>

Project/Src/TestCop.Plugin.Tests/packages.config

Lines changed: 134 additions & 119 deletions
Large diffs are not rendered by default.

Project/Src/TestCop.Plugin/Helper/JumpToTestMenuHelper.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030

3131
namespace TestCop.Plugin.Helper
3232
{
33+
using JetBrains.Util.Media;
34+
3335
public static class JumpToTestMenuHelper
3436
{
3537
//------------------------------------------------------------------------------------------------------------------------
@@ -75,13 +77,16 @@ public static void PromptToOpenOrCreateClassFiles(Action<JetPopupMenus, JetPopup
7577
private static void AppendNavigateToMenuItems(Lifetime lifetime, ISolution solution, List<IClrDeclaredElement> clrDeclaredElements,
7678
List<SimpleMenuItem> menuItems)
7779
{
80+
IEditorManager editorManager = solution.GetComponent<IEditorManager>();
81+
DocumentManager documentManager = solution.GetComponent<DocumentManager>();
82+
7883
foreach (var declaredElement in clrDeclaredElements)
7984
{
80-
var simpleMenuItems = DescribeFilesAssociatedWithDeclaredElement(lifetime, DocumentManager.GetInstance(solution),
85+
var simpleMenuItems = DescribeFilesAssociatedWithDeclaredElement(lifetime, documentManager,
8186
declaredElement
8287
,
8388
p => async () =>
84-
await EditorManager.GetInstance(solution).OpenProjectFileAsync(p, new OpenFileOptions(true)).ConfigureAwait(false)
89+
await editorManager.OpenProjectFileAsync(p, new OpenFileOptions(true)).ConfigureAwait(false)
8590
);
8691
menuItems.AddRange(simpleMenuItems);
8792
}
@@ -229,12 +234,12 @@ private static List<SimpleMenuItem> AddCreateFileMenuItem(Lifetime lifetime, Tes
229234
{
230235
Style = MenuItemStyle.Enabled,
231236
Icon = UnnamedThemedIcons.Agent16x16.Id,
232-
Text = new RichText("Create ", TextStyle.FromForeColor(Color.Green))
237+
Text = new RichText("Create ", TextStyle.FromForeColor(JetRgbaColor.FromArgb(Color.Green.A, Color.Green.R, Color.Green.G, Color.Green.B)))
233238
.Append(targetFile, TextStyle.FromForeColor(TextStyle.DefaultForegroundColor)),
234239
ShortcutText = new RichText("(" + projectItem.Project.GetPresentableProjectPath()
235240
+ projectItem.SubNamespaceFolder.FullPath.RemoveLeading(projectItem.Project.ProjectFileLocation.Directory.FullPath)
236241
+ ")",
237-
TextStyle.FromForeColor(Color.LightGray))
242+
TextStyle.FromForeColor(JetRgbaColor.FromArgb(Color.LightGray.A, Color.LightGray.R, Color.LightGray.G, Color.LightGray.B)))
238243
};
239244
menuItems.Add(result);
240245
return menuItems;

Project/Src/TestCop.Plugin/ProjectAnalysisElementProcessor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private void CheckForProjectFilesNotInProjectAndWarn(ITreeNode element)
7878

7979
var currentProject = element.GetProject();
8080
ICollection<VirtualFileSystemPath> directoriesToSkip = currentProject.GetOutputDirectories();
81-
directoriesToSkip.AddAll(currentProject.GetIntermidiateDirectories());
81+
directoriesToSkip.AddAll(currentProject.GetIntermediateDirectories());
8282

8383
var allProjectFileLocations = currentProject.GetAllProjectFiles().Select(p => p.Location).ToList();
8484
var allProjectFiles = allProjectFileLocations.Select(loc => loc.FullPath).ToList();

Project/Src/TestCop.Plugin/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@
3838
// by using the '*' as shown below:
3939
// [assembly: AssemblyVersion("1.0.*")]
4040

41-
[assembly: AssemblyVersion("1.10.15.7")]
42-
[assembly: AssemblyFileVersion("1.10.15.7")]
41+
[assembly: AssemblyVersion("1.10.16.0")]
42+
[assembly: AssemblyFileVersion("1.10.16.0")]
4343

Project/Src/TestCop.Plugin/RenameTestFilesTooRefactoring.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ public IEnumerable<FileRename> GetFileRenames(IDeclaredElement declaredElement,
8080
continue;
8181
}
8282

83+
IEditorManager editorManager = solution.GetComponent<IEditorManager>();
84+
8385
//TODO EditorManager.GetInstance(solution).OpenProjectFile(projectFileMatch.ProjectFile, new OpenFileOptions(false));
84-
EditorManager.GetInstance(solution).OpenProjectFileAsync(projectFileMatch.ProjectFile, new OpenFileOptions(false));
86+
editorManager.OpenProjectFileAsync(projectFileMatch.ProjectFile, new OpenFileOptions(false));
8587
//need to ensure class within file is renamed tooo
8688
yield return
8789
new FileRename(psiModule.GetPsiServices(), projectFileMatch.ProjectFile, newTestClassName);

0 commit comments

Comments
 (0)