Skip to content

Commit

Permalink
Update to 1.51
Browse files Browse the repository at this point in the history
  • Loading branch information
Gama11 committed Dec 21, 2020
1 parent 0b41a6c commit 03b5b73
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -8,7 +8,7 @@
This extern library makes it possible to write extensions for [Visual Studio Code](https://code.visualstudio.com/)
using [Haxe](https://haxe.org/).

VS Code API version: **1.50**
VS Code API version: **1.51**

**NOTE**: Requires Haxe 4 or later

Expand Down
2 changes: 1 addition & 1 deletion doc.hxml
Expand Up @@ -6,4 +6,4 @@
-xml out/js.xml

--next
-cmd haxelib run dox -i out -o out -in "^[vV]scode*" --title "Haxe externs for Visual Studio Code - API documentation" -D version 1.50.1 -D themeColor 0x141419 -D textColor 0xFFFFFF -D logo "https://avatars3.githubusercontent.com/u/19169749?v=3&s=100" -D source-path https://github.com/vshaxe/vscode-extern/blob/master/src/ -D website "https://github.com/vshaxe/"
-cmd haxelib run dox -i out -o out -in "^[vV]scode*" --title "Haxe externs for Visual Studio Code - API documentation" -D version 1.51.0 -D themeColor 0x141419 -D textColor 0xFFFFFF -D logo "https://avatars3.githubusercontent.com/u/19169749?v=3&s=100" -D source-path https://github.com/vshaxe/vscode-extern/blob/master/src/ -D website "https://github.com/vshaxe/"
4 changes: 2 additions & 2 deletions haxelib.json
Expand Up @@ -3,8 +3,8 @@
"description": "Visual Studio Code extern library",
"url": "https://github.com/vshaxe/vscode-extern",
"license": "MIT",
"version": "1.50.1",
"releasenote": "Update to VSCode 1.50",
"version": "1.51.0",
"releasenote": "Update to VSCode 1.51",
"classPath": "src",
"contributors": ["nadako", "Gama11"],
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/Vscode.hx
Expand Up @@ -307,7 +307,8 @@ extern class VscodeCommands {
* Text editor commands are different from ordinary [commands](#commands.registerCommand) as
* they only execute when there is an active editor when the command is called. Also, the
* command handler of an editor command has access to the active editor and to an
* [edit](#TextEditorEdit)-builder.
* [edit](#TextEditorEdit)-builder. Note that the edit-builder is only valid while the
* callback executes.
*
* @param command A unique identifier for the command.
* @param callback A command handler function with access to an [editor](#TextEditor) and an [edit](#TextEditorEdit).
Expand Down
6 changes: 6 additions & 0 deletions src/vscode/CommentThread.hx
Expand Up @@ -26,6 +26,12 @@ typedef CommentThread = {
*/
var collapsibleState:CommentThreadCollapsibleState;

/**
* Whether the thread supports reply.
* Defaults to true.
*/
var canReply:Bool;

/**
* Context value of the comment thread. This can be used to contribute thread specific actions.
* For example, a comment thread is given a context value as `editable`. When contributing actions to `comments/commentThread/title`
Expand Down
6 changes: 3 additions & 3 deletions src/vscode/DocumentFilter.hx
Expand Up @@ -15,16 +15,16 @@ typedef DocumentFilter = {
/**
* A language id, like `typescript`.
*/
var ?language:String;
final ?language:String;

/**
* A Uri [scheme](#Uri.scheme), like `file` or `untitled`.
*/
var ?scheme:String;
final ?scheme:String;

/**
* A [glob pattern](#GlobPattern) that is matched on the absolute path of the document. Use a [relative pattern](#RelativePattern)
* to filter documents to a [workspace folder](#WorkspaceFolder).
*/
var ?pattern:GlobPattern;
final ?pattern:GlobPattern;
}
2 changes: 1 addition & 1 deletion src/vscode/DocumentSelector.hx
Expand Up @@ -12,6 +12,6 @@ package vscode;
* @example
* let sel:DocumentSelector = { scheme: 'file', language: 'typescript' };
*/
typedef DocumentSelector = EitherType<DocumentSelectorSimple, Array<DocumentSelectorSimple>>;
typedef DocumentSelector = EitherType<DocumentSelectorSimple, ReadOnlyArray<DocumentSelectorSimple>>;

typedef DocumentSelectorSimple = EitherType<DocumentFilter, String>;
24 changes: 20 additions & 4 deletions src/vscode/ExtensionContext.hx
Expand Up @@ -18,7 +18,23 @@ typedef ExtensionContext = {
* A memento object that stores state in the context
* of the currently opened [workspace](#workspace.workspaceFolders).
*/
var workspaceState(default, null):Memento;
var workspaceState(default, null):Memento & {

/**
* Set the keys whose values should be synchronized across devices when synchronizing user-data
* like configuration, extensions, and mementos.
*
* Note that this function defines the whole set of keys whose values are synchronized:
* - calling it with an empty array stops synchronization for this memento
* - calling it with a non-empty array replaces all keys whose values are synchronized
*
* For any given set of keys this function needs to be called only once but there is no harm in
* repeatedly calling it.
*
* @param keys The set of keys whose values are synced.
*/
function setKeysForSync(keys:Array<String>):Void;
};

/**
* A memento object that stores state independent
Expand Down Expand Up @@ -46,7 +62,7 @@ typedef ExtensionContext = {
* Get the absolute path of a resource contained in the extension.
*
* *Note* that an absolute uri can be constructed via [`Uri.joinPath`](#Uri.joinPath) and
* [`extensionUri`](#ExtensionContent.extensionUri), e.g. `vscode.Uri.joinPath(context.extensionUri, relativePath);`
* [`extensionUri`](#ExtensionContext.extensionUri), e.g. `vscode.Uri.joinPath(context.extensionUri, relativePath);`
*
* @param relativePath A relative path to a resource contained in the extension.
* @return The absolute path of the resource.
Expand Down Expand Up @@ -75,7 +91,7 @@ typedef ExtensionContext = {
* Use [`workspaceState`](#ExtensionContext.workspaceState) or
* [`globalState`](#ExtensionContext.globalState) to store key value data.
*/
@:deprecated("Use [storagePath](#ExtensionContent.storageUri) instead.")
@:deprecated("Use [storageUri](#ExtensionContext.storageUri) instead.")
var storagePath(default, null):Null<String>;

/**
Expand All @@ -97,7 +113,7 @@ typedef ExtensionContext = {
*
* Use [`globalState`](#ExtensionContext.globalState) to store key value data.
*/
@:deprecated("Use [globalStoragePath](#ExtensionContent.globalStorageUri) instead.")
@:deprecated("Use [globalStorageUri](#ExtensionContext.globalStorageUri) instead.")
var globalStoragePath(default, null):String;

/**
Expand Down
13 changes: 12 additions & 1 deletion src/vscode/ThemeIcon.hx
Expand Up @@ -20,9 +20,20 @@ extern class ThemeIcon {
*/
static var Folder(default, never):ThemeIcon;

/**
* The id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html.
*/
var id(default, null):String;

/**
* The optional ThemeColor of the icon. The color is currently only used in [TreeItem](#TreeItem).
*/
var color(default, null):Null<ThemeColor>;

/**
* Creates a reference to a theme icon.
* @param id id of the icon. The available icons are listed in https://microsoft.github.io/vscode-codicons/dist/codicon.html.
* @param color optional `ThemeColor` for the icon. The color is currently only used in [TreeItem](#TreeItem).
*/
function new(id:String);
function new(id:String, ?color:ThemeColor);
}

0 comments on commit 03b5b73

Please sign in to comment.