-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove usages of #if CODE_STYLE
where possible.
#74958
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
b26088a
in progress
CyrusNajmabadi 1f21f90
in progress
CyrusNajmabadi ca4f838
fix
CyrusNajmabadi f126e91
Move more
CyrusNajmabadi e21071f
in progress
CyrusNajmabadi 80882c1
Fix layering
CyrusNajmabadi 0ee9423
Fixes
CyrusNajmabadi de44b14
Tests
CyrusNajmabadi 0304ab1
Tests
CyrusNajmabadi 3de525a
More tests
CyrusNajmabadi 5549b10
More tests
CyrusNajmabadi d385a5f
More tests
CyrusNajmabadi 7a4dacb
More tests
CyrusNajmabadi e9a4f91
Fix tests
CyrusNajmabadi c5d6d27
building
CyrusNajmabadi efe946f
share code
CyrusNajmabadi 02b9a11
Remoive
CyrusNajmabadi 8f1bbea
Remoive
CyrusNajmabadi 743d0ce
Remoive
CyrusNajmabadi 20e8927
Remoive
CyrusNajmabadi 2dee181
Remoive
CyrusNajmabadi 8f32abb
Remoive
CyrusNajmabadi 080e217
Remoive
CyrusNajmabadi cd81fe7
Update src/Workspaces/SharedUtilitiesAndExtensions/Workspace/Core/Wor…
CyrusNajmabadi 6e25f38
ublblock
CyrusNajmabadi 8e763eb
Fix
CyrusNajmabadi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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
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
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 |
---|---|---|
|
@@ -2,30 +2,14 @@ | |
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
using System.Runtime.Serialization; | ||
using System.Threading; | ||
using System.Threading.Tasks; | ||
using Microsoft.CodeAnalysis.AddImport; | ||
using Microsoft.CodeAnalysis.Editing; | ||
using Microsoft.CodeAnalysis.Formatting; | ||
using Microsoft.CodeAnalysis.Options; | ||
|
||
namespace Microsoft.CodeAnalysis.OrganizeImports; | ||
|
||
[DataContract] | ||
internal readonly record struct OrganizeImportsOptions | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. options type moved to tis own file in the CodeStyle layer. The 'Providers' types move to the CodeFixes layer. This removes the need for CODE_STYLE checks, and properly layers things. |
||
{ | ||
[DataMember] public bool PlaceSystemNamespaceFirst { get; init; } = AddImportPlacementOptions.Default.PlaceSystemNamespaceFirst; | ||
[DataMember] public bool SeparateImportDirectiveGroups { get; init; } = SyntaxFormattingOptions.CommonDefaults.SeparateImportDirectiveGroups; | ||
[DataMember] public string NewLine { get; init; } = LineFormattingOptions.Default.NewLine; | ||
|
||
public OrganizeImportsOptions() | ||
{ | ||
} | ||
|
||
public static readonly OrganizeImportsOptions Default = new(); | ||
} | ||
|
||
internal static class OrganizeImportsOptionsProviders | ||
{ | ||
public static OrganizeImportsOptions GetOrganizeImportsOptions(this IOptionsReader options, string language) | ||
|
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the call to GetExtendedLanguageServices already defers to GetRequiredLanguageService if not in the code-style layer. so we can simplify all of this.