Commit Graph

5259 Commits

Author SHA1 Message Date
Koen Vlaswinkel
79ea901a52 Send message to model editor view on revealing method
This will call a method on the correct model editor view when the user
clicks on "Review in editor". This does not yet do anything to the view;
this will be added in a follow-up commit.
2023-10-03 09:48:59 +02:00
Koen Vlaswinkel
2872a2dcaf Add model editor view tracker
This is used for registering which model editor views are currently
active. This will be used to determine which view to send the "reveal
method" command to. It can also be used in the future to limit the
number of instances of the model editor that can be opened for a
database.

This uses the same pattern as variant analyses with a separate interface
for the view to avoid having circular dependencies.
2023-10-03 09:48:17 +02:00
Koen Vlaswinkel
8b8bacb718 Add button for reveal method in editor 2023-10-03 09:47:52 +02:00
Koen Vlaswinkel
83e38c811f Update CHANGELOG 2023-10-03 09:36:59 +02:00
Koen Vlaswinkel
8107bf7cb1 Merge remote-tracking branch 'origin/main' into robertbrignull/upgrade_msw 2023-10-03 09:36:03 +02:00
Andrew Eisenberg
625b3a5c37 Merge branch 'main' into aeisenberg/multi-token 2023-10-02 20:07:31 -07:00
Andrew Eisenberg
0fa3cf5d8e Use EventEmitter in MultiCancellationToken 2023-10-02 10:21:17 -07:00
Charis Kyriakou
558b9329c5 Extract base functionality for WebviewViewProviders into an abstract class (#2895) 2023-10-02 16:31:52 +01:00
Koen Vlaswinkel
e15b7681db Bump @types/vscode to 1.82.0 2023-10-02 11:14:42 +02:00
Koen Vlaswinkel
6539417d2d Fix recording of binary response bodies 2023-10-02 11:13:18 +02:00
Koen Vlaswinkel
095d56ee37 Fix typo in BasicErrorResponse 2023-10-02 11:02:44 +02:00
Koen Vlaswinkel
7578697e92 Fix response bodies when recording 2023-10-02 11:02:20 +02:00
Anders Starcke Henriksen
6e06e7934b Merge pull request #2889 from github/starcke/lang-context-queries
Apply language context to queries panel
2023-10-02 10:27:00 +02:00
Charis Kyriakou
58249e3efe Dispose event subscriptions in method modeling view (#2882) 2023-10-02 08:57:33 +01:00
Andrew Eisenberg
04dfc4e647 Move location of multi-cancellation-token
This avoids a code-scanning warning.
2023-09-29 08:31:20 -07:00
Andrew Eisenberg
3ba1712be0 Update Changelog 2023-09-29 08:30:51 -07:00
Andrew Eisenberg
e8f68c1b5f Adds MultiCancellationToken
This is a cancellation token that cancels when any of its constituent
cancellation tokens are cancelled.

This token is used to fix a bug in Find Definitions. Previously, when
clicking `CTRL` (or `CMD` on macs) inside a source file in an archive
and hovering over a token, this will automatically invoke the
definitions finder (in preparation for navigating to the definition).
The only way to cancel is to move down to the message popup and click
cancel there.

However, this is a bug. What _should_ happen is that if a user moves
their mouse away from the token, the operation should cancel.

The underlying problem is that the extension was only listening to the
cancellation token from inside `getLocationsForUriString` the
cancellation token used by the Language Server protocol to cancel
operations in flight was being ignored.

This fix will ensure we are listening to _both_ cancellation tokens
and cancel the query if either are cancelled.
2023-09-29 08:28:35 -07:00
Andrew Eisenberg
a9edb36242 Merge branch 'main' into aeisenberg/avoid-double-restart 2023-09-29 08:26:53 -07:00
Koen Vlaswinkel
40b79f2e61 Improve scenario recording 2023-09-29 14:34:12 +02:00
Charis Kyriakou
3489c26ef6 Styling updates to method modeling panel (#2888) 2023-09-29 13:02:29 +01:00
github-actions[bot]
213a03555a Bump version to v1.9.2 2023-09-29 10:27:33 +00:00
Anders Starcke Henriksen
c4fe868826 Add a way to show language for qury history. 2023-09-29 12:15:55 +02:00
Koen Vlaswinkel
4cf67ef799 Fix disposing in ResultsView 2023-09-29 12:00:26 +02:00
Anders Starcke Henriksen
c43d0fa805 Add language to local queries. 2023-09-29 11:54:45 +02:00
Koen Vlaswinkel
0a27c0538d Dispose tracked objects when panel is disposed
This will change the `AbstractWebview` to dispose its tracked objects
(using `this.push`) when the panel is disposed rather than when the
view is disposed. This makes `this.push` actually useful in a view.
Before, the objects would only get disposed when the extension itself
was disposed.
2023-09-29 11:34:59 +02:00
Anders Starcke Henriksen
169a425e0b Update and add tests. 2023-09-29 11:07:06 +02:00
Koen Vlaswinkel
f249b36660 v1.9.1 2023-09-29 10:05:43 +02:00
Anders Starcke Henriksen
1e6b7a6619 Add support for filtering queries panel. 2023-09-29 09:28:44 +02:00
Anders Starcke Henriksen
552a4f6eb3 Merge pull request #2873 from github/starcke/language-context-store
Add language context store.
2023-09-29 09:24:31 +02:00
Andrew Eisenberg
2b17979b6c Update changelog 2023-09-28 14:29:40 -07:00
Andrew Eisenberg
3999ae3728 Avoid double restarts of the query server
Previously, if there was an explicit restart of the query server (eg-
by changing a configuration setting), then the query server process
would be started twice: once by the `close` handler and once by the
restart command.

By adding the `removeAllListeners` to the dispose method, we ensure that
when the query server shuts down gracefully, there won't be a `close`
listener that is going to restart it a second time if there is a
different way of restarting it.
2023-09-28 14:25:35 -07:00
Shati Patel
493e8d915e Hide the language filter behind an extra flag (#2881) 2023-09-28 14:47:25 +00:00
Anders Starcke Henriksen
dc632d5c3d Change to use QueryLanguage | undefined. 2023-09-28 16:43:33 +02:00
Koen Vlaswinkel
ae2d6ce16e Upgrade Node version to 18.15.0 2023-09-28 16:38:54 +02:00
Charis Kyriakou
27a7474f2b Add modeling indicator to method usages panel (#2876) 2023-09-28 15:33:46 +01:00
Koen Vlaswinkel
8b1c52886a Fix typing error for Octokit 2023-09-28 16:09:16 +02:00
Koen Vlaswinkel
f9ddb4080c Switch to stable VS Code version for tests 2023-09-28 16:07:34 +02:00
Koen Vlaswinkel
3afa15a0ce Remove redundant query params 2023-09-28 16:07:05 +02:00
Koen Vlaswinkel
f22714777c Use AppOctokit in tests 2023-09-28 16:06:34 +02:00
Koen Vlaswinkel
469f65a392 Merge pull request #2854 from github/koesie10/bump-min-version
Bump minimum VS Code version to 1.82
2023-09-28 16:04:57 +02:00
Koen Vlaswinkel
9b10a09727 Fix MSW JSON responses 2023-09-28 14:32:33 +02:00
Koen Vlaswinkel
3c10e87529 Switch Octokit to use node-fetch
It seems like Node's native `fetch` implementation isn't quite working
right with Octokit and MSW. This switches to using `node-fetch` like
we're already doing for all other requests (e.g. downloading databases).
2023-09-28 14:32:32 +02:00
Koen Vlaswinkel
a1ea1f8135 Upgrade Octokit and MSW 2023-09-28 14:32:16 +02:00
Robert
ffc90a0c30 Remove startServer method as it now does nothing 2023-09-28 14:32:15 +02:00
Robert
e34f4ed485 Only start server when loading a scenario 2023-09-28 14:32:15 +02:00
Robert
7c1b6e2ff6 Use new types 2023-09-28 14:32:15 +02:00
Robert
e719df711a Upgrade msw to the @next tag 2023-09-28 14:32:15 +02:00
Anders Starcke Henriksen
6accba66fe Rename state to languageFilter. 2023-09-28 14:28:31 +02:00
Anders Starcke Henriksen
a657df4468 Move context manipulation into store and fix initial state. 2023-09-28 14:19:07 +02:00
Koen Vlaswinkel
6aab4b4090 Merge pull request #2875 from github/koesie10/update-csharp-query
Update model editor C# query to return method parameters with parentheses
2023-09-28 14:10:50 +02:00