Commit Graph

4254 Commits

Author SHA1 Message Date
Alexandru Dima
9cfb2fd998 Reduce memory usage: Do not cache TextDocument.lineAt (#84940) 2019-11-19 10:53:57 +01:00
Matt Bierner
2f253d2ee8 Fixing a few more strict function type errors
For #81574
2019-11-18 15:35:11 -08:00
Andre Weinand
7a89ac693b Make debugging independent from node APIs; fixes #85076 2019-11-18 23:03:00 +01:00
Matt Bierner
8bbe3157f0 Trying to hook up basic save for custom editors 2019-11-18 11:27:45 -08:00
Christof Marti
8031c495a6 Add option to skip sorting QuickPick items (#73904) 2019-11-18 17:09:31 +01:00
Peter Elmers
e9c0aeb8b0 Add optional sortByLabel to QuickPick to control whether to re-sort items when query changes
Summary:
Address issue #73904 by adding an optional `sortByLabel` to the QuickPick class which determines whether the picker re-sorts the result list when the user types in the input field.

If true, the picker applies a sort to order results by the index of the first appearance of the input in the label.

For backwards compatibility, this field is true by default.

https://github.com/microsoft/vscode/issues/73904

Test Plan:
attached video shows behavior both before and after

{F167292605}

note: there aren't any existing tests on what happens when the query input changes in the QuickPick

Reviewers: dalongi, ericblue, hchau

Reviewed By: ericblue

Differential Revision: https://phabricator.intern.facebook.com/D16203434

Signature: 16203434:1562878837:5413e3852f2bd04c8e81b9fe5c4a08127dfe3b65
2019-11-18 17:09:29 +01:00
Sandeep Somavarapu
0282585dd7 Fix #83171 2019-11-18 15:04:08 +01:00
Johannes Rieken
c977eb647e tweak events and add some jsdoc, #43768 2019-11-18 14:20:41 +01:00
Johannes Rieken
6d541cae40 simpler edits collection, #43768 2019-11-18 14:02:42 +01:00
Johannes Rieken
6536592dac allow workspace edit in all will-events, #43768 2019-11-18 13:54:12 +01:00
Alexandru Dima
47dfc2debf Avoid having very small delta areas 2019-11-18 11:34:13 +01:00
Alexandru Dima
22ff01e6ff Fix issue when areas with 0 tokens would be used for delta encoding 2019-11-18 09:41:10 +01:00
Alexandru Dima
41be9a6142 Merge remote-tracking branch 'origin/master' into alex/semantic-exploration 2019-11-18 08:59:14 +01:00
Benjamin Pasero
9727eb6050 untitled - fix save with associated file path 2019-11-18 07:57:48 +01:00
Daniel Imms
c3e3b16899 Merge branch 'master' into cleanup_ext_host_terminals 2019-11-17 12:29:21 -08:00
Benjamin Pasero
00688bf051 working copies - properly implement save, saveAs, saveAll (#84672) 2019-11-17 17:44:57 +01:00
Matt Bierner
27a33ee6fe Hook up very basic undo/redo for webview editors
For #77131
2019-11-15 18:21:46 -08:00
Matt Bierner
7ac686d6cc Working on hooking up undo/redo for custom editors 2019-11-15 15:53:25 -08:00
Alexandru Dima
ca81ca47db More changes for #81574 2019-11-15 18:02:35 +01:00
Benjamin Pasero
72c2f506de working copy - introduce first save/revert semantics (#84672) 2019-11-15 15:36:55 +01:00
Johannes Rieken
261ef3e7e6 Merge pull request #84812 from microsoft/joh/opener
OpenerService supporting URI and URL
2019-11-15 15:31:38 +01:00
isidor
0c2f93d927 Some strict property init #81574 2019-11-15 11:37:37 +01:00
Johannes Rieken
e80c62bdcb allow $openUri to accept URI and string 2019-11-15 10:53:04 +01:00
Johannes Rieken
e51ef85bcb Revert "allow $openUri to accept a URI and string, adopt consumer but keep the API as is"
This reverts commit 544b0abf5b.
2019-11-15 10:29:29 +01:00
Johannes Rieken
544b0abf5b allow $openUri to accept a URI and string, adopt consumer but keep the API as is 2019-11-15 10:28:03 +01:00
Alexandru Dima
cbb231754f Merge remote-tracking branch 'origin/master' into alex/semantic-exploration 2019-11-15 10:10:39 +01:00
Matt Bierner
5370653cf8 Use create functions for more descriptors
For #81574

This applies the fix from #84878 to a number of other descriptor classes in our codebase
2019-11-14 17:10:53 -08:00
Matt Bierner
36a8322ae8 Convert SyncActionDescriptor to use a create function (#84878)
For #81574

See #84669 for details of the problem around strict function types. This change converts `SyncActionDescriptor` to use a static `create` function. This allows us to make the `create` function generic so that it can take the correct types for strictFunctionTypes
2019-11-14 16:49:25 -08:00
Alex Dima
3c2ac03c19 Better logging 2019-11-14 23:25:08 +01:00
Alex Dima
4dbb961407 Fix issue with appended deltas having the wrong order & add unit tests to semantic areas delta computation 2019-11-14 14:03:52 +01:00
Alex Dima
15beb36ccf Merge remote-tracking branch 'origin/master' into alex/semantic-exploration 2019-11-14 09:16:10 +01:00
Matt Bierner
84c882df68 Fix extHost crashing due to using vscode as a value (instead of only as types) 2019-11-13 14:51:14 -08:00
Matt Bierner
a77da1b1d8 For #81574 (#84669)
Our code currently uses the `IConstructorSignature` types in a two main ways:

- As argument types in functions that take a service constructor.
- As return types or property types when we expose a service constructor in the API

This first usage is not valid with strict function types. The reason is that the `IConstructorSignature` types takes a rest array of `...services: BrandedService[]` , while the concrete constructors you pass in use actual services. With strict function types, you cannot convert the concrete constructor type to an `IConstructorSignature` because this would drop important type information that the implementation needs. As an example

```ts
class Foo {
    constructor(@ILogService service: ILogService) {}
}

registerFoo(Foo);

// The type of `ctor` inlines `IConstructorSignature0`
function registerFoo(ctor: { new(....serivces: BrandedService[]): Foo}) {
   // When registerFoo(Foo) is called, the implementation here would need to know that
   // ctor needs to be invoked with exactly one `ILogService`. However the type of `IConstructorSignature0`
   // does not express this. Strict function types therefore disallows this conversion
}
```

To fix this, I have converted a few places were we were taking `IConstructorSignature` arguments so that they preserve the full type of the constructor. This fixed over half of our 900 strict function type errors. Unfortunatly I can not figure out a more elegant way to express this besides inlining the types

However, even after this change, we still need to figure out how to deal with:

- Places in the code where `IConstructorSignature` is exposed as a return type or object property
- How to deal with all of our descriptor types (such as `SyncActionDescriptor`)
2019-11-13 14:42:42 -08:00
Andre Weinand
4a61f33994 proposed API for creating debug uri 2019-11-13 18:18:46 +01:00
Johannes Rieken
0a0f2bffe5 Merge pull request #84048 from okmttdhr/snippet-choice-builder-method
Add builder-method for snippet choice
2019-11-13 16:30:10 +01:00
Joao Moreno
44a7079ed1 fix console.warn
related to #84283
2019-11-13 10:41:46 +01:00
Matt Bierner
fe7e4b231b Use log service instead of console.log in extHostwebview
For #84283
2019-11-12 23:00:29 -08:00
Matt Bierner
7e71822af3 Hook up CustomEditorModel to workingCopyService 2019-11-12 15:54:32 -08:00
Matt Bierner
c26325fb46 Support excluding subsets of code actions for codeActionsOnSave
Fixes #84602
2019-11-12 14:28:43 -08:00
Benjamin Pasero
1a1e7c9545 debt - allow extHostSearch in common (#84109)
* debt - allow extHostSearch in common

* web - implement text search provider

* fix text search

* Update extensions/vscode-api-tests/src/extension.ts

Co-Authored-By: Rob Lourens <roblourens@gmail.com>
2019-11-12 18:57:08 +01:00
Benjamin Pasero
da5f408834 workbench editor model: getResource => resource 2019-11-12 17:04:54 +01:00
Martin Aeschlimann
12b7d0aafe window.showOpenDialog throws "TypeError: Default path must be a string" with defaultUri = null. Fixes #84325 2019-11-12 16:05:18 +01:00
Johannes Rieken
a2e9c12994 use isFile-info instead of defaulting to FileType.File, fixes #84524 2019-11-12 11:45:11 +01:00
Benjamin Pasero
5ae52b61cb files - implement ctime properly as btime (fix #84525) 2019-11-12 10:42:04 +01:00
Joao Moreno
a8f5f3e0a7 add log tracing to main thread tree views 2019-11-12 10:39:46 +01:00
Alex Ross
1aa537bf59 Use log service in exthosttask and exthosttreeviews
Part of #84283
2019-11-12 10:33:21 +01:00
Benjamin Pasero
9b620f43de Enable strictPropertyInitialization (fix #78168) 2019-11-12 08:08:37 +01:00
Matt Bierner
64489f331b Webview strict init #78168 2019-11-11 10:06:15 -08:00
Johannes Rieken
f9285ac2b5 use LogService in extHostStoragePaths and extHostRequireInterceptor, #84283 2019-11-11 15:54:58 +01:00
Johannes Rieken
8e64adbbde use LogService in extHostLanguageFeatures and extHostMessageService, #84283 2019-11-11 12:22:55 +01:00