Skip to content
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

Make new SyncNamespace refactoring work with omnisharp-roslyn #1475

Closed
savpek opened this issue Apr 22, 2019 · 2 comments · Fixed by #1563
Closed

Make new SyncNamespace refactoring work with omnisharp-roslyn #1475

savpek opened this issue Apr 22, 2019 · 2 comments · Fixed by #1563

Comments

@savpek
Copy link
Contributor

savpek commented Apr 22, 2019

3.x roslyn introduced sync namespace refactoring dotnet/roslyn#14341

However it doesn't show up in omnisharp-roslyn with current version. Reason behind this is project DefaultNamespace that is null, it should be set up during project creation/updates.

Method to make it is currently internal http://source.roslyn.io/#Microsoft.CodeAnalysis.Workspaces/Workspace/Solution/Solution.cs,e596842b39b5f5f9

Heres proof of concept that after invoking that method via reflection it works as expected
image

Changes required for previous setup savpek@614d2e0

Roslyn issue: dotnet/roslyn#35173

@filipw
Copy link
Member

filipw commented May 2, 2019

I think the better way would be to use the API on ProjectInfo (as soon as ProjectInfo is created, not when the project is added to solution) rather than the one you pointed to, but that one is also internal http://source.roslyn.io/#Microsoft.CodeAnalysis.Workspaces/Workspace/Solution/ProjectInfo.cs,151

@savpek
Copy link
Contributor Author

savpek commented May 5, 2019

I think both are needed:

  • constructor as public for case on initial startup or when new project is added to solution / workspace.
  • workspace update as public to support case where user changes RootNamespace without full restart of omnisharp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants