Skip to content

Commit

Permalink
Tons of fixes to get stuff working with R# 9.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyTeplyakov committed Sep 28, 2015
1 parent beb584e commit dfa1273
Show file tree
Hide file tree
Showing 213 changed files with 1,449 additions and 1,229 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,9 @@ $RECYCLE.BIN/
.DS_Store
ContractExtensions.sln.ide
/ContractExtensions/bin.R82/lib
/ContractExtensions/bin/lib
*.nupkg
.vs/

/ContractExtensions/Scripts/
/ReSharper.ContractExtensions.Tests/Scripts/
22 changes: 13 additions & 9 deletions ContractExtensions.nuspec
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>ReSharper.ContractExtensions</id>
<version>0.9.0.2</version>
<version>0.9.2.0</version>
<!-- update plugin ver in AssemblyInfo.cs plz -->
<title>Code Contract editing extensions</title>
<authors>Sergey Teplyakov</authors>
<authors>Sergey Teplyakov, https://github.com/Diagonactic</authors>
<owners>SergeyTeplyakov</owners>
<projectUrl>https://github.com/SergeyTeplyakov/ReSharperContractExtensions</projectUrl>
<iconUrl>https://github.com/SergeyTeplyakov/ReSharperContractExtensions/raw/master/Content/DesignByContract.ico</iconUrl>
Expand All @@ -14,7 +14,16 @@
Simplifies adding preconditions, postconditions and object invariant during day-to-day activities.
Detects Code Contract error/warnings in the IDE.
</description>
<dependencies>
<dependency id="Wave" version="[3.0]" />
</dependencies>
<releaseNotes>

*What's new in 0.9.2.0*
Updated to API for ReSharper 9.2
Minor bug fixes.
Support for nameof(s) in requires

