github / vscode-codeql

An extension for Visual Studio Code that adds rich language support for CodeQL

Home Page:https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-codeql

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CodeQL model editor: Support adding additional flows to already modeled methods

Marcono1234 opened this issue · comments

Is your feature request related to a problem? Please describe.
When a method is already modeled, the entry shows only "Method already modeled" and there is no way to add additional flows.
This means:

  • you can't see the details of the existing model (type, input, output, kind)
  • you can't add additional flows because there is no "+" button

Describe the solution you'd like
The "+" button should also be shown for already modeled methods.

Side notes:

  • It might also be nice if instead of "Method already modeled", it would show how the method is modeled (type, input, output, kind) to notice issues or missing flow. Possibly also with multiple lines if there are multiple flows.
    But the dropdowns and the delete button should be disabled for these existing flows.
  • When "Hide modeled methods" is unselected, it might be useful to show the modeled methods intermixed with the un-modeled methods.
    Currently they are all shown as one group at the end of that API section, so you have to jump back and forth to see if / how the methods of a class are modeled in case some are already modeled and some are not.
    (Some users might prefer the existing grouping though?)

Describe alternatives you've considered
none

Thanks for the feedback @Marcono1234.

It might also be nice if instead of "Method already modeled", it would show how the method is modeled (type, input, output, kind) to notice issues or missing flow. Possibly also with multiple lines if there are multiple flows.
But the dropdowns and the delete button should be disabled for these existing flows.

I agree that this would be a good change that we already have on our minds. Hopefully we'll be able to make some progress soon!

When "Hide modeled methods" is unselected, it might be useful to show the modeled methods intermixed with the un-modeled methods.
Currently they are all shown as one group at the end of that API section, so you have to jump back and forth to see if / how the methods of a class are modeled in case some are already modeled and some are not.
(Some users might prefer the existing grouping though?)

Interesting idea. You're right that some users do prefer to focus on unmodeled methods and prefer to have the 'Already modeled methods' in a separate section. But having more flexibility in the UI the change the group might also be useful.

The "+" button should also be shown for already modeled methods.

We'll discuss this as a team too. There are some reasons why adding additional flows for methods that are already modeled in a pack that is currently not in the editor's scope may be confusing -- I'll get back to you on this one 🙂