Commit Graph

6579 Commits

Author SHA1 Message Date
Koen Vlaswinkel
d24352be0a Merge pull request #3034 from github/koesie10/remove-extlogger-model-editor
Remove `extLogger` imports from model editor
2023-10-31 12:55:49 +01:00
Koen Vlaswinkel
50ae7d5b73 Fix scroll into view not working when revealing method
This fixes a bug where the method row would not scroll into view when
revealing a method. The problem was that the `DataGridRow` component
on which the `ref` was set is a `display: contents` element, which
does not have a visual representation in the DOM. Therefore, it wasn't
possible to scroll the method row into view. This fixes it by moving
the ref to the `DataGridCell` component of the first column, which is
a normal element.
2023-10-31 11:54:26 +01:00
Koen Vlaswinkel
8e4da4a20e Remove extLogger imports from model editor
We shouldn't be directly using the `extLogger` if we have access to the
app logger (either directly or by passing it in as a parameter). This
removes all imports of `extLogger` from the model editor directory.
2023-10-31 11:32:29 +01:00
Koen Vlaswinkel
2dbc50e009 Remove use of extLogger from generate model queries 2023-10-31 11:04:17 +01:00
Koen Vlaswinkel
5c2050d9bb Extract addModeledMethodsFromArray method 2023-10-31 10:31:54 +01:00
Koen Vlaswinkel
bb104b53ba Rename showFlowGeneration to showGenerateButton 2023-10-31 10:31:54 +01:00
Koen Vlaswinkel
474ec197a0 Add generation of Ruby models
This adds the ability to generate Ruby models from a database. It uses
the `GenerateModel.ql` query to do this. The query will essentially
return data in the data extensions format, so this will just parse it
and return it as `ModeledMethod` objects.
2023-10-31 10:23:36 +01:00
Shati Patel
135bce889e Minor fixes to testing.md (#3032) 2023-10-30 16:15:39 +00:00
Koen Vlaswinkel
b1aa5914c2 Merge pull request #3017 from hmac/hmac-model-editor-ruby
Add experimental model editor support for Ruby
2023-10-30 16:36:15 +01:00
Koen Vlaswinkel
80ae27a453 Extract isSupportedLanguage function 2023-10-30 16:08:00 +01:00
Koen Vlaswinkel
ba1bdacb50 Use INITIAL_MODE instead of hardcoding mode 2023-10-30 15:58:20 +01:00
Koen Vlaswinkel
98b0850f68 Switch ModeledMethod to union of types
This allows more disjointed models to be represented more accurately,
such as type models.
2023-10-30 14:26:47 +01:00
Koen Vlaswinkel
c482f2a058 Merge pull request #3025 from github/dependabot/npm_and_yarn/extensions/ql-vscode/msw-2.0.0
Bump msw from 0.0.0-fetch.rc-9 to 2.0.0 in /extensions/ql-vscode
2023-10-30 13:07:56 +01:00
Koen Vlaswinkel
f0efebbbc4 Merge pull request #3026 from github/koesie10/ask-for-display-language
Use language display name when asking for language
2023-10-30 11:58:57 +01:00
Koen Vlaswinkel
5e0caded52 Merge pull request #3016 from github/koesie10/improve-skeleton-db-download
Improve database download prompt when creating query
2023-10-30 11:58:01 +01:00
Koen Vlaswinkel
0951dde2c4 Implement changes for MSW 2.0.0 2023-10-30 11:28:51 +01:00
Nora
33992129ed Merge pull request #3029 from github/nora/progress-reporting-code-search
Code Search: use withProgress to indicate api request progress
2023-10-27 17:09:57 +02:00
Nora
5caf11e7b7 Polish naming 2023-10-27 14:51:16 +00:00
Koen Vlaswinkel
43e60b20db Merge pull request #3030 from github/koesie10/fix-data-flow-paths-dropdown
Fix data flow path dropdown not updating
2023-10-27 16:48:02 +02:00
Koen Vlaswinkel
c77a57f383 Store available modes per language 2023-10-27 15:50:46 +02:00
Koen Vlaswinkel
92ad718df1 Fix data flow path dropdown not updating 2023-10-27 14:40:19 +02:00
Nora
5c3c8ffa1b use withProgress 2023-10-27 12:28:47 +00:00
Koen Vlaswinkel
712b55768f Hide "Model as application" button for Ruby 2023-10-27 12:42:09 +02:00
Koen Vlaswinkel
8c7273efc6 Add Ruby queries as included queries for model editor
This adds the current version of the queries for Ruby to the model
editor included queries. This makes it work without needing to check out
a separate branch of the CodeQL repository/submodule. I've removed most
commented out code from the queries, but the other parts should match.
2023-10-27 12:39:59 +02:00
Koen Vlaswinkel
dde417ea7d Start model editor in framework mode for Ruby 2023-10-27 12:38:13 +02:00
Koen Vlaswinkel
b023431626 Add feature flag for Ruby in the model editor
This only makes Ruby available in the model editor when the following
is set in the settings.json (workspace or user) file:

```json5
{
  "codeQL.model.enableRuby": true,
}
```
2023-10-27 12:37:14 +02:00
Harry Maclean
9c5a963495 Add experimental model editor support for Ruby
Make the minimum changes necessary for prototype Ruby support in the
model editor.

This consists of:

- Reading/writing modelled methods from/to data extensions in the
  dynamic languages format
- Special-casing Ruby in a few places where Java/C# was previously
  assumed.
2023-10-27 12:36:22 +02:00
Koen Vlaswinkel
a3735c21a1 Use language display name for downloading databases 2023-10-27 12:32:34 +02:00
Koen Vlaswinkel
5ca084be91 Use language display name when asking for language 2023-10-27 12:08:46 +02:00
Koen Vlaswinkel
f4a2d8572c Merge pull request #3028 from github/koesie10/bqrs-decode-languages
Use MaD definition when decoding BQRS
2023-10-27 11:58:48 +02:00
Koen Vlaswinkel
ecb2503992 Use MaD definition when decoding BQRS
This will use the MaD's definition of a method signature when decoding
BQRS files. This will allow us to change the method signature definition
for dynamic languages.
2023-10-27 11:39:46 +02:00
Koen Vlaswinkel
b9fa79a76e Move predicates into a separate property 2023-10-27 11:29:29 +02:00
Koen Vlaswinkel
14c6f98289 Merge pull request #3027 from github/koesie10/flow-generation-button
Only show flow generation button when supported
2023-10-27 11:12:32 +02:00
Koen Vlaswinkel
05e3f2cba6 Only show flow generation button when supported 2023-10-27 10:46:54 +02:00
Koen Vlaswinkel
1404ab45fb Merge pull request #3020 from github/koesie10/refactor-predicates
Refactor model editor predicates
2023-10-27 10:39:52 +02:00
Koen Vlaswinkel
fa12671f4a Merge remote-tracking branch 'origin/main' into koesie10/improve-skeleton-db-download 2023-10-27 10:22:31 +02:00
Koen Vlaswinkel
a8404a5b01 Throw from getModelsAsDataLanguage 2023-10-27 10:18:38 +02:00
Koen Vlaswinkel
8a87db6cb4 Use URI for open file link 2023-10-27 10:15:58 +02:00
Koen Vlaswinkel
1151432ca2 Use language display name in notifications 2023-10-27 10:07:22 +02:00
Koen Vlaswinkel
42f1e81fdc Handle errors when downloading database 2023-10-27 10:04:37 +02:00
Koen Vlaswinkel
edbc65886d Use tryGetQueryLanguage function 2023-10-27 09:50:08 +02:00
Koen Vlaswinkel
407825e1cf Merge pull request #3021 from github/koesie10/external-api-to-model-editor
Rename external API methods/files/errors to model editor
2023-10-27 09:37:49 +02:00
dependabot[bot]
325cc05f36 Bump actions/setup-node from 3 to 4 (#3024)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 11:02:49 -07:00
dependabot[bot]
721d971a66 Bump msw from 0.0.0-fetch.rc-9 to 2.0.0 in /extensions/ql-vscode
Bumps [msw](https://github.com/mswjs/msw) from 0.0.0-fetch.rc-9 to 2.0.0.
- [Release notes](https://github.com/mswjs/msw/releases)
- [Changelog](https://github.com/mswjs/msw/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mswjs/msw/compare/v0.0.0-fetch.rc-9...v2.0.0)

---
updated-dependencies:
- dependency-name: msw
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-26 13:28:50 +00:00
github-actions[bot]
cc8bcbbc5d Bump version to v1.9.4 (#3023)
Co-authored-by: github-actions[bot] <github-actions@github.com>
2023-10-26 11:20:22 +00:00
Charis Kyriakou
5375fcb26a v1.9.3 (#3022)
Some checks failed
Release / Release (push) Has been cancelled
Release / Publish to VS Code Marketplace (push) Has been cancelled
Release / Publish to Open VSX Registry (push) Has been cancelled
v1.9.3
2023-10-26 11:11:17 +01:00
Koen Vlaswinkel
f5d86777ae Update synthetic query pack name 2023-10-26 11:57:50 +02:00
Koen Vlaswinkel
ff36088ecc Merge pull request #3012 from github/koesie10/use-selected-queries-item
Create new queries in selected folder of queries panel
2023-10-26 11:55:42 +02:00
Koen Vlaswinkel
b19e970ec5 Fix error message when running model editor queries 2023-10-26 11:43:05 +02:00
Koen Vlaswinkel
f379036c18 Fix error message for bundled model editor queries 2023-10-26 11:42:41 +02:00