-
Notifications
You must be signed in to change notification settings - Fork 419
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1495 from filipw/feature/rename-options
Added support for Roslyn rename options
- Loading branch information
Showing
9 changed files
with
184 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/OmniSharp.Roslyn.CSharp/Services/RenameWorkspaceOptionsProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using System.Composition; | ||
using Microsoft.CodeAnalysis.Options; | ||
using OmniSharp.Options; | ||
using OmniSharp.Roslyn.Options; | ||
using RoslynRenameOptions = Microsoft.CodeAnalysis.Rename.RenameOptions; | ||
|
||
namespace OmniSharp.Roslyn.CSharp.Services | ||
{ | ||
[Export(typeof(IWorkspaceOptionsProvider)), Shared] | ||
public class RenameWorkspaceOptionsProvider : IWorkspaceOptionsProvider | ||
{ | ||
public OptionSet Process(OptionSet currentOptionSet, OmniSharpOptions omniSharpOptions) => | ||
currentOptionSet | ||
.WithChangedOption(RoslynRenameOptions.RenameInComments, omniSharpOptions.RenameOptions.RenameInComments) | ||
.WithChangedOption(RoslynRenameOptions.RenameInStrings, omniSharpOptions.RenameOptions.RenameInStrings) | ||
.WithChangedOption(RoslynRenameOptions.RenameOverloads, omniSharpOptions.RenameOptions.RenameOverloads); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace OmniSharp.Options | ||
{ | ||
public class RenameOptions | ||
{ | ||
public bool RenameOverloads { get; set; } = false; | ||
public bool RenameInStrings { get; set; } = false; | ||
public bool RenameInComments { get; set; } = false; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters