Skip to content

Keep reference to original items in usage data provider#2989

Merged
koesie10 merged 1 commit intomainfrom
koesie10/usage-panel-tree-items-reference
Oct 18, 2023
Merged

Keep reference to original items in usage data provider#2989
koesie10 merged 1 commit intomainfrom
koesie10/usage-panel-tree-items-reference

Conversation

@koesie10
Copy link
Copy Markdown
Member

This changes the usage data provider tree items to keep a reference to the method and usage instead of only including their properties in the tree item. This makes it easier to find the original method and usage when revealing an item in the tree. It also removes the getParent call in getTreeItem.

The main reason for this fix is to ensure codeQLModelEditor.jumpToMethod gets the correct usage argument. It received the tree item before, but now we can actually pass the usage that was clicked on.

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.
  • [Maintainers only] If this pull request makes user-facing changes that require documentation changes, open a corresponding docs pull request in the github/codeql repo and add the ready-for-doc-review label there.

This changes the usage data provider tree items to keep a reference to
the method and usage instead of only including their properties in the
tree item. This makes it easier to find the original method and usage
when revealing an item in the tree. It also removes the `getParent` call
in `getTreeItem`.

The main reason for this fix is to ensure
`codeQLModelEditor.jumpToMethod` gets the correct `usage` argument.
It received the tree item before, but now we can actually pass the
usage that was clicked on.
@koesie10 koesie10 marked this pull request as ready for review October 17, 2023 14:31
@koesie10 koesie10 requested a review from a team as a code owner October 17, 2023 14:31
Copy link
Copy Markdown
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

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

👍🏼

@koesie10 koesie10 merged commit 903b272 into main Oct 18, 2023
@koesie10 koesie10 deleted the koesie10/usage-panel-tree-items-reference branch October 18, 2023 07:23
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