Comparing version 0.9.0-pre.5 to 0.9.0-pre.6
{ | ||
"name": "vscode", | ||
"version": "0.9.0-pre.5", | ||
"version": "0.9.0-pre.6", | ||
"typings": "vscode.d.ts", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
446
vscode.d.ts
@@ -37,2 +37,13 @@ /*--------------------------------------------------------- | ||
/** | ||
* Register a text editor command that will make edits. | ||
* It can be invoked via a keyboard shortcut, a menu item, an action, or directly. | ||
* | ||
* @param commandId - The unique identifier of this command | ||
* @param callback - The command callback. The {{textEditor}} and {{edit}} passed in are available only for the duration of the callback. | ||
* @param thisArgs - (optional) The `this` context used when invoking {{callback}} | ||
* @return Disposable which unregisters this command on disposal | ||
*/ | ||
export function registerTextEditorCommand(commandId: string, callback: (textEditor: TextEditor, edit: TextEditorEdit) => void, thisArg?: any): Disposable; | ||
/** | ||
* Executes a command | ||
@@ -54,28 +65,68 @@ * | ||
onContentChange: Event<Models.IContentChangedEvent[]>; | ||
constructor(uri: Uri, lines: string[], eol: string, languageId: string, versionId: number); | ||
/** | ||
* An event that is emitted after the contents of a document have been changed. | ||
*/ | ||
onDidChangeContent: Event<Models.IContentChangedEvent[]>; | ||
/** | ||
* Get the associated URI for this document. Most documents have the file:// scheme, indicating that they represent files on disk. | ||
* However, some documents may have other schemes indicating that they are not available on disk. | ||
*/ | ||
getUri(): Uri; | ||
/** | ||
* Is this document representing an untitled file. | ||
*/ | ||
isUntitled(): boolean; | ||
/** | ||
* The language identifier associated with this document. | ||
*/ | ||
getLanguageId(): string; | ||
/** | ||
* The version number of this document (it will strictly increase after each change). | ||
*/ | ||
getVersionId(): number; | ||
/** | ||
* Get the entire text in this document. | ||
*/ | ||
getText(): string; | ||
/** | ||
* Get the text in a specific range in this document. | ||
*/ | ||
getTextInRange(range: Range): string; | ||
/** | ||
* Get the text on a specific line in this document. | ||
*/ | ||
getTextOnLine(line: number): string; | ||
/** | ||
* Ensure a range sticks to the text. | ||
*/ | ||
validateRange(range: Range): Range; | ||
/** | ||
* Ensure a position sticks to the text. | ||
*/ | ||
validatePosition(position: Position): Position; | ||
/** | ||
* Get the number of lines in this document. | ||
*/ | ||
getLineCount(): number; | ||
/** | ||
* Get the maximum column for line {{line}}. | ||
*/ | ||
getLineMaxColumn(line: number): number; | ||
/** | ||
* Get the word under a certain position. May return null if position is at whitespace, on empty line, etc. | ||
*/ | ||
getWordRangeAtPosition(position: Position): Range; | ||
@@ -127,31 +178,73 @@ } | ||
/** | ||
* Get the document associated with this text editor. The document will be the same for the entire lifetime of this text editor. | ||
*/ | ||
getDocument(): Document; | ||
/** | ||
* Get the primary selection on this text editor. In case the text editor has multiple selections, the first one will be returned. | ||
*/ | ||
getSelection(): Selection; | ||
/** | ||
* Set the selection on this text editor. | ||
*/ | ||
setSelection(value: Position | Range | Selection): Thenable<any>; | ||
/** | ||
* Get the selections in this text editor. | ||
*/ | ||
getSelections(): Selection[]; | ||
/** | ||
* Set the selections in this text editor. | ||
*/ | ||
setSelections(value: Selection[]): Thenable<TextEditor>; | ||
onSelectionsChange: Event<TextEditor>; | ||
/** | ||
* Event fired after the text editor selections have changed. | ||
*/ | ||
onDidChangeSelections: Event<TextEditor>; | ||
/** | ||
* Get text editor options. | ||
*/ | ||
getOptions(): EditorOptions; | ||
/** | ||
* Change text editor options. | ||
*/ | ||
setOptions(options: EditorOptions): Thenable<TextEditor>; | ||
onOptionsChange: Event<TextEditor>; | ||
/** | ||
* Event fired after the text editor options have changed. | ||
*/ | ||
onDidChangeOptions: Event<TextEditor>; | ||
createEdit(): TextEditorEdit; | ||
/** | ||
* Perform an edit on the document associated with this text editor. | ||
* The passed in {{edit}} is available only for the duration of the callback. | ||
*/ | ||
edit(callback: (edit: TextEditorEdit) => void): Thenable<boolean>; | ||
applyEdit(edit: TextEditorEdit): Thenable<boolean>; | ||
} | ||
/** | ||
* A complex edit that will be applied on a TextEditor. | ||
* This holds a description of the edits and if the edits are valid (i.e. no overlapping regions, etc.) they can be applied on a Document associated with a TextEditor. | ||
*/ | ||
export interface TextEditorEdit { | ||
/** | ||
* Replace a certain text region with a new value. | ||
*/ | ||
replace(location: Position | Range | Selection, value: string): void; | ||
/** | ||
* Insert text at a location | ||
*/ | ||
insert(location: Position, value: string): void; | ||
/** | ||
* Delete a certain text region. | ||
*/ | ||
delete(location: Range | Selection): void; | ||
@@ -161,3 +254,176 @@ | ||
/** | ||
* A universal resource identifier representing either a file on disk on | ||
* or another resource, e.g untitled. | ||
*/ | ||
declare class Uri { | ||
constructor(); | ||
static parse(path: string): Uri; | ||
static file(path: string): Uri; | ||
static create(path: string): Uri; | ||
/** | ||
* scheme is the 'http' part of 'http://www.msft.com/some/path?query#fragment'. | ||
* The part before the first colon. | ||
*/ | ||
scheme: string; | ||
/** | ||
* authority is the 'www.msft.com' part of 'http://www.msft.com/some/path?query#fragment'. | ||
* The part between the first double slashes and the next slash. | ||
*/ | ||
authority: string; | ||
/** | ||
* path is the '/some/path' part of 'http://www.msft.com/some/path?query#fragment'. | ||
*/ | ||
path: string; | ||
/** | ||
* query is the 'query' part of 'http://www.msft.com/some/path?query#fragment'. | ||
*/ | ||
query: string; | ||
/** | ||
* fragment is the 'fragment' part of 'http://www.msft.com/some/path?query#fragment'. | ||
*/ | ||
fragment: string; | ||
/** | ||
* Retuns a string representing the corresponding file system path of this URI. | ||
* Will handle UNC paths and normalize windows drive letters to lower-case. Also | ||
* uses the platform specific path separator. Will *not* validate the path for | ||
* invalid characters and semantics. Will *not* look at the scheme of this URI. | ||
*/ | ||
fsPath: string; | ||
/** | ||
* Returns a canonical representation of this URI. The representation and normalization | ||
* of a URI depends on the scheme. | ||
*/ | ||
toString(): string; | ||
toJSON(): any; | ||
} | ||
interface CancellationToken { | ||
isCancellationRequested: boolean; | ||
onCancellationRequested: Event<any>; | ||
} | ||
declare class Disposable { | ||
static of(...disposables: Disposable[]): Disposable; | ||
static from(...disposableLikes: { dispose: () => void }[]): Disposable; | ||
constructor(callOnDispose: Function); | ||
dispose(): any; | ||
} | ||
/** | ||
* Represents a typed event. | ||
*/ | ||
interface Event<T> { | ||
/** | ||
* | ||
* @param listener The listener function will be call when the event happens. | ||
* @param thisArgs The 'this' which will be used when calling the event listener. | ||
* @param disposables An array to which a {{IDisposable}} will be added. The | ||
* @return | ||
*/ | ||
(listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; | ||
} | ||
/** | ||
* A file system watcher notifies about changes to files and folders | ||
* on disk. To get an instanceof of a {{FileSystemWatcher}} use | ||
* {{workspace.createFileSystemWatcher}}. | ||
*/ | ||
export interface FileSystemWatcher extends Disposable { | ||
/** | ||
* Happens on file/folder creation. | ||
*/ | ||
onDidCreate: Event<Uri>; | ||
/** | ||
* Happens on file/folder change. | ||
*/ | ||
onDidChange: Event<Uri>; | ||
/** | ||
* Happens on file/folder deletion. | ||
*/ | ||
onDidDelete: Event<Uri>; | ||
} | ||
/** | ||
* | ||
*/ | ||
export interface QuickPickOptions { | ||
/** | ||
* an optional flag to include the description when filtering the picks | ||
*/ | ||
matchOnDescription?: boolean; | ||
/** | ||
* an optional string to show as place holder in the input box to guide the user what she picks on | ||
*/ | ||
placeHolder?: string; | ||
} | ||
/** | ||
* | ||
*/ | ||
export interface QuickPickItem { | ||
label: string; | ||
description: string; | ||
} | ||
/** | ||
* | ||
*/ | ||
export interface InputBoxOptions { | ||
/** | ||
* More context around the input that is being asked for. | ||
*/ | ||
description?: string; | ||
/** | ||
* an optional string to show as place holder in the input box to guide the user what to type | ||
*/ | ||
placeHolder?: string; | ||
} | ||
/** | ||
* | ||
*/ | ||
interface LanguageFilter { | ||
language: string; | ||
scheme?: string; | ||
pattern?: string; | ||
} | ||
/** | ||
* | ||
*/ | ||
declare type LanguageSelector = string | LanguageFilter | Uri | (string | LanguageFilter | Uri)[]; | ||
/** | ||
* | ||
*/ | ||
interface ReadOnlyMemento { | ||
getValue<T>(key: string, defaultValue?: T): Thenable<T>; | ||
} | ||
/** | ||
* | ||
*/ | ||
interface Memento extends ReadOnlyMemento { | ||
setValue(key: string, value: any): Thenable<void>; | ||
} | ||
// TODO@api, TODO@Joh,Ben | ||
@@ -196,19 +462,3 @@ // output channels need to be known upfront (contributes in package.json) | ||
export interface QuickPickOptions { | ||
/** | ||
* an optional flag to include the description when filtering the picks | ||
*/ | ||
matchOnDescription?: boolean; | ||
/** | ||
* an optional string to show as place holder in the input box to guide the user what she picks on | ||
*/ | ||
placeHolder?: string; | ||
} | ||
export interface QuickPickItem { | ||
label: string; | ||
description: string; | ||
} | ||
// TODO@api naming: showQuickOpen, showQuickPanel, showSelectionPanel, showQuickie | ||
@@ -218,14 +468,2 @@ export function showQuickPick(items: string[], options?: QuickPickOptions): Thenable<string>; | ||
export interface InputBoxOptions { | ||
/** | ||
* More context around the input that is being asked for. | ||
*/ | ||
description?: string; | ||
/** | ||
* an optional string to show as place holder in the input box to guide the user what to type | ||
*/ | ||
placeHolder?: string; | ||
} | ||
/** | ||
@@ -244,8 +482,2 @@ * Opens an input box to ask the user for input. | ||
export interface FileSystemWatcher extends Disposable { | ||
onDidCreate: Event<Uri>; | ||
onDidChange: Event<Uri>; | ||
onDidDelete: Event<Uri>; | ||
} | ||
// TODO@api in the future there might be multiple opened folder in VSCode | ||
@@ -255,2 +487,12 @@ // so that we shouldn't make broken assumptions here | ||
/** | ||
* Creates a file system watcher. A glob pattern that filters the | ||
* file events must be provided. Optionally, flags to ignore certain | ||
* kind of events can be provided. | ||
* | ||
* @param globPattern - A glob pattern that is applied to the names of created, changed, and deleted files. | ||
* @param ignoreCreateEvents - Ignore when files have been created. | ||
* @param ignoreChangeEvents - Ignore when files have been changed. | ||
* @param ignoreDeleteEvents - Ignore when files have been deleted. | ||
*/ | ||
export function createFileSystemWatcher(globPattern: string, ignoreCreateEvents?: boolean, ignoreChangeEvents?: boolean, ignoreDeleteEvents?: boolean): FileSystemWatcher; | ||
@@ -279,10 +521,2 @@ | ||
interface LanguageFilter { | ||
language: string; | ||
scheme?: string; | ||
pattern?: string; | ||
} | ||
type LanguageSelector = string | LanguageFilter | Uri | (string | LanguageFilter | Uri)[]; | ||
export interface LanguageStatusFunction { | ||
@@ -297,100 +531,9 @@ (language: LanguageSelector, message: string | { octicon: string; message: string; }, command: string | CommandCallback): Disposable | ||
interface Memento { | ||
// createChild(key: string): Memento; | ||
getValue<T>(key: string, defaultValue?: T): Thenable<T>; | ||
setValue(key: string, value: any): Thenable<void>; | ||
} | ||
export namespace plugins { | ||
export function getStateObject(pluginId: string, global?: boolean): Memento; | ||
} | ||
declare class Uri { | ||
constructor(); | ||
static parse(path: string): Uri; | ||
static file(path: string): Uri; | ||
static create(path: string): Uri; | ||
/** | ||
* scheme is the 'http' part of 'http://www.msft.com/some/path?query#fragment'. | ||
* The part before the first colon. | ||
*/ | ||
scheme: string; | ||
/** | ||
* authority is the 'www.msft.com' part of 'http://www.msft.com/some/path?query#fragment'. | ||
* The part between the first double slashes and the next slash. | ||
*/ | ||
authority: string; | ||
/** | ||
* path is the '/some/path' part of 'http://www.msft.com/some/path?query#fragment'. | ||
*/ | ||
path: string; | ||
/** | ||
* query is the 'query' part of 'http://www.msft.com/some/path?query#fragment'. | ||
*/ | ||
query: string; | ||
/** | ||
* fragment is the 'fragment' part of 'http://www.msft.com/some/path?query#fragment'. | ||
*/ | ||
fragment: string; | ||
withScheme(value: string): Uri; | ||
withAuthority(value: string): Uri; | ||
withPath(value: string): Uri; | ||
withQuery(value: string): Uri; | ||
withFragment(value: string): Uri; | ||
with(scheme: string, authority: string, path: string, query: string, fragment: string): Uri; | ||
/** | ||
* Retuns a string representing the corresponding file system path of this URI. | ||
* Will handle UNC paths and normalize windows drive letters to lower-case. Also | ||
* uses the platform specific path separator. Will *not* validate the path for | ||
* invalid characters and semantics. Will *not* look at the scheme of this URI. | ||
*/ | ||
fsPath: string; | ||
/** | ||
* Returns a canonical representation of this URI. The representation and normalization | ||
* of a URI depends on the scheme. | ||
*/ | ||
toString(): string; | ||
toJSON(): any; | ||
export function getConfigurationObject(pluginId: string): ReadOnlyMemento; | ||
} | ||
interface CancellationToken { | ||
isCancellationRequested: boolean; | ||
onCancellationRequested: Event<any>; | ||
} | ||
declare class Disposable { | ||
static of(...disposables: Disposable[]): Disposable; | ||
static from(...disposableLikes: { dispose: () => void }[]): Disposable; | ||
constructor(callOnDispose: Function); | ||
dispose(): any; | ||
} | ||
/** | ||
* Represents a typed event. | ||
*/ | ||
interface Event<T> { | ||
/** | ||
* | ||
* @param listener The listener function will be call when the event happens. | ||
* @param thisArgs The 'this' which will be used when calling the event listener. | ||
* @param disposables An array to which a {{IDisposable}} will be added. The | ||
* @return | ||
*/ | ||
(listener: (e: T) => any, thisArgs?: any, disposables?: Disposable[]): Disposable; | ||
} | ||
/** | ||
* A range in the editor. This interface is suitable for serialization. | ||
@@ -486,16 +629,5 @@ */ | ||
// --- Begin IConfigurationService | ||
export interface IConfigurationService { | ||
loadConfiguration(section?: string): Thenable<any>; | ||
} | ||
// --- End IConfigurationService | ||
export var MarkerService: IMarkerService; | ||
export var ModelService: IModelService; | ||
export var ConfigurationService: IConfigurationService; | ||
} | ||
@@ -631,7 +763,7 @@ | ||
matchCase?: boolean; // If set to true, the case of the string captured in 'open' will be detected an applied also to 'closeComplete'. | ||
// This is useful for cases like BEGIN/END or begin/end where the opening and closing phrases are unrelated. | ||
// For identical phrases, use the $1 replacement syntax above directly in closeComplete, as it will | ||
// include the proper casing from the captured string in 'open'. | ||
// Upper/Lower/Camel cases are detected. Camel case dection uses only the first two characters and assumes | ||
// that 'closeComplete' contains wors separated by spaces (e.g. 'End Loop') | ||
// This is useful for cases like BEGIN/END or begin/end where the opening and closing phrases are unrelated. | ||
// For identical phrases, use the $1 replacement syntax above directly in closeComplete, as it will | ||
// include the proper casing from the captured string in 'open'. | ||
// Upper/Lower/Camel cases are detected. Camel case dection uses only the first two characters and assumes | ||
// that 'closeComplete' contains wors separated by spaces (e.g. 'End Loop') | ||
@@ -638,0 +770,0 @@ closeTrigger?: string; // The character that will trigger the evaluation of 'close'. |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
127121
5
3024
1