Skip to content

Commit

Permalink
Merge branch 'master' into electron-4.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed May 9, 2019
2 parents 9a6e4a4 + 7006ca0 commit 4fbe0d6
Show file tree
Hide file tree
Showing 14 changed files with 310 additions and 311 deletions.
6 changes: 3 additions & 3 deletions extensions/json-language-features/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ However, within this extension, you can run a development version of `vscode-jso
#### Linking `vscode-json-languageservice` in `json-language-features/server/`

- Clone [Microsoft/vscode-json-languageservice](https://github.com/Microsoft/vscode-json-languageservice)
- Run `yarn` in `vscode-json-languageservice`
- Run `yarn link` in `vscode-json-languageservice`. This will compile and link `vscode-json-languageservice`
- In `json-language-features/server/`, run `npm link vscode-json-languageservice`
- Run `npm install` in `vscode-json-languageservice`
- Run `npm link` in `vscode-json-languageservice`. This will compile and link `vscode-json-languageservice`
- In `json-language-features/server/`, run `yarn link vscode-json-languageservice`

#### Testing the development version of `vscode-json-languageservice`

Expand Down
275 changes: 0 additions & 275 deletions src/vs/vscode.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8940,281 +8940,6 @@ declare module 'vscode' {
*/
export const onDidChange: Event<void>;
}

//#region Comments

/**
* Collapsible state of a [comment thread](#CommentThread)
*/
export enum CommentThreadCollapsibleState {
/**
* Determines an item is collapsed
*/
Collapsed = 0,

/**
* Determines an item is expanded
*/
Expanded = 1
}

/**
* A collection of [comments](#Comment) representing a conversation at a particular range in a document.
*/
export interface CommentThread {
/**
* A unique identifier of the comment thread.
*/
readonly id: string;

/**
* The uri of the document the thread has been created on.
*/
readonly uri: Uri;

/**
* The range the comment thread is located within the document. The thread icon will be shown
* at the first line of the range.
*/
readonly range: Range;

/**
* The ordered comments of the thread.
*/
comments: Comment[];

/**
* Whether the thread should be collapsed or expanded when opening the document.
* Defaults to Collapsed.
*/
collapsibleState: CommentThreadCollapsibleState;

/**
* The optional human-readable label describing the [Comment Thread](#CommentThread)
*/
label?: string;

/**
* Optional accept input command
*
* `acceptInputCommand` is the default action rendered on Comment Widget, which is always placed rightmost.
* This command will be invoked when users the user accepts the value in the comment editor.
* This command will disabled when the comment editor is empty.
*/
acceptInputCommand?: Command;


/**
* Dispose this comment thread.
*
* Once disposed, this comment thread will be removed from visible editors and Comment Panel when approriate.
*/
dispose(): void;
}

/**
* Author information of a [comment](#Comment)
*/

export interface CommentAuthorInformation {
/**
* The display name of the author of the comment
*/
name: string;

/**
* The optional icon path for the author
*/
iconPath?: Uri;
}

/**
* Author information of a [comment](#Comment)
*/

export interface CommentAuthorInformation {
/**
* The display name of the author of the comment
*/
name: string;

/**
* The optional icon path for the author
*/
iconPath?: Uri;
}

/**
* A comment is displayed within the editor or the Comments Panel, depending on how it is provided.
*/
export interface Comment {
/**
* The id of the comment
*/
id: string;

/**
* The human-readable comment body
*/
body: MarkdownString;

/**
* The author information of the comment
*/
author: CommentAuthorInformation;

/**
* Optional label describing the [Comment](#Comment)
* Label will be rendered next to authorName if exists.
*/
label?: string;

/**
* The command to be executed if the comment is selected in the Comments Panel
*/
selectCommand?: Command;

/**
* The command to be executed when users try to save the edits to the comment
*/
editCommand?: Command;
}

/**
* The comment input box in Comment Widget.
*/
export interface CommentInputBox {
/**
* Setter and getter for the contents of the comment input box
*/
value: string;

/**
* The uri of the document comment input box has been created on
*/
resource: Uri;

/**
* The range the comment input box is located within the document
*/
range: Range;
}

/**
* Commenting range provider for a [comment controller](#CommentController).
*/
export interface CommentingRangeProvider {
/**
* Provide a list of ranges which allow new comment threads creation or null for a given document
*/
provideCommentingRanges(document: TextDocument, token: CancellationToken): ProviderResult<Range[]>;
}

/**
* Comment thread template for new comment thread creation.
*/
export interface CommentThreadTemplate {
/**
* The human-readable label describing the [Comment Thread](#CommentThread)
*/
readonly label: string;

/**
* Optional accept input command
*
* `acceptInputCommand` is the default action rendered on Comment Widget, which is always placed rightmost.
* This command will be invoked when users the user accepts the value in the comment editor.
* This command will disabled when the comment editor is empty.
*/
readonly acceptInputCommand?: Command;

/**
* Optional additonal commands.
*
* `additionalCommands` are the secondary actions rendered on Comment Widget.
*/
readonly additionalCommands?: Command[];

/**
* The command to be executed when users try to delete the comment thread. Currently, this is only called
* when the user collapses a comment thread that has no comments in it.
*/
readonly deleteCommand?: Command;
}

/**
* A comment controller is able to provide [comments](#CommentThread) support to the editor and
* provide users various ways to interact with comments.
*/
export interface CommentController {
/**
* The id of this comment controller.
*/
readonly id: string;

/**
* The human-readable label of this comment controller.
*/
readonly label: string;

/**
* The active [comment input box](#CommentInputBox) or `undefined`. The active `inputBox` is the input box of
* the comment thread widget that currently has focus. It's `undefined` when the focus is not in any CommentInputBox.
*/
readonly inputBox: CommentInputBox | undefined;

/**
* Optional comment thread template information.
*
* The comment controller will use this information to create the comment widget when users attempt to create new comment thread
* from the gutter or command palette.
*
* When users run `CommentThreadTemplate.acceptInputCommand` or `CommentThreadTemplate.additionalCommands`, extensions should create
* the approriate [CommentThread](#CommentThread).
*
* If not provided, users won't be able to create new comment threads in the editor.
*/
template?: CommentThreadTemplate;

/**
* Optional commenting range provider. Provide a list [ranges](#Range) which support commenting to any given resource uri.
*
* If not provided and `emptyCommentThreadFactory` exits, users can leave comments in any document opened in the editor.
*/
commentingRangeProvider?: CommentingRangeProvider;

/**
* Create a [comment thread](#CommentThread). The comment thread will be displayed in visible text editors (if the resource matches)
* and Comments Panel once created.
*
* @param id An `id` for the comment thread.
* @param resource The uri of the document the thread has been created on.
* @param range The range the comment thread is located within the document.
* @param comments The ordered comments of the thread.
*/
createCommentThread(id: string, uri: Uri, range: Range, comments: Comment[]): CommentThread;

/**
* Dispose this comment controller.
*
* Once disposed, all [comment threads](#CommentThread) created by this comment controller will also be removed from the editor
* and Comments Panel.
*/
dispose(): void;
}

namespace comment {
/**
* Creates a new [comment controller](#CommentController) instance.
*
* @param id An `id` for the comment controller.
* @param label A human-readable string for the comment controller.
* @return An instance of [comment controller](#CommentController).
*/
export function createCommentController(id: string, label: string): CommentController;
}

//#endregion
}

/**
Expand Down
Loading

0 comments on commit 4fbe0d6

Please sign in to comment.