Skip to content

Commit f009f3e

Browse files
authored
Move IRefactorNotifyService down to features layer (#81749)
Trying to reinstate #81725 without RPS regressions due to an image load
1 parent 49ff7ef commit f009f3e

21 files changed

+69
-10
lines changed

src/EditorFeatures/CSharp/InlineRename/CSharpEditorInlineRenameService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
using Microsoft.CodeAnalysis.GoToDefinition;
1515
using Microsoft.CodeAnalysis.Host.Mef;
1616
using Microsoft.CodeAnalysis.PooledObjects;
17+
using Microsoft.CodeAnalysis.Rename;
1718
using Microsoft.CodeAnalysis.Shared.Extensions;
1819
using Microsoft.CodeAnalysis.Text;
1920
using Roslyn.Utilities;

src/EditorFeatures/Core/RenameTracking/RenameTrackingCodeRefactoringProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using System.Threading.Tasks;
99
using Microsoft.CodeAnalysis.CodeActions;
1010
using Microsoft.CodeAnalysis.CodeRefactorings;
11+
using Microsoft.CodeAnalysis.Rename;
1112
using Microsoft.VisualStudio.Text.Operations;
1213

1314
namespace Microsoft.CodeAnalysis.Editor.Implementation.RenameTracking;

src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
1414
using Microsoft.CodeAnalysis.Notification;
1515
using Microsoft.CodeAnalysis.Options;
16+
using Microsoft.CodeAnalysis.Rename;
1617
using Microsoft.CodeAnalysis.Text;
1718
using Microsoft.VisualStudio.Text.Operations;
1819
using Roslyn.Utilities;

src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.StateMachine.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using Microsoft.CodeAnalysis.Internal.Log;
1818
using Microsoft.CodeAnalysis.LanguageService;
1919
using Microsoft.CodeAnalysis.Options;
20+
using Microsoft.CodeAnalysis.Rename;
2021
using Microsoft.CodeAnalysis.Shared.Extensions;
2122
using Microsoft.CodeAnalysis.Shared.TestHooks;
2223
using Microsoft.CodeAnalysis.Text;

src/EditorFeatures/Core/RenameTracking/RenameTrackingTaggerProvider.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
1414
using Microsoft.CodeAnalysis.ErrorReporting;
1515
using Microsoft.CodeAnalysis.Options;
16+
using Microsoft.CodeAnalysis.Rename;
1617
using Microsoft.CodeAnalysis.Shared.TestHooks;
1718
using Microsoft.CodeAnalysis.Text;
1819
using Microsoft.VisualStudio.Text;

src/EditorFeatures/Core/Shared/Extensions/IRefactorNotifyServiceExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// See the LICENSE file in the project root for more information.
44

55
using System.Collections.Generic;
6+
using Microsoft.CodeAnalysis.Rename;
67

78
namespace Microsoft.CodeAnalysis.Editor.Shared.Extensions;
89

src/EditorFeatures/TestUtilities/RenameTracking/MockRefactorNotifyService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
using System.Collections.Generic;
88
using System.Runtime.InteropServices;
9+
using Microsoft.CodeAnalysis.Rename;
910

1011
namespace Microsoft.CodeAnalysis.Editor.UnitTests.RenameTracking;
1112

src/EditorFeatures/VisualBasic/InlineRename/VisualBasicEditorInlineRenameService.vb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Imports System.Composition
66
Imports Microsoft.CodeAnalysis.Editor.Implementation.InlineRename
77
Imports Microsoft.CodeAnalysis.Host.Mef
8+
Imports Microsoft.CodeAnalysis.Rename
89

910
Namespace Microsoft.CodeAnalysis.Editor.VisualBasic.InlineRename
1011
<ExportLanguageService(GetType(IEditorInlineRenameService), LanguageNames.VisualBasic), [Shared]>

src/EditorFeatures/Core/IRefactorNotifyService.cs renamed to src/Features/Core/Portable/Rename/IRefactorNotifyService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
using System.Collections.Generic;
66

7-
namespace Microsoft.CodeAnalysis.Editor;
7+
namespace Microsoft.CodeAnalysis.Rename;
88

99
/// <summary>
1010
/// Allows editors to listen to refactoring events and take appropriate action. For example,
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
// See the LICENSE file in the project root for more information.
4+
5+
using System.Collections.Generic;
6+
using Microsoft.CodeAnalysis.Rename;
7+
8+
namespace Microsoft.CodeAnalysis.ExternalAccess.Razor;
9+
10+
/// <inheritdoc cref="IRefactorNotifyService" />
11+
internal interface IRazorRefactorNotifyService
12+
{
13+
/// <inheritdoc cref="IRefactorNotifyService.TryOnBeforeGlobalSymbolRenamed" />
14+
bool TryOnBeforeGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure);
15+
16+
/// <inheritdoc cref="IRefactorNotifyService.TryOnAfterGlobalSymbolRenamed" />
17+
bool TryOnAfterGlobalSymbolRenamed(Workspace workspace, IEnumerable<DocumentId> changedDocumentIDs, ISymbol symbol, string newName, bool throwOnFailure);
18+
}

0 commit comments

Comments
 (0)