Commit Graph

199 Commits

Author SHA1 Message Date
Matt Bierner
0a0d3d5e45 Add code action trigger to proposed API
#50248
2018-05-21 16:19:10 -07:00
Matt Bierner
2cfe96f451 Use member shorthand for more adapters 2018-05-21 11:54:30 -07:00
Johannes Rieken
49323b3798 explore Hierarchy<T> idea, #34968 2018-05-17 10:40:08 +02:00
Johannes Rieken
e538ec0945 synthesize a hierarchy based on range containment 2018-05-15 18:12:00 +02:00
Johannes Rieken
2a270de217 add extensionId to DocumentSymbolProvider interface 2018-05-14 14:27:26 +02:00
Matt Bierner
49170e54b1 API allowing CodeActionProviders to reliably get the current editor selection (#49081)
Fixes #49024
Fixes #49060

See #49024 for details on the problem. Makes code action providers take a range | selection. Always pass the selection if one is available.
2018-05-10 15:09:26 -07:00
Johannes Rieken
681a9e0d54 more tweaks #34968 2018-05-07 10:03:31 +02:00
Johannes Rieken
4e46d2a1bb type converters, use namespace for DocumentHighlight 2018-05-04 18:49:40 +02:00
Johannes Rieken
781520cbe1 type converters, use namespace for Hover 2018-05-04 18:49:40 +02:00
Johannes Rieken
d52bf577dc type converters, use namespace for Diagnostics 2018-05-04 18:49:40 +02:00
Johannes Rieken
9f6053242f type converters, use namespace for Position 2018-05-04 18:49:39 +02:00
Johannes Rieken
dfb070c277 type converter, use namespace for Range 2018-05-04 18:49:39 +02:00
Johannes Rieken
6b4f88991b experiment with internal hierarchical model, #34968 2018-05-04 18:49:39 +02:00
Johannes Rieken
fa0a49bbf2 add exclusivness to document filter 2018-05-03 11:38:15 +02:00
Matt Bierner
83d4bb6b53 Use property shorthand for CodeActionAdapter 2018-05-02 14:06:45 -07:00
Johannes Rieken
6f4d130ae5 rename it to prepareRename, #48700 2018-04-26 18:04:10 +02:00
Matt Bierner
1e7095ee31 Make sure we rehydrate uri in resolve rename location
Fixes #48592
2018-04-24 17:10:45 -07:00
Johannes Rieken
e56acedabe allow resolve for all, not just for proposed-api-users, #7340 2018-04-24 08:55:44 +02:00
Johannes Rieken
73f64b9312 first cut of _proposed_ api for hierarchy of document symbols, #34968 2018-04-23 12:59:40 +02:00
Martin Aeschlimann
45e859bfdc monaco folding api (for #47808) 2018-04-18 17:48:26 +02:00
Martin Aeschlimann
a1bb202eb6 incorperate folding api feedback 2018-04-18 15:26:43 +02:00
Alex Dima
101c8ed9e3 Add scheme transformer 2018-04-18 12:13:27 +02:00
Johannes Rieken
6428c00286 move api to stable, #7340 2018-04-17 11:54:45 +02:00
Johannes Rieken
8c1e3a7b3c allow to return range or range and placeholder, #7340 2018-04-17 11:40:25 +02:00
Matt Bierner
5ff2ccfc28 CodeActionProvider.providedKinds (#47702)
Adds a new optional  `CodeActionProviderMetadata`.  This is passed in`registerCodeActionProvider` and contains a list of`CodeActionKinds` that the provider may return. The list is used for deciding when to show the `refactor` and `source action` context menus. It is not used for filtering the returned code actions

Possibly helps address #45383
2018-04-12 11:50:21 -07:00
Martin Aeschlimann
84318e5892 There should be an API command to execute the color provider like we have for code complete and others. Fixes #45867 2018-03-26 23:30:36 +02:00
Johannes Rieken
addd44d6b8 simplified resolve rename location proposal, #7340 2018-03-26 12:45:40 +02:00
Johannes Rieken
a116e73a94 more renames, #7340 2018-03-19 16:33:43 +01:00
Alex Dima
1a249fc4ec Serialize vscode.DocumentSelector 2018-03-19 12:07:08 +01:00
Johannes Rieken
8d022273dd add DiagnosticRelatedInformation, #10271 2018-03-15 11:43:31 +01:00
Martin Aeschlimann
c65b881d16 [folding] add maxRanges to folding provider request 2018-03-13 17:49:09 +01:00
Johannes Rieken
362485e390 some early sketches of a read api #30075 2018-03-13 15:52:08 +01:00
Johannes Rieken
e9d92ca9a7 align names, add RenameContext-type #7340 2018-03-13 11:59:32 +01:00
Johannes Rieken
e5be4d8f7d more strict type conversion #7340 2018-03-02 17:28:16 +01:00
Johannes Rieken
78a2f08d69 rename to RenameInformation, #7340 2018-03-02 17:28:16 +01:00
Martin Aeschlimann
0faa5d117c folding provider: first version 2018-02-22 14:13:22 +01:00
Matt Bierner
9c323a6142 Format extHostLanguageFeatures.ts 2018-02-08 15:06:56 -08:00
Matt Bierner
308c1887df Update extensions for TS 2.7
Update src to build with TS 2.7

Explicitly assign this.message in the else body
2018-02-08 14:28:55 -08:00
Johannes Rieken
609bcbf2b4 make resolveInitialRenameValue be proposed api 2018-01-26 18:02:27 +01:00
Johannes Rieken
403d5d410a Merge branch 'master' into resolveInitialRenameValue 2018-01-26 17:08:21 +01:00
Johannes Rieken
0f2cc682a0 Merge branch 'master' into rename-workspaceedit-proto 2018-01-23 17:19:06 +01:00
Matt Bierner
eccf728e64 CodeActionScope (#41782)
* Add CodeActionScope

* Replace matches with contains, try using in ts extension

* Move filtering to getCodeActions

* Basic test

* Docs

* Fix tests

* Hooking up requested scope

* Add basic test for requestedScope

* Added auto apply logic

* Gate refactor provider to only compute refactorings when requested

* Making suggested renames

* Clean up code action trigger impl to use single Trrigger info object

* Rename codeActionScope file and internal CodeActionScope class

* Add quick fix base type

* Make keybinding API more similar to insertSnippet

Take args as an object instead of as an array of values

* Clean up docs

* scope -> kind

* Fixing examples to match Refactor kind
2018-01-22 11:45:22 -08:00
Johannes Rieken
dc31fa213b support interleaving file and text changes, basically rewrite bulk edit... 2018-01-19 17:54:54 +01:00
Krzysztof Cieslak
beedeba11b Add new API to communication layer 2018-01-16 20:59:33 +01:00
Matt Bierner
e8c76c4617 Fix inconsistent code action edit property names
**Bug**
We were using `edits` in some places and `edit` in others. This broke some use patterns for code actions
2018-01-04 11:46:52 -08:00
Alex Dima
54e7055c12 Rename IModel to ITextModel 2018-01-04 16:44:40 +02:00
Alex Dima
0721df783d Extract model types out of editorCommon.ts 2018-01-04 16:27:58 +02:00
Johannes Rieken
1299efd208 Merge pull request #41063 from mjbvz/move-code-action-from-proposed
Move new CodeAction Api from proposed to vscode.d.ts
2018-01-03 12:03:33 +01:00
Matt Bierner
8697a5e4ec Extract common logic for adding a new adapter in exthost
Extract function for the following pattern used a number of times in `ExtHostLanguageFeatures`:

```
const handle = this._nextHandle();
this._adapter.set(handle, new OutlineAdapter(this._documents, provider));
```
2018-01-02 15:54:48 -08:00
Matt Bierner
d1fc73226a Move new CodeAction Api from proposed to vscode.d.ts
Moves the `provideCodeActions2` api from proposed to the offical VS Code api. This allows code action providers to return  `CodeAction` objects
2018-01-02 15:22:32 -08:00