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

Open editor containing query location in non-preview mode #630

Merged
merged 1 commit into from
Nov 5, 2020

Conversation

aeisenberg
Copy link
Contributor

@aeisenberg aeisenberg commented Oct 20, 2020

Adds a new config option to control this behavior. If this behavior is
generally desirable, we will remove the option and avoid using preview
editors for all users.

Not going with a config setting as I don't feel like we should be cluttering up the settings page.

This change partially mitigates the limitations with how vscode handles editors backed by custom uri providers.

See #500 (comment) for an explanation of what this does and why we should do it.

Checklist

  • CHANGELOG.md has been updated to incorporate all user visible changes made by this pull request.
  • Issues have been created for any UI or other user-facing changes made by this pull request.
  • [n/a] @github/docs-content-dsp has been cc'd in all issues for UI or other user-facing changes made by this pull request.

@aeisenberg aeisenberg force-pushed the aeisenberg/non-preview-editor branch from 1f5334d to cb30009 Compare October 20, 2020 21:30
@aeisenberg aeisenberg requested review from p0 and adityasharad October 20, 2020 21:30
@aeisenberg aeisenberg added the Complexity: Low A good task for newcomers to learn, or experienced team members to complete quickly. label Oct 23, 2020
@aeisenberg aeisenberg force-pushed the aeisenberg/non-preview-editor branch from cb30009 to 5a3142a Compare November 4, 2020 15:18
@@ -21,6 +22,7 @@
- Add a `View DIL` command on query history items. This opens a text editor containing the Datalog Intermediary Language representation of the compiled query.
- Remove feature flag for the AST Viewer. For more information on how to use the AST Viewer, [see the documentation](https://help.semmle.com/codeql/codeql-for-vscode/procedures/exploring-the-structure-of-your-source-code.html).
- The `codeQL.runningTests.numberOfThreads` setting is now used correctly when running tests.
- Add the `codeQL.ui.openInPreviewEditor` config option. This option allows users to open query results in non-preview editors (by un-checking this option). Doing so will make navigation between results files easier, but may also contribute to a proliferation of open editors.
Copy link
Contributor

Choose a reason for hiding this comment

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

No longer necessary now you're making it unconditional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep. Let me delete

@@ -110,6 +110,11 @@
"type": "object",
"title": "CodeQL",
"properties": {
"codeQL.ui.openInPreviewEditor": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly, no longer necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same

: await Window.showTextDocument(doc, ViewColumn.One);
: await Window.showTextDocument(
doc, {
preview: true,
Copy link
Contributor

Choose a reason for hiding this comment

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

preview: false? Also maybe comment here about why.

@aeisenberg aeisenberg force-pushed the aeisenberg/non-preview-editor branch from e79d68e to b77b676 Compare November 4, 2020 22:54
Copy link
Contributor

@adityasharad adityasharad left a comment

Choose a reason for hiding this comment

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

Changelog conflicts because of your speed of releases :) Otherwise looks good.

@aeisenberg aeisenberg force-pushed the aeisenberg/non-preview-editor branch from b77b676 to f82a2ce Compare November 5, 2020 18:32
@aeisenberg aeisenberg merged commit 32db9cd into github:main Nov 5, 2020
@aeisenberg aeisenberg deleted the aeisenberg/non-preview-editor branch November 24, 2020 22:30
@bet4it
Copy link

bet4it commented Mar 14, 2022

Could you provide this with an option? I think this option is really useful for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Low A good task for newcomers to learn, or experienced team members to complete quickly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants