Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.

Commit e319e57

Browse files
Merge pull request #8996 from mono/pr-sandy-remove-refactoring-essentials
Remove RefactoringEssentials
2 parents 5655056 + ed9b373 commit e319e57

File tree

17 files changed

+37
-103
lines changed

17 files changed

+37
-103
lines changed

.gitmodules

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@
3737
path = main/external/nuget-binary
3838
url = git://github.com/mono/nuget-binary.git
3939
branch = master
40-
[submodule "main/external/RefactoringEssentials"]
41-
path = main/external/RefactoringEssentials
42-
url = git://github.com/mono/RefactoringEssentials.git
43-
branch = roslyn-3
4440
[submodule "main/external/sharpsvn-binary"]
4541
path = main/external/sharpsvn-binary
4642
url = git://github.com/mono/sharpsvn-binary.git

main/Main.sln

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.Ide.Tests", "te
251251
EndProject
252252
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsPlatform.Tests", "tests\WindowsPlatform.Tests\WindowsPlatform.Tests.csproj", "{865100E2-A29C-4FCD-B803-1A0B9A0A6EF7}"
253253
EndProject
254-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RefactoringEssentials", "external\RefactoringEssentials\RefactoringEssentials\RefactoringEssentials.csproj", "{C465A5DC-AD28-49A2-89C0-F81838814A7E}"
255-
EndProject
256254
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.CSharpBinding.Tests", "tests\MonoDevelop.CSharpBinding.Tests\MonoDevelop.CSharpBinding.Tests.csproj", "{84E22F5F-0562-4B51-8B9A-FD79FF33A8B5}"
257255
EndProject
258256
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoDevelop.UnitTesting.NUnit", "src\addins\MonoDevelop.UnitTesting.NUnit\MonoDevelop.UnitTesting.NUnit.csproj", "{6224D87E-2AC1-4D9F-91ED-714F797297BF}"
@@ -1709,22 +1707,6 @@ Global
17091707
{865100E2-A29C-4FCD-B803-1A0B9A0A6EF7}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
17101708
{865100E2-A29C-4FCD-B803-1A0B9A0A6EF7}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
17111709
{865100E2-A29C-4FCD-B803-1A0B9A0A6EF7}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
1712-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1713-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.Debug|Any CPU.Build.0 = Debug|Any CPU
1714-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
1715-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.DebugGnome|Any CPU.Build.0 = Debug|Any CPU
1716-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.DebugMac|Any CPU.ActiveCfg = Debug|Any CPU
1717-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.DebugMac|Any CPU.Build.0 = Debug|Any CPU
1718-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.DebugWin32|Any CPU.ActiveCfg = Debug|Any CPU
1719-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.DebugWin32|Any CPU.Build.0 = Debug|Any CPU
1720-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.Release|Any CPU.ActiveCfg = Release|Any CPU
1721-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.Release|Any CPU.Build.0 = Release|Any CPU
1722-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.ReleaseGnome|Any CPU.ActiveCfg = Release|Any CPU
1723-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.ReleaseGnome|Any CPU.Build.0 = Release|Any CPU
1724-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.ReleaseMac|Any CPU.ActiveCfg = Release|Any CPU
1725-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.ReleaseMac|Any CPU.Build.0 = Release|Any CPU
1726-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.ReleaseWin32|Any CPU.ActiveCfg = Release|Any CPU
1727-
{C465A5DC-AD28-49A2-89C0-F81838814A7E}.ReleaseWin32|Any CPU.Build.0 = Release|Any CPU
17281710
{84E22F5F-0562-4B51-8B9A-FD79FF33A8B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17291711
{84E22F5F-0562-4B51-8B9A-FD79FF33A8B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
17301712
{84E22F5F-0562-4B51-8B9A-FD79FF33A8B5}.DebugGnome|Any CPU.ActiveCfg = Debug|Any CPU
@@ -2838,7 +2820,6 @@ Global
28382820
{9E4BA410-8338-42EC-AF9C-422C35ECED81} = {78C10DAE-D3D7-44FC-93DF-831D8D54ECF9}
28392821
{73D4CC8B-BAB9-4A29-841B-F25C6311F067} = {78C10DAE-D3D7-44FC-93DF-831D8D54ECF9}
28402822
{865100E2-A29C-4FCD-B803-1A0B9A0A6EF7} = {78C10DAE-D3D7-44FC-93DF-831D8D54ECF9}
2841-
{C465A5DC-AD28-49A2-89C0-F81838814A7E} = {F12939F1-D55A-4CE9-9F33-8D959BFC7D6C}
28422823
{84E22F5F-0562-4B51-8B9A-FD79FF33A8B5} = {78C10DAE-D3D7-44FC-93DF-831D8D54ECF9}
28432824
{6224D87E-2AC1-4D9F-91ED-714F797297BF} = {DE462010-393D-4655-A42C-2C78BB14D2FA}
28442825
{D2A4E99E-FC2D-45A9-8BE7-1AB7DF95BA2A} = {DE462010-393D-4655-A42C-2C78BB14D2FA}
Lines changed: 0 additions & 1 deletion
This file was deleted.

main/po/po.mdproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,6 @@
9393
<projectName>IKVM.Reflection</projectName>
9494
<isIncluded>False</isIncluded>
9595
</TranslationProjectInformation>
96-
<TranslationProjectInformation>
97-
<projectName>RefactoringEssentials</projectName>
98-
<isIncluded>True</isIncluded>
99-
</TranslationProjectInformation>
10096
</projectInformations>
10197
</projectInformations>
10298
</PropertyGroup>

main/src/addins/MonoDevelop.Refactoring/MonoDevelop.AnalysisCore/MonoDevelopWorkspaceDiagnosticAnalyzerProviderService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ partial class MonoDevelopWorkspaceDiagnosticAnalyzerProviderService : IWorkspace
5151
string [] RuntimeEnabledAssemblies;
5252
public MonoDevelopWorkspaceDiagnosticAnalyzerProviderService ()
5353
{
54-
RefactoringEssentials.NRefactory6Host.GetLocalizedString = GettextCatalog.GetString;
5554
hostDiagnosticAnalyzerInfoTask = Task.Run (() => CreateHostDiagnosticAnalyzerPackages ());
5655
}
5756

main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeActionEditorExtension.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
using MonoDevelop.Ide.Editor;
4848
using MonoDevelop.Ide.Editor.Extension;
4949
using MonoDevelop.Refactoring;
50-
using RefactoringEssentials;
5150
using MonoDevelop.AnalysisCore.Gui;
5251
using MonoDevelop.SourceEditor;
5352
using Gdk;

main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeFixMenuService.cs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
using MonoDevelop.Ide.Composition;
4949
using MonoDevelop.Ide.Editor;
5050
using MonoDevelop.Refactoring;
51-
using RefactoringEssentials;
5251
using MonoDevelop.AnalysisCore;
5352

5453
namespace MonoDevelop.CodeActions
@@ -281,36 +280,6 @@ public ContextActionRunner (Ide.Editor.TextEditor editor, CodeAction act)
281280
public async Task Run ()
282281
{
283282
var token = default (CancellationToken);
284-
if (act is InsertionAction insertionAction) {
285-
var insertion = await insertionAction.CreateInsertion (token).ConfigureAwait (false);
286-
287-
var document = await IdeApp.Workbench.OpenDocument (insertion.Location.SourceTree.FilePath, documentContext.Project);
288-
var parsedDocument = await document.DocumentContext.UpdateParseDocument ();
289-
var model = await document.DocumentContext.AnalysisDocument.GetSemanticModelAsync (token);
290-
if (parsedDocument != null) {
291-
var insertionPoints = InsertionPointService.GetInsertionPoints (
292-
document.Editor,
293-
model,
294-
insertion.Type,
295-
insertion.Location.SourceSpan.Start
296-
);
297-
298-
var options = new InsertionModeOptions (
299-
insertionAction.Title,
300-
insertionPoints,
301-
point => {
302-
if (!point.Success)
303-
return;
304-
var node = Formatter.Format (insertion.Node, document.DocumentContext.RoslynWorkspace, document.DocumentContext.GetOptionSet (), token);
305-
point.InsertionPoint.Insert (document.Editor, document.DocumentContext, node.ToString ());
306-
// document = await Simplifier.ReduceAsync(document.AnalysisDocument, Simplifier.Annotation, cancellationToken: token).ConfigureAwait(false);
307-
}
308-
);
309-
310-
document.Editor.StartInsertionMode (options);
311-
return;
312-
}
313-
}
314283

315284
var oldSolution = documentContext.AnalysisDocument.Project.Solution;
316285
var updatedSolution = oldSolution;

main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeActions/CodeRefactoringService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
using MonoDevelop.Ide.Editor;
3737
using MonoDevelop.CodeIssues;
3838
using Mono.Addins;
39-
using RefactoringEssentials;
4039
using System.Linq;
4140

4241
namespace MonoDevelop.CodeActions

main/src/addins/MonoDevelop.Refactoring/MonoDevelop.CodeIssues/DiagnosticResult.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
using MonoDevelop.AnalysisCore;
2929
using Microsoft.CodeAnalysis.Text;
3030
using Microsoft.CodeAnalysis;
31-
using RefactoringEssentials;
3231
using System.Linq;
3332
using System.Globalization;
3433

@@ -62,8 +61,6 @@ IssueMarker GetIssueMarker ()
6261
{
6362
if (DescriptorHasTag (diagnostic.Descriptor, WellKnownDiagnosticTags.Unnecessary))
6463
return IssueMarker.GrayOut;
65-
if (diagnostic.Descriptor.Category == DiagnosticAnalyzerCategories.RedundanciesInCode || diagnostic.Descriptor.Category == DiagnosticAnalyzerCategories.RedundanciesInDeclarations)
66-
return IssueMarker.GrayOut;
6764
if (diagnostic.Severity == DiagnosticSeverity.Info)
6865
return IssueMarker.DottedLine;
6966
return IssueMarker.WavedLine;

main/src/addins/MonoDevelop.Refactoring/MonoDevelop.Refactoring.Rename/RenameItemDialog.cs

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
using Microsoft.CodeAnalysis.Text;
3737
using Microsoft.CodeAnalysis;
3838
using System.Threading.Tasks;
39-
using RefactoringEssentials;
4039
using System.IO;
4140

4241
namespace MonoDevelop.Refactoring.Rename
@@ -126,7 +125,7 @@ public RenameItemDialog (ISymbol symbol, RenameRefactoring rename)
126125
if (loc.IsInSource) {
127126
if (loc.SourceTree == null ||
128127
!System.IO.File.Exists (loc.SourceTree.FilePath) ||
129-
GeneratedCodeRecognition.IsFileNameForGeneratedCode (loc.SourceTree.FilePath)) {
128+
IsFileNameForGeneratedCode (loc.SourceTree.FilePath)) {
130129
continue;
131130
}
132131
var oldName = System.IO.Path.GetFileNameWithoutExtension (loc.SourceTree.FilePath);
@@ -138,6 +137,39 @@ public RenameItemDialog (ISymbol symbol, RenameRefactoring rename)
138137
}
139138
}
140139

140+
#region From RefactoringEssentials.GeneratedCodeRecognition
141+
142+
static readonly string [] generatedCodeSuffixes = {
143+
"AssemblyInfo",
144+
".designer",
145+
".generated",
146+
".g",
147+
".g.i",
148+
".AssemblyAttributes"
149+
};
150+
151+
static readonly string generatedCodePrefix = "TemporaryGeneratedFile_";
152+
153+
public static bool IsFileNameForGeneratedCode (string fileName)
154+
{
155+
if (fileName.StartsWith (generatedCodePrefix, StringComparison.OrdinalIgnoreCase)) {
156+
return true;
157+
}
158+
159+
string extension = System.IO.Path.GetExtension (fileName);
160+
if (extension != string.Empty) {
161+
fileName = System.IO.Path.GetFileNameWithoutExtension (fileName);
162+
163+
foreach (var suffix in generatedCodeSuffixes) {
164+
if (fileName.EndsWith (suffix, StringComparison.OrdinalIgnoreCase))
165+
return true;
166+
}
167+
}
168+
169+
return false;
170+
}
171+
172+
#endregion
141173

142174
void Init (string title, string currenName, Func<RenameRefactoring.RenameProperties, Task<IList<Change>>> rename)
143175
{

0 commit comments

Comments
 (0)