*What's new in 0.9.0.2*
Fixed false positive warnings on Code Contract preconditions in the async methods and iterator blocks (#48)
Added quick fix for "suspicious legacy precondition" in async methods and iterator blocks.
Expand Down Expand Up @@ -87,14 +96,9 @@ New features (v.0.6.0)
Bug fixes
- Fixed issue with invalid order of Contract.Invariant statements in the object invariant method.
</releaseNotes>
<dependencies>
<dependency id="ReSharper" version="8.0" />
</dependencies>
<tags>code contracts design by contract</tags>
</metadata>
<files>
<file src="ContractExtensions\binR82\Release\" target="ReSharper\v8.2\plugins\" />
<file src="ContractExtensions\binR81\Release\" target="ReSharper\v8.1\plugins\" />
<file src="ContractExtensions\binR80\Release\" target="ReSharper\v8.0\plugins\" />
<file src="ContractExtensions\bin\Release\" target="DotFiles" />
</files>
</package>
10 changes: 2 additions & 8 deletions ContractExtensions.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
# Visual Studio 14
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReSharper.ContractExtensions", "ContractExtensions\ReSharper.ContractExtensions.csproj", "{015F0C46-EB80-40FA-A508-CAD66B02B7E6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{A30DAFF8-9B8B-447A-801F-15337A16833D}"
ProjectSection(SolutionItems) = preProject
TODO.txt = TODO.txt
UsefullNotes.txt = UsefullNotes.txt
EndProjectSection
EndProject
Expand Down Expand Up @@ -40,23 +39,18 @@ Global
{45CDD107-FF9E-4C98-BCC7-0151953B6CAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{45CDD107-FF9E-4C98-BCC7-0151953B6CAA}.Release|Any CPU.Build.0 = Release|Any CPU
{E4AF008B-F55E-495A-8F54-AFFF5B43E500}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E4AF008B-F55E-495A-8F54-AFFF5B43E500}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E4AF008B-F55E-495A-8F54-AFFF5B43E500}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E4AF008B-F55E-495A-8F54-AFFF5B43E500}.Release|Any CPU.Build.0 = Release|Any CPU
{B0A3DCD3-5B44-4E3B-9208-42C9AD545D35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B0A3DCD3-5B44-4E3B-9208-42C9AD545D35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B0A3DCD3-5B44-4E3B-9208-42C9AD545D35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B0A3DCD3-5B44-4E3B-9208-42C9AD545D35}.Release|Any CPU.Build.0 = Release|Any CPU
{9751E034-79DD-4AA8-A308-89E44E8C2C0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9751E034-79DD-4AA8-A308-89E44E8C2C0C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9751E034-79DD-4AA8-A308-89E44E8C2C0C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9751E034-79DD-4AA8-A308-89E44E8C2C0C}.Release|Any CPU.Build.0 = Release|Any CPU
{056D871D-0F3D-43C3-9EE3-FAD4B18BF3D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{056D871D-0F3D-43C3-9EE3-FAD4B18BF3D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{056D871D-0F3D-43C3-9EE3-FAD4B18BF3D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{056D871D-0F3D-43C3-9EE3-FAD4B18BF3D9}.Release|Any CPU.Build.0 = Release|Any CPU
{1FD4BE17-1953-4803-A4D3-D01C92F794DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FD4BE17-1953-4803-A4D3-D01C92F794DD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FD4BE17-1953-4803-A4D3-D01C92F794DD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FD4BE17-1953-4803-A4D3-D01C92F794DD}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System.Diagnostics.Contracts;
using System.Linq;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Feature.Services.Generate;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
using JetBrains.ReSharper.Psi.Tree;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Diagnostics.Contracts;
using JetBrains.ReSharper.Feature.Services.Bulbs;
using JetBrains.ReSharper.Feature.Services.ContextActions;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using ReSharper.ContractExtensions.ContextActions.Infrastructure;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Linq;
using JetBrains.Application.Progress;
using JetBrains.Application.Settings;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Generate;
using JetBrains.ReSharper.Feature.Services.Generate;
Expand Down Expand Up @@ -162,7 +163,7 @@ private void ImplementContractForAbstractClass(IClassDeclaration contractClass,

workflow.Context.InputElements.AddRange(workflow.Context.ProvidedElements);

workflow.GenerateAndFinish("Generate contract class", NullProgressIndicator.Instance);
workflow.Generate("Generate contract class", NullProgressIndicator.Instance);
}
}

Expand Down Expand Up @@ -194,20 +195,20 @@ private void ImplementContractForInterface(IClassDeclaration contractClass,
return;

using (var workflow = GeneratorWorkflowFactory.CreateWorkflowWithoutTextControl(
GeneratorStandardKinds.Implementations,
GeneratorStandardKinds.MissingMembers,
contractClass,
interfaceDeclaration))
{
Contract.Assert(workflow != null);

workflow.Context.SetGlobalOptionValue(
CSharpBuilderOptions.ImplementationKind,
CSharpBuilderOptions.ImplementationKindExplicit);

workflow.Context.InputElements.Clear();
workflow.Context.InputElements.AddRange(workflow.Context.ProvidedElements);

workflow.GenerateAndFinish("Generate contract class", NullProgressIndicator.Instance);
workflow.Context.SetOption(
CSharpBuilderOptions.ImplementationKind,
CSharpBuilderOptions.ImplementationKindExplicit);

workflow.Generate("Generate contract class", NullProgressIndicator.Instance);
}
}

Expand Down Expand Up @@ -246,8 +247,8 @@ private void AddNonDefaultConstructorIfNeeded(IClassDeclaration contractClass)
{
workflow.Context.InputElements.Clear();
workflow.Context.InputElements.Add(ctor);
workflow.BuildInputOptions();
workflow.GenerateAndFinish("Generate missing constructor", NullProgressIndicator.Instance);
workflow.BuildOptions();
workflow.Generate("Generate missing constructor", NullProgressIndicator.Instance);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Diagnostics.Contracts;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi.CSharp.Tree;
using ReSharper.ContractExtensions.ContextActions.ContractsFor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Feature.Services.Bulbs;
using JetBrains.ReSharper.Feature.Services.ContextActions;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Intentions.Extensibility;
using JetBrains.TextControl;
using JetBrains.Util;
using ReSharper.ContractExtensions.ContextActions.Infrastructure;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Diagnostics.Contracts;
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi.CSharp.Tree;
using ReSharper.ContractExtensions.ContextActions.ContractsFor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Feature.Services.Bulbs;
using JetBrains.ReSharper.Feature.Services.ContextActions;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Intentions.Extensibility;
using JetBrains.TextControl;
using JetBrains.Util;
using ReSharper.ContractExtensions.ContextActions.Ensures;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using System.Diagnostics.Contracts;
using System.Linq;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Diagnostics.Contracts;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Feature.Services.Bulbs;
using JetBrains.ReSharper.Feature.Services.ContextActions;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Intentions.Extensibility;
using JetBrains.TextControl;
using JetBrains.Util;
using ReSharper.ContractExtensions.ContextActions.Ensures;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Diagnostics.Contracts;
using JetBrains.Metadata.Reader.API;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Feature.Services.Bulbs;
using JetBrains.ReSharper.Feature.Services.ContextActions;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi.Naming.Impl;
using JetBrains.TextControl;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Diagnostics.Contracts;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;

namespace ReSharper.ContractExtensions.ContextActions.Infrastructure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
using System.Diagnostics.Contracts;
using JetBrains.Application.Settings.Storage.Persistence;
using JetBrains.Metadata.Reader.API;
using JetBrains.Metadata.Reader.Impl;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
using System.Diagnostics.Contracts;
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Feature.Services.ContextActions;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Intentions.Extensibility;

using JetBrains.TextControl;
using JetBrains.Util;
using ReSharper.ContractExtensions.Utilities;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Diagnostics.Contracts;
using System.Linq;
using JetBrains.Annotations;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Diagnostics.Contracts;
using System.Linq;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Feature.Services.Bulbs;
using JetBrains.ReSharper.Feature.Services.ContextActions;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Intentions.Extensibility;
using JetBrains.TextControl;
using JetBrains.Util;
using ReSharper.ContractExtensions.ContextActions.Infrastructure;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
using System.Collections.ObjectModel;
using System.Diagnostics.Contracts;
using System.Linq;
using JetBrains.Metadata.Reader.API;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System.Diagnostics.Contracts;
using JetBrains.ReSharper.Feature.Services.Bulbs;
using JetBrains.ReSharper.Feature.Services.ContextActions;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;

namespace ReSharper.ContractExtensions.ContextActions.Requires
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using System.Diagnostics.Contracts;
using JetBrains.Annotations;
using JetBrains.Application.Settings;
using JetBrains.Metadata.Reader.API;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
using System.Diagnostics.Contracts;
using System.Linq;
using JetBrains.Annotations;
using JetBrains.Metadata.Reader.API;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
using JetBrains.Application;
using JetBrains.Application.Progress;
using JetBrains.Application.Settings;
using JetBrains.Metadata.Reader.API;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Daemon.Src.Bulbs.Resources;
using JetBrains.ReSharper.Feature.Services.Bulbs;
using JetBrains.ReSharper.Feature.Services.ContextActions;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Intentions.Extensibility;
using JetBrains.ReSharper.Intentions.Extensibility.Menu;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
using JetBrains.ReSharper.Psi.Tree;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Diagnostics.Contracts;
using JetBrains.Metadata.Reader.API;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp.Tree;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
using JetBrains.Application.Progress;
using JetBrains.ProjectModel;
using JetBrains.ReSharper.Feature.Services.Bulbs;
using JetBrains.ReSharper.Feature.Services.ContextActions;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi.CSharp.Tree;
using JetBrains.TextControl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Diagnostics.Contracts;
using System.Linq;
using JetBrains.Annotations;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi.CSharp.Tree;
using JetBrains.ReSharper.Psi.Tree;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Diagnostics.Contracts;
using JetBrains.Metadata.Reader.API;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Diagnostics.Contracts;
using JetBrains.Annotations;
using JetBrains.ReSharper.Feature.Services.CSharp.Analyses.Bulbs;
using JetBrains.ReSharper.Feature.Services.CSharp.Bulbs;
using JetBrains.ReSharper.Psi.CSharp.Tree;
using ReSharper.ContractExtensions.ContextActions.Infrastructure;
Expand Down
Loading

0 comments on commit dfa1273

Please sign in to comment.