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

Add ability to select a document's project context #7328

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JoeRobich
Copy link
Member

@JoeRobich JoeRobich commented Jul 10, 2024

This PR builds on #7321 and adds the ability to select a document's project context.

  • Adds select project context command
  • Adds the select command to the Project Context status item
  • Updates middleware to send selected context with server requests.
Select.Project.Context.mp4

TODO:

  • Properly refresh the active document's semantic tokens, code lens, etc... when the project context is changed.

@@ -161,8 +161,12 @@
"Fix All: ": "Fix All: ",
"C# Workspace Status": "C# Workspace Status",
"Open solution": "Open solution",
"Select context": "Select context",
"C# Project Context Status": "C# Project Context Status",
"Active File Context": "Active File Context",
Copy link
Member

Choose a reason for hiding this comment

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

Wondering - could we merge this into the select button?
e.g.
ProjectA (net6.0) Change Active File Context

or maybe we could even put the document name in it?
ProjectA (net6.0) Change Program.cs Context

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, although the select command is only visible when there are multiple project contexts. Would it be jarring for the text to move from the item details to the command and back again as you navigate?

Copy link
Member

Choose a reason for hiding this comment

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

ah hmm. I wonder if we should just always show the button even if there's only one. Not sure

@JoeRobich JoeRobich force-pushed the dev/jorobich/select-project-context branch 2 times, most recently from 6ca46de to 44b576a Compare July 11, 2024 07:24
- Adds select project context commands
- Adds the select command to the Project Context status item
- Updates middleware to send selected context with server requests.
@JoeRobich JoeRobich force-pushed the dev/jorobich/select-project-context branch from 44b576a to ee62554 Compare December 11, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants