Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Clean up of EditorFeatures.Cocoa.Snippets#49188

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
davidwengier merged 19 commits intodotnet:masterfromdavidwengier:CocoaSnippets
Nov 6, 2020

Conversation

@davidwengier
Copy link
Member

@davidwengierdavidwengier commentedNov 5, 2020
edited
Loading

Part of#48871

There is alot of code removed here, so commit-by-commit is most definitely recommended, if not required.

This is quite a mechanical set of changes, mostly just fixing compiler errors or warnings. I've commented inline on the potentially controversial bit.


// In Venus/Razor, inserting imports statements into the subject buffer does not work.
// Instead, we add the imports through the contained language host.
if(TryAddImportsToContainedDocument(document,newUsingDirectives.Where(u=>u.Alias==null).Select(u=>u.Name.ToString())))
Copy link
MemberAuthor

@davidwengierdavidwengierNov 5, 2020
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

If you're not looking commit-by-commit this might look odd, butTryAddImportsToContainedDocument used to always throw, therefore the rest of this method was unreachable, therefore this wholeAddImports method never did anything, which then meant theAddReferencesAndImports that called it also never did anything.

I'm guessing there are no snippets that add usings in VS for Mac??

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@Therzok@DavidKarlas@KirillOsenkov Does that make sense? Is this an extension point for VS for Mac? (not that I can see how it worked if it is)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm guessing it was copied from here but we had no impl due to MonoDevelopWorkspace being in MonoDevelop, not platform assemblies:

protectedstaticboolTryAddImportsToContainedDocument(Documentdocument,IEnumerable<string>memberImportsNamespaces)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@davidwengier yes that make sense, no snippet inserts usings so I think its fine to delete this.

Copy link
Contributor

@TherzokTherzok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

Comment on lines 32 to +33
protectedreadonlyIExpansionServiceProviderExpansionServiceProvider;
protectedreadonlyIExpansionManagerexpansionManager;
protectedreadonlyIExpansionManagerExpansionManager;
Copy link
Member

@Youssef1313Youssef1313Nov 5, 2020
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Shouldn't both of these be_camelCase (or am I missing some naming convention rule)?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

If it's protected, we tend to do this style since it's acting more like a property.

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@Youssef1313 I found this surprising too, but these were mechanical changes driver by the Roslyn .editorconfig rules so who am I to argue ¯\_(ツ)_/¯

Looks likeprotected readonly is PascalCase andprotected is camelCase with underscore. It doesn'tnot make sense, I guess, but its a good reminder of why we should all have personal projects we can escape to, with sensible rules :)

Therzok reacted with laugh emoji
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

#nullable disable

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Are we able to do this to the VS layer at the same time, since the annotations are likely the same?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

(I'm actually not sure if we can just unify this file, since it seems like it doesn't have any dependencies and each side inherits it appropriately.)

@davidwengierdavidwengier merged commitfb43def intodotnet:masterNov 6, 2020
@ghostghost added this to theNext milestoneNov 6, 2020
@davidwengierdavidwengier deleted the CocoaSnippets branchNovember 6, 2020 02:52
333fred added a commit to 333fred/roslyn that referenced this pull requestNov 9, 2020
* upstream/master: (519 commits)  Remove workaround in PEMethodSymbol.ExplicitInterfaceImplementations (dotnet#49246)  Enable LSP pull model diagnostic for XAML. (dotnet#49145)  Update dependencies fromhttps://github.com/dotnet/roslyn build 20201109.8 (dotnet#49240)  Add test for with expression in F1 help service (dotnet#49236)  Cache RegexPatternDetector per compilation  Fix RazorRemoteHostClient to maintain binary back-compat  Further tweak inline hints  Fix MemberNames API for records (dotnet#49138)  Minor cleanups (dotnet#49204)  Report warning for assignment or explicit cast of possibly null value of unconstrained type parameter type (dotnet#48803)  Clean up of EditorFeatures.Cocoa.Snippets (dotnet#49188)  Fix OK button state handling. Make relation between viewmodels more tightly coupled  Extend make type abstract to include records (dotnet#48227)  Remove duplicated implementations of C# event hookup  Add select all/deselect all buttons  Consolidate conditional compilation (dotnet#49150)  Implement IEquatable on Microsoft.Cci.DefinitionWithLocation structure (dotnet#49162)  Add new document extensions file  Unify implementations  Only disable structure tagger provider in LSP scenario  ...
@allisonchouallisonchou modified the milestones:Next,16.9.P2Nov 24, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@jasonmalinowskijasonmalinowskijasonmalinowski approved these changes

@KirillOsenkovKirillOsenkovAwaiting requested review from KirillOsenkov

@DavidKarlasDavidKarlasAwaiting requested review from DavidKarlas

+2 more reviewers

@TherzokTherzokTherzok left review comments

@Youssef1313Youssef1313Youssef1313 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

16.9.P2

Development

Successfully merging this pull request may close these issues.

7 participants

@davidwengier@Therzok@jasonmalinowski@DavidKarlas@Youssef1313@allisonchou@Dotnet-GitSync-Bot

[8]ページ先頭

©2009-2025 Movatter.jp