@codingame/monaco-vscode-api 1.69.9 → 1.69.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.js +2 -1
- package/dist/configuration.js +4 -4
- package/dist/dialogs.js +2 -2
- package/dist/extHost.js +4 -106
- package/dist/files.js +4 -4
- package/dist/keybindings.js +4 -4
- package/dist/languageConfiguration.js +3 -3
- package/dist/languageService.js +2 -2
- package/dist/languages.js +1 -1
- package/dist/layout.js +2 -2
- package/dist/layoutService.js +1 -1
- package/dist/missing-services.js +10 -245
- package/dist/modelEditor.js +3 -3
- package/dist/monaco.js +2 -2
- package/dist/notifications.js +2 -2
- package/dist/polyfill.js +139 -20
- package/dist/services.d.ts +2125 -2125
- package/dist/services.js +3 -2
- package/dist/services2.js +577 -3
- package/dist/snippets.js +4 -4
- package/dist/textmate.js +4 -4
- package/dist/theme.js +3 -3
- package/dist/tokenClassification.js +1 -1
- package/dist/tokenClassificationRegistry.js +1 -1
- package/dist/workbenchThemeService.js +1 -1
- package/dist/{contextkey.js → workspace.js} +24 -1
- package/package.json +1 -1
package/dist/services.d.ts
CHANGED
|
@@ -7550,2322 +7550,2661 @@ interface IResolvedTextEditorModel extends ITextEditorModel {
|
|
|
7550
7550
|
readonly textEditorModel: ITextModel;
|
|
7551
7551
|
}
|
|
7552
7552
|
|
|
7553
|
-
|
|
7554
|
-
* Virtual Key Codes, the value does not hold any inherent meaning.
|
|
7555
|
-
* Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
|
|
7556
|
-
* But these are "more general", as they should work across browsers & OS`s.
|
|
7557
|
-
*/
|
|
7558
|
-
declare const enum KeyCode {
|
|
7559
|
-
DependsOnKbLayout = -1,
|
|
7553
|
+
interface ReadableStreamEvents<T> {
|
|
7560
7554
|
/**
|
|
7561
|
-
*
|
|
7555
|
+
* The 'data' event is emitted whenever the stream is
|
|
7556
|
+
* relinquishing ownership of a chunk of data to a consumer.
|
|
7557
|
+
*
|
|
7558
|
+
* NOTE: PLEASE UNDERSTAND THAT ADDING A DATA LISTENER CAN
|
|
7559
|
+
* TURN THE STREAM INTO FLOWING MODE. IT IS THEREFOR THE
|
|
7560
|
+
* LAST LISTENER THAT SHOULD BE ADDED AND NOT THE FIRST
|
|
7561
|
+
*
|
|
7562
|
+
* Use `listenStream` as a helper method to listen to
|
|
7563
|
+
* stream events in the right order.
|
|
7562
7564
|
*/
|
|
7563
|
-
|
|
7564
|
-
Backspace = 1,
|
|
7565
|
-
Tab = 2,
|
|
7566
|
-
Enter = 3,
|
|
7567
|
-
Shift = 4,
|
|
7568
|
-
Ctrl = 5,
|
|
7569
|
-
Alt = 6,
|
|
7570
|
-
PauseBreak = 7,
|
|
7571
|
-
CapsLock = 8,
|
|
7572
|
-
Escape = 9,
|
|
7573
|
-
Space = 10,
|
|
7574
|
-
PageUp = 11,
|
|
7575
|
-
PageDown = 12,
|
|
7576
|
-
End = 13,
|
|
7577
|
-
Home = 14,
|
|
7578
|
-
LeftArrow = 15,
|
|
7579
|
-
UpArrow = 16,
|
|
7580
|
-
RightArrow = 17,
|
|
7581
|
-
DownArrow = 18,
|
|
7582
|
-
Insert = 19,
|
|
7583
|
-
Delete = 20,
|
|
7584
|
-
Digit0 = 21,
|
|
7585
|
-
Digit1 = 22,
|
|
7586
|
-
Digit2 = 23,
|
|
7587
|
-
Digit3 = 24,
|
|
7588
|
-
Digit4 = 25,
|
|
7589
|
-
Digit5 = 26,
|
|
7590
|
-
Digit6 = 27,
|
|
7591
|
-
Digit7 = 28,
|
|
7592
|
-
Digit8 = 29,
|
|
7593
|
-
Digit9 = 30,
|
|
7594
|
-
KeyA = 31,
|
|
7595
|
-
KeyB = 32,
|
|
7596
|
-
KeyC = 33,
|
|
7597
|
-
KeyD = 34,
|
|
7598
|
-
KeyE = 35,
|
|
7599
|
-
KeyF = 36,
|
|
7600
|
-
KeyG = 37,
|
|
7601
|
-
KeyH = 38,
|
|
7602
|
-
KeyI = 39,
|
|
7603
|
-
KeyJ = 40,
|
|
7604
|
-
KeyK = 41,
|
|
7605
|
-
KeyL = 42,
|
|
7606
|
-
KeyM = 43,
|
|
7607
|
-
KeyN = 44,
|
|
7608
|
-
KeyO = 45,
|
|
7609
|
-
KeyP = 46,
|
|
7610
|
-
KeyQ = 47,
|
|
7611
|
-
KeyR = 48,
|
|
7612
|
-
KeyS = 49,
|
|
7613
|
-
KeyT = 50,
|
|
7614
|
-
KeyU = 51,
|
|
7615
|
-
KeyV = 52,
|
|
7616
|
-
KeyW = 53,
|
|
7617
|
-
KeyX = 54,
|
|
7618
|
-
KeyY = 55,
|
|
7619
|
-
KeyZ = 56,
|
|
7620
|
-
Meta = 57,
|
|
7621
|
-
ContextMenu = 58,
|
|
7622
|
-
F1 = 59,
|
|
7623
|
-
F2 = 60,
|
|
7624
|
-
F3 = 61,
|
|
7625
|
-
F4 = 62,
|
|
7626
|
-
F5 = 63,
|
|
7627
|
-
F6 = 64,
|
|
7628
|
-
F7 = 65,
|
|
7629
|
-
F8 = 66,
|
|
7630
|
-
F9 = 67,
|
|
7631
|
-
F10 = 68,
|
|
7632
|
-
F11 = 69,
|
|
7633
|
-
F12 = 70,
|
|
7634
|
-
F13 = 71,
|
|
7635
|
-
F14 = 72,
|
|
7636
|
-
F15 = 73,
|
|
7637
|
-
F16 = 74,
|
|
7638
|
-
F17 = 75,
|
|
7639
|
-
F18 = 76,
|
|
7640
|
-
F19 = 77,
|
|
7641
|
-
NumLock = 78,
|
|
7642
|
-
ScrollLock = 79,
|
|
7565
|
+
on(event: 'data', callback: (data: T) => void): void;
|
|
7643
7566
|
/**
|
|
7644
|
-
*
|
|
7645
|
-
* For the US standard keyboard, the ';:' key
|
|
7567
|
+
* Emitted when any error occurs.
|
|
7646
7568
|
*/
|
|
7647
|
-
|
|
7569
|
+
on(event: 'error', callback: (err: Error) => void): void;
|
|
7648
7570
|
/**
|
|
7649
|
-
*
|
|
7650
|
-
*
|
|
7571
|
+
* The 'end' event is emitted when there is no more data
|
|
7572
|
+
* to be consumed from the stream. The 'end' event will
|
|
7573
|
+
* not be emitted unless the data is completely consumed.
|
|
7651
7574
|
*/
|
|
7652
|
-
|
|
7575
|
+
on(event: 'end', callback: () => void): void;
|
|
7576
|
+
}
|
|
7577
|
+
/**
|
|
7578
|
+
* A interface that emulates the API shape of a node.js readable
|
|
7579
|
+
* stream for use in native and web environments.
|
|
7580
|
+
*/
|
|
7581
|
+
interface ReadableStream<T> extends ReadableStreamEvents<T> {
|
|
7653
7582
|
/**
|
|
7654
|
-
*
|
|
7655
|
-
* For the US standard keyboard, the ',<' key
|
|
7583
|
+
* Stops emitting any events until resume() is called.
|
|
7656
7584
|
*/
|
|
7657
|
-
|
|
7585
|
+
pause(): void;
|
|
7658
7586
|
/**
|
|
7659
|
-
*
|
|
7660
|
-
* For the US standard keyboard, the '-_' key
|
|
7587
|
+
* Starts emitting events again after pause() was called.
|
|
7661
7588
|
*/
|
|
7662
|
-
|
|
7589
|
+
resume(): void;
|
|
7663
7590
|
/**
|
|
7664
|
-
*
|
|
7665
|
-
* For the US standard keyboard, the '.>' key
|
|
7591
|
+
* Destroys the stream and stops emitting any event.
|
|
7666
7592
|
*/
|
|
7667
|
-
|
|
7593
|
+
destroy(): void;
|
|
7668
7594
|
/**
|
|
7669
|
-
*
|
|
7670
|
-
* For the US standard keyboard, the '/?' key
|
|
7595
|
+
* Allows to remove a listener that was previously added.
|
|
7671
7596
|
*/
|
|
7672
|
-
|
|
7597
|
+
removeListener(event: string, callback: Function): void;
|
|
7598
|
+
}
|
|
7599
|
+
/**
|
|
7600
|
+
* A interface that emulates the API shape of a node.js readable
|
|
7601
|
+
* for use in native and web environments.
|
|
7602
|
+
*/
|
|
7603
|
+
interface Readable<T> {
|
|
7673
7604
|
/**
|
|
7674
|
-
*
|
|
7675
|
-
*
|
|
7605
|
+
* Read data from the underlying source. Will return
|
|
7606
|
+
* null to indicate that no more data can be read.
|
|
7676
7607
|
*/
|
|
7677
|
-
|
|
7608
|
+
read(): T | null;
|
|
7609
|
+
}
|
|
7610
|
+
|
|
7611
|
+
declare class VSBuffer {
|
|
7678
7612
|
/**
|
|
7679
|
-
*
|
|
7680
|
-
*
|
|
7613
|
+
* When running in a nodejs context, the backing store for the returned `VSBuffer` instance
|
|
7614
|
+
* might use a nodejs Buffer allocated from node's Buffer pool, which is not transferrable.
|
|
7681
7615
|
*/
|
|
7682
|
-
|
|
7616
|
+
static alloc(byteLength: number): VSBuffer;
|
|
7683
7617
|
/**
|
|
7684
|
-
*
|
|
7685
|
-
*
|
|
7618
|
+
* When running in a nodejs context, if `actual` is not a nodejs Buffer, the backing store for
|
|
7619
|
+
* the returned `VSBuffer` instance might use a nodejs Buffer allocated from node's Buffer pool,
|
|
7620
|
+
* which is not transferrable.
|
|
7686
7621
|
*/
|
|
7687
|
-
|
|
7622
|
+
static wrap(actual: Uint8Array): VSBuffer;
|
|
7688
7623
|
/**
|
|
7689
|
-
*
|
|
7690
|
-
*
|
|
7624
|
+
* When running in a nodejs context, the backing store for the returned `VSBuffer` instance
|
|
7625
|
+
* might use a nodejs Buffer allocated from node's Buffer pool, which is not transferrable.
|
|
7691
7626
|
*/
|
|
7692
|
-
|
|
7627
|
+
static fromString(source: string, options?: {
|
|
7628
|
+
dontUseNodeBuffer?: boolean;
|
|
7629
|
+
}): VSBuffer;
|
|
7693
7630
|
/**
|
|
7694
|
-
*
|
|
7695
|
-
*
|
|
7631
|
+
* When running in a nodejs context, the backing store for the returned `VSBuffer` instance
|
|
7632
|
+
* might use a nodejs Buffer allocated from node's Buffer pool, which is not transferrable.
|
|
7696
7633
|
*/
|
|
7697
|
-
|
|
7634
|
+
static fromByteArray(source: number[]): VSBuffer;
|
|
7698
7635
|
/**
|
|
7699
|
-
*
|
|
7636
|
+
* When running in a nodejs context, the backing store for the returned `VSBuffer` instance
|
|
7637
|
+
* might use a nodejs Buffer allocated from node's Buffer pool, which is not transferrable.
|
|
7700
7638
|
*/
|
|
7701
|
-
|
|
7639
|
+
static concat(buffers: VSBuffer[], totalLength?: number): VSBuffer;
|
|
7640
|
+
readonly buffer: Uint8Array;
|
|
7641
|
+
readonly byteLength: number;
|
|
7642
|
+
private constructor();
|
|
7702
7643
|
/**
|
|
7703
|
-
*
|
|
7644
|
+
* When running in a nodejs context, the backing store for the returned `VSBuffer` instance
|
|
7645
|
+
* might use a nodejs Buffer allocated from node's Buffer pool, which is not transferrable.
|
|
7704
7646
|
*/
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7647
|
+
clone(): VSBuffer;
|
|
7648
|
+
toString(): string;
|
|
7649
|
+
slice(start?: number, end?: number): VSBuffer;
|
|
7650
|
+
set(array: VSBuffer, offset?: number): void;
|
|
7651
|
+
set(array: Uint8Array, offset?: number): void;
|
|
7652
|
+
set(array: ArrayBuffer, offset?: number): void;
|
|
7653
|
+
set(array: ArrayBufferView, offset?: number): void;
|
|
7654
|
+
set(array: VSBuffer | Uint8Array | ArrayBuffer | ArrayBufferView, offset?: number): void;
|
|
7655
|
+
readUInt32BE(offset: number): number;
|
|
7656
|
+
writeUInt32BE(value: number, offset: number): void;
|
|
7657
|
+
readUInt32LE(offset: number): number;
|
|
7658
|
+
writeUInt32LE(value: number, offset: number): void;
|
|
7659
|
+
readUInt8(offset: number): number;
|
|
7660
|
+
writeUInt8(value: number, offset: number): void;
|
|
7661
|
+
}
|
|
7662
|
+
interface VSBufferReadable extends Readable<VSBuffer> {
|
|
7663
|
+
}
|
|
7664
|
+
interface VSBufferReadableStream extends ReadableStream<VSBuffer> {
|
|
7665
|
+
}
|
|
7666
|
+
|
|
7667
|
+
interface IRelativePattern {
|
|
7722
7668
|
/**
|
|
7723
|
-
*
|
|
7669
|
+
* A base file path to which this pattern will be matched against relatively.
|
|
7724
7670
|
*/
|
|
7725
|
-
|
|
7726
|
-
ABNT_C1 = 110,
|
|
7727
|
-
ABNT_C2 = 111,
|
|
7728
|
-
AudioVolumeMute = 112,
|
|
7729
|
-
AudioVolumeUp = 113,
|
|
7730
|
-
AudioVolumeDown = 114,
|
|
7731
|
-
BrowserSearch = 115,
|
|
7732
|
-
BrowserHome = 116,
|
|
7733
|
-
BrowserBack = 117,
|
|
7734
|
-
BrowserForward = 118,
|
|
7735
|
-
MediaTrackNext = 119,
|
|
7736
|
-
MediaTrackPrevious = 120,
|
|
7737
|
-
MediaStop = 121,
|
|
7738
|
-
MediaPlayPause = 122,
|
|
7739
|
-
LaunchMediaPlayer = 123,
|
|
7740
|
-
LaunchMail = 124,
|
|
7741
|
-
LaunchApp2 = 125,
|
|
7671
|
+
readonly base: string;
|
|
7742
7672
|
/**
|
|
7743
|
-
*
|
|
7673
|
+
* A file glob pattern like `*.{ts,js}` that will be matched on file paths
|
|
7674
|
+
* relative to the base path.
|
|
7675
|
+
*
|
|
7676
|
+
* Example: Given a base of `/home/work/folder` and a file path of `/home/work/folder/index.js`,
|
|
7677
|
+
* the file glob pattern will match on `index.js`.
|
|
7744
7678
|
*/
|
|
7745
|
-
|
|
7746
|
-
/**
|
|
7747
|
-
* Placed last to cover the length of the enum.
|
|
7748
|
-
* Please do not depend on this value!
|
|
7749
|
-
*/
|
|
7750
|
-
MAX_VALUE = 127
|
|
7751
|
-
}
|
|
7752
|
-
|
|
7753
|
-
declare const enum OperatingSystem {
|
|
7754
|
-
Windows = 1,
|
|
7755
|
-
Macintosh = 2,
|
|
7756
|
-
Linux = 3
|
|
7679
|
+
readonly pattern: string;
|
|
7757
7680
|
}
|
|
7758
7681
|
|
|
7759
|
-
|
|
7760
|
-
|
|
7761
|
-
readonly
|
|
7762
|
-
readonly altKey: boolean;
|
|
7763
|
-
readonly metaKey: boolean;
|
|
7764
|
-
}
|
|
7765
|
-
interface IBaseKeybinding extends Modifiers {
|
|
7766
|
-
isDuplicateModifierCase(): boolean;
|
|
7767
|
-
}
|
|
7768
|
-
declare class SimpleKeybinding implements IBaseKeybinding {
|
|
7769
|
-
readonly ctrlKey: boolean;
|
|
7770
|
-
readonly shiftKey: boolean;
|
|
7771
|
-
readonly altKey: boolean;
|
|
7772
|
-
readonly metaKey: boolean;
|
|
7773
|
-
readonly keyCode: KeyCode;
|
|
7774
|
-
constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, keyCode: KeyCode);
|
|
7775
|
-
equals(other: SimpleKeybinding): boolean;
|
|
7776
|
-
getHashCode(): string;
|
|
7777
|
-
isModifierKey(): boolean;
|
|
7778
|
-
toChord(): ChordKeybinding;
|
|
7682
|
+
declare const IFileService: ServiceIdentifier<IFileService>;
|
|
7683
|
+
interface IFileService {
|
|
7684
|
+
readonly _serviceBrand: undefined;
|
|
7779
7685
|
/**
|
|
7780
|
-
*
|
|
7686
|
+
* An event that is fired when a file system provider is added or removed
|
|
7781
7687
|
*/
|
|
7782
|
-
|
|
7783
|
-
}
|
|
7784
|
-
declare class ChordKeybinding {
|
|
7785
|
-
readonly parts: SimpleKeybinding[];
|
|
7786
|
-
constructor(parts: SimpleKeybinding[]);
|
|
7787
|
-
getHashCode(): string;
|
|
7788
|
-
equals(other: ChordKeybinding | null): boolean;
|
|
7789
|
-
}
|
|
7790
|
-
declare type Keybinding = ChordKeybinding;
|
|
7791
|
-
declare class ResolvedKeybindingPart {
|
|
7792
|
-
readonly ctrlKey: boolean;
|
|
7793
|
-
readonly shiftKey: boolean;
|
|
7794
|
-
readonly altKey: boolean;
|
|
7795
|
-
readonly metaKey: boolean;
|
|
7796
|
-
readonly keyLabel: string | null;
|
|
7797
|
-
readonly keyAriaLabel: string | null;
|
|
7798
|
-
constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, kbLabel: string | null, kbAriaLabel: string | null);
|
|
7799
|
-
}
|
|
7800
|
-
declare type KeybindingModifier = 'ctrl' | 'shift' | 'alt' | 'meta';
|
|
7801
|
-
/**
|
|
7802
|
-
* A resolved keybinding. Can be a simple keybinding or a chord keybinding.
|
|
7803
|
-
*/
|
|
7804
|
-
declare abstract class ResolvedKeybinding {
|
|
7688
|
+
readonly onDidChangeFileSystemProviderRegistrations: Event<IFileSystemProviderRegistrationEvent>;
|
|
7805
7689
|
/**
|
|
7806
|
-
*
|
|
7690
|
+
* An event that is fired when a registered file system provider changes it's capabilities.
|
|
7807
7691
|
*/
|
|
7808
|
-
|
|
7692
|
+
readonly onDidChangeFileSystemProviderCapabilities: Event<IFileSystemProviderCapabilitiesChangeEvent>;
|
|
7809
7693
|
/**
|
|
7810
|
-
*
|
|
7694
|
+
* An event that is fired when a file system provider is about to be activated. Listeners
|
|
7695
|
+
* can join this event with a long running promise to help in the activation process.
|
|
7811
7696
|
*/
|
|
7812
|
-
|
|
7697
|
+
readonly onWillActivateFileSystemProvider: Event<IFileSystemProviderActivationEvent>;
|
|
7813
7698
|
/**
|
|
7814
|
-
*
|
|
7815
|
-
* See https://github.com/electron/electron/blob/master/docs/api/accelerator.md
|
|
7699
|
+
* Registers a file system provider for a certain scheme.
|
|
7816
7700
|
*/
|
|
7817
|
-
|
|
7701
|
+
registerProvider(scheme: string, provider: IFileSystemProvider): IDisposable;
|
|
7818
7702
|
/**
|
|
7819
|
-
*
|
|
7703
|
+
* Returns a file system provider for a certain scheme.
|
|
7820
7704
|
*/
|
|
7821
|
-
|
|
7705
|
+
getProvider(scheme: string): IFileSystemProvider | undefined;
|
|
7822
7706
|
/**
|
|
7823
|
-
*
|
|
7707
|
+
* Tries to activate a provider with the given scheme.
|
|
7824
7708
|
*/
|
|
7825
|
-
|
|
7709
|
+
activateProvider(scheme: string): Promise<void>;
|
|
7826
7710
|
/**
|
|
7827
|
-
*
|
|
7711
|
+
* Checks if this file service can handle the given resource by
|
|
7712
|
+
* first activating any extension that wants to be activated
|
|
7713
|
+
* on the provided resource scheme to include extensions that
|
|
7714
|
+
* contribute file system providers for the given resource.
|
|
7828
7715
|
*/
|
|
7829
|
-
|
|
7716
|
+
canHandleResource(resource: URI): Promise<boolean>;
|
|
7830
7717
|
/**
|
|
7831
|
-
*
|
|
7832
|
-
*
|
|
7718
|
+
* Checks if the file service has a registered provider for the
|
|
7719
|
+
* provided resource.
|
|
7720
|
+
*
|
|
7721
|
+
* Note: this does NOT account for contributed providers from
|
|
7722
|
+
* extensions that have not been activated yet. To include those,
|
|
7723
|
+
* consider to call `await fileService.canHandleResource(resource)`.
|
|
7833
7724
|
*/
|
|
7834
|
-
|
|
7725
|
+
hasProvider(resource: URI): boolean;
|
|
7835
7726
|
/**
|
|
7836
|
-
*
|
|
7837
|
-
* Returns null for parts consisting of only modifier keys
|
|
7838
|
-
* @example keybinding "Shift" -> null
|
|
7839
|
-
* @example keybinding ("D" with shift == true) -> "shift+D"
|
|
7727
|
+
* Checks if the provider for the provided resource has the provided file system capability.
|
|
7840
7728
|
*/
|
|
7841
|
-
|
|
7729
|
+
hasCapability(resource: URI, capability: FileSystemProviderCapabilities): boolean;
|
|
7842
7730
|
/**
|
|
7843
|
-
*
|
|
7844
|
-
* Returns null for parts that contain more than one modifier or a regular key.
|
|
7845
|
-
* @example keybinding "Shift" -> "shift"
|
|
7846
|
-
* @example keybinding ("D" with shift == true") -> null
|
|
7731
|
+
* List the schemes and capabilies for registered file system providers
|
|
7847
7732
|
*/
|
|
7848
|
-
|
|
7849
|
-
|
|
7850
|
-
|
|
7851
|
-
|
|
7852
|
-
width: number;
|
|
7853
|
-
height: number;
|
|
7854
|
-
}
|
|
7855
|
-
|
|
7856
|
-
/**
|
|
7857
|
-
* A model for the diff editor.
|
|
7858
|
-
*/
|
|
7859
|
-
interface IDiffEditorModel {
|
|
7733
|
+
listCapabilities(): Iterable<{
|
|
7734
|
+
scheme: string;
|
|
7735
|
+
capabilities: FileSystemProviderCapabilities;
|
|
7736
|
+
}>;
|
|
7860
7737
|
/**
|
|
7861
|
-
*
|
|
7738
|
+
* Allows to listen for file changes. The event will fire for every file within the opened workspace
|
|
7739
|
+
* (if any) as well as all files that have been watched explicitly using the #watch() API.
|
|
7862
7740
|
*/
|
|
7863
|
-
|
|
7741
|
+
readonly onDidFilesChange: Event<FileChangesEvent>;
|
|
7864
7742
|
/**
|
|
7865
|
-
*
|
|
7743
|
+
* An event that is fired upon successful completion of a certain file operation.
|
|
7866
7744
|
*/
|
|
7867
|
-
|
|
7868
|
-
}
|
|
7869
|
-
interface IEditorAction {
|
|
7870
|
-
readonly id: string;
|
|
7871
|
-
readonly label: string;
|
|
7872
|
-
readonly alias: string;
|
|
7873
|
-
isSupported(): boolean;
|
|
7874
|
-
run(): Promise<void>;
|
|
7875
|
-
}
|
|
7876
|
-
declare type IEditorModel = ITextModel | IDiffEditorModel;
|
|
7877
|
-
/**
|
|
7878
|
-
* A (serializable) state of the cursors.
|
|
7879
|
-
*/
|
|
7880
|
-
interface ICursorState {
|
|
7881
|
-
inSelectionMode: boolean;
|
|
7882
|
-
selectionStart: IPosition;
|
|
7883
|
-
position: IPosition;
|
|
7884
|
-
}
|
|
7885
|
-
/**
|
|
7886
|
-
* A (serializable) state of the view.
|
|
7887
|
-
*/
|
|
7888
|
-
interface IViewState {
|
|
7889
|
-
/** written by previous versions */
|
|
7890
|
-
scrollTop?: number;
|
|
7891
|
-
/** written by previous versions */
|
|
7892
|
-
scrollTopWithoutViewZones?: number;
|
|
7893
|
-
scrollLeft: number;
|
|
7894
|
-
firstPosition: IPosition;
|
|
7895
|
-
firstPositionDeltaTop: number;
|
|
7896
|
-
}
|
|
7897
|
-
/**
|
|
7898
|
-
* A (serializable) state of the code editor.
|
|
7899
|
-
*/
|
|
7900
|
-
interface ICodeEditorViewState {
|
|
7901
|
-
cursorState: ICursorState[];
|
|
7902
|
-
viewState: IViewState;
|
|
7903
|
-
contributionsState: {
|
|
7904
|
-
[id: string]: any;
|
|
7905
|
-
};
|
|
7906
|
-
}
|
|
7907
|
-
/**
|
|
7908
|
-
* (Serializable) View state for the diff editor.
|
|
7909
|
-
*/
|
|
7910
|
-
interface IDiffEditorViewState {
|
|
7911
|
-
original: ICodeEditorViewState | null;
|
|
7912
|
-
modified: ICodeEditorViewState | null;
|
|
7913
|
-
}
|
|
7914
|
-
/**
|
|
7915
|
-
* An editor view state.
|
|
7916
|
-
*/
|
|
7917
|
-
declare type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;
|
|
7918
|
-
declare const enum ScrollType {
|
|
7919
|
-
Smooth = 0,
|
|
7920
|
-
Immediate = 1
|
|
7921
|
-
}
|
|
7922
|
-
/**
|
|
7923
|
-
* An editor.
|
|
7924
|
-
*/
|
|
7925
|
-
interface IEditor {
|
|
7745
|
+
readonly onDidRunOperation: Event<FileOperationEvent>;
|
|
7926
7746
|
/**
|
|
7927
|
-
*
|
|
7928
|
-
*
|
|
7747
|
+
* Resolve the properties of a file/folder identified by the resource. For a folder, children
|
|
7748
|
+
* information is resolved as well depending on the provided options. Use `stat()` method if
|
|
7749
|
+
* you do not need children information.
|
|
7750
|
+
*
|
|
7751
|
+
* If the optional parameter "resolveTo" is specified in options, the stat service is asked
|
|
7752
|
+
* to provide a stat object that should contain the full graph of folders up to all of the
|
|
7753
|
+
* target resources.
|
|
7754
|
+
*
|
|
7755
|
+
* If the optional parameter "resolveSingleChildDescendants" is specified in options,
|
|
7756
|
+
* the stat service is asked to automatically resolve child folders that only
|
|
7757
|
+
* contain a single element.
|
|
7758
|
+
*
|
|
7759
|
+
* If the optional parameter "resolveMetadata" is specified in options,
|
|
7760
|
+
* the stat will contain metadata information such as size, mtime and etag.
|
|
7929
7761
|
*/
|
|
7930
|
-
|
|
7762
|
+
resolve(resource: URI, options: IResolveMetadataFileOptions): Promise<IFileStatWithMetadata>;
|
|
7763
|
+
resolve(resource: URI, options?: IResolveFileOptions): Promise<IFileStat>;
|
|
7931
7764
|
/**
|
|
7932
|
-
*
|
|
7765
|
+
* Same as `resolve()` but supports resolving multiple resources in parallel.
|
|
7766
|
+
*
|
|
7767
|
+
* If one of the resolve targets fails to resolve returns a fake `IFileStat` instead of
|
|
7768
|
+
* making the whole call fail.
|
|
7933
7769
|
*/
|
|
7934
|
-
|
|
7770
|
+
resolveAll(toResolve: {
|
|
7771
|
+
resource: URI;
|
|
7772
|
+
options: IResolveMetadataFileOptions;
|
|
7773
|
+
}[]): Promise<IFileStatResult[]>;
|
|
7774
|
+
resolveAll(toResolve: {
|
|
7775
|
+
resource: URI;
|
|
7776
|
+
options?: IResolveFileOptions;
|
|
7777
|
+
}[]): Promise<IFileStatResult[]>;
|
|
7935
7778
|
/**
|
|
7936
|
-
*
|
|
7779
|
+
* Same as `resolve()` but without resolving the children of a folder if the
|
|
7780
|
+
* resource is pointing to a folder.
|
|
7937
7781
|
*/
|
|
7938
|
-
|
|
7782
|
+
stat(resource: URI): Promise<IFileStatWithPartialMetadata>;
|
|
7939
7783
|
/**
|
|
7940
|
-
*
|
|
7941
|
-
* This is to avoid an instanceof check
|
|
7784
|
+
* Finds out if a file/folder identified by the resource exists.
|
|
7942
7785
|
*/
|
|
7943
|
-
|
|
7786
|
+
exists(resource: URI): Promise<boolean>;
|
|
7944
7787
|
/**
|
|
7945
|
-
*
|
|
7788
|
+
* Read the contents of the provided resource unbuffered.
|
|
7946
7789
|
*/
|
|
7947
|
-
|
|
7790
|
+
readFile(resource: URI, options?: IReadFileOptions, token?: CancellationToken): Promise<IFileContent>;
|
|
7948
7791
|
/**
|
|
7949
|
-
*
|
|
7950
|
-
* @internal
|
|
7792
|
+
* Read the contents of the provided resource buffered as stream.
|
|
7951
7793
|
*/
|
|
7952
|
-
|
|
7794
|
+
readFileStream(resource: URI, options?: IReadFileStreamOptions, token?: CancellationToken): Promise<IFileStreamContent>;
|
|
7953
7795
|
/**
|
|
7954
|
-
*
|
|
7955
|
-
*
|
|
7796
|
+
* Updates the content replacing its previous value.
|
|
7797
|
+
*
|
|
7798
|
+
* Emits a `FileOperation.WRITE` file operation event when successful.
|
|
7956
7799
|
*/
|
|
7957
|
-
|
|
7800
|
+
writeFile(resource: URI, bufferOrReadableOrStream: VSBuffer | VSBufferReadable | VSBufferReadableStream, options?: IWriteFileOptions): Promise<IFileStatWithMetadata>;
|
|
7958
7801
|
/**
|
|
7959
|
-
*
|
|
7960
|
-
* be called when the container of the editor gets resized.
|
|
7802
|
+
* Moves the file/folder to a new path identified by the resource.
|
|
7961
7803
|
*
|
|
7962
|
-
*
|
|
7804
|
+
* The optional parameter overwrite can be set to replace an existing file at the location.
|
|
7805
|
+
*
|
|
7806
|
+
* Emits a `FileOperation.MOVE` file operation event when successful.
|
|
7963
7807
|
*/
|
|
7964
|
-
|
|
7808
|
+
move(source: URI, target: URI, overwrite?: boolean): Promise<IFileStatWithMetadata>;
|
|
7965
7809
|
/**
|
|
7966
|
-
*
|
|
7810
|
+
* Find out if a move operation is possible given the arguments. No changes on disk will
|
|
7811
|
+
* be performed. Returns an Error if the operation cannot be done.
|
|
7967
7812
|
*/
|
|
7968
|
-
|
|
7813
|
+
canMove(source: URI, target: URI, overwrite?: boolean): Promise<Error | true>;
|
|
7969
7814
|
/**
|
|
7970
|
-
*
|
|
7815
|
+
* Copies the file/folder to a path identified by the resource. A folder is copied
|
|
7816
|
+
* recursively.
|
|
7817
|
+
*
|
|
7818
|
+
* Emits a `FileOperation.COPY` file operation event when successful.
|
|
7971
7819
|
*/
|
|
7972
|
-
|
|
7820
|
+
copy(source: URI, target: URI, overwrite?: boolean): Promise<IFileStatWithMetadata>;
|
|
7973
7821
|
/**
|
|
7974
|
-
*
|
|
7822
|
+
* Find out if a copy operation is possible given the arguments. No changes on disk will
|
|
7823
|
+
* be performed. Returns an Error if the operation cannot be done.
|
|
7975
7824
|
*/
|
|
7976
|
-
|
|
7825
|
+
canCopy(source: URI, target: URI, overwrite?: boolean): Promise<Error | true>;
|
|
7977
7826
|
/**
|
|
7978
|
-
*
|
|
7827
|
+
* Clones a file to a path identified by the resource. Folders are not supported.
|
|
7828
|
+
*
|
|
7829
|
+
* If the target path exists, it will be overwritten.
|
|
7979
7830
|
*/
|
|
7980
|
-
|
|
7831
|
+
cloneFile(source: URI, target: URI): Promise<void>;
|
|
7981
7832
|
/**
|
|
7982
|
-
*
|
|
7833
|
+
* Creates a new file with the given path and optional contents. The returned promise
|
|
7834
|
+
* will have the stat model object as a result.
|
|
7835
|
+
*
|
|
7836
|
+
* The optional parameter content can be used as value to fill into the new file.
|
|
7837
|
+
*
|
|
7838
|
+
* Emits a `FileOperation.CREATE` file operation event when successful.
|
|
7983
7839
|
*/
|
|
7984
|
-
|
|
7840
|
+
createFile(resource: URI, bufferOrReadableOrStream?: VSBuffer | VSBufferReadable | VSBufferReadableStream, options?: ICreateFileOptions): Promise<IFileStatWithMetadata>;
|
|
7985
7841
|
/**
|
|
7986
|
-
*
|
|
7842
|
+
* Find out if a file create operation is possible given the arguments. No changes on disk will
|
|
7843
|
+
* be performed. Returns an Error if the operation cannot be done.
|
|
7987
7844
|
*/
|
|
7988
|
-
|
|
7845
|
+
canCreateFile(resource: URI, options?: ICreateFileOptions): Promise<Error | true>;
|
|
7989
7846
|
/**
|
|
7990
|
-
*
|
|
7991
|
-
*
|
|
7847
|
+
* Creates a new folder with the given path. The returned promise
|
|
7848
|
+
* will have the stat model object as a result.
|
|
7849
|
+
*
|
|
7850
|
+
* Emits a `FileOperation.CREATE` file operation event when successful.
|
|
7992
7851
|
*/
|
|
7993
|
-
|
|
7852
|
+
createFolder(resource: URI): Promise<IFileStatWithMetadata>;
|
|
7994
7853
|
/**
|
|
7995
|
-
*
|
|
7854
|
+
* Deletes the provided file. The optional useTrash parameter allows to
|
|
7855
|
+
* move the file to trash. The optional recursive parameter allows to delete
|
|
7856
|
+
* non-empty folders recursively.
|
|
7857
|
+
*
|
|
7858
|
+
* Emits a `FileOperation.DELETE` file operation event when successful.
|
|
7996
7859
|
*/
|
|
7997
|
-
|
|
7860
|
+
del(resource: URI, options?: Partial<IFileDeleteOptions>): Promise<void>;
|
|
7998
7861
|
/**
|
|
7999
|
-
*
|
|
8000
|
-
*
|
|
8001
|
-
* @param source Source of the call that caused the position
|
|
7862
|
+
* Find out if a delete operation is possible given the arguments. No changes on disk will
|
|
7863
|
+
* be performed. Returns an Error if the operation cannot be done.
|
|
8002
7864
|
*/
|
|
8003
|
-
|
|
7865
|
+
canDelete(resource: URI, options?: Partial<IFileDeleteOptions>): Promise<Error | true>;
|
|
8004
7866
|
/**
|
|
8005
|
-
*
|
|
7867
|
+
* An event that signals an error when watching for file changes.
|
|
8006
7868
|
*/
|
|
8007
|
-
|
|
7869
|
+
readonly onDidWatchError: Event<Error>;
|
|
8008
7870
|
/**
|
|
8009
|
-
*
|
|
7871
|
+
* Allows to start a watcher that reports file/folder change events on the provided resource.
|
|
7872
|
+
*
|
|
7873
|
+
* Note: recursive file watching is not supported from this method. Only events from files
|
|
7874
|
+
* that are direct children of the provided resource will be reported.
|
|
8010
7875
|
*/
|
|
8011
|
-
|
|
7876
|
+
watch(resource: URI, options?: IWatchOptions): IDisposable;
|
|
8012
7877
|
/**
|
|
8013
|
-
*
|
|
7878
|
+
* Frees up any resources occupied by this service.
|
|
8014
7879
|
*/
|
|
8015
|
-
|
|
7880
|
+
dispose(): void;
|
|
7881
|
+
}
|
|
7882
|
+
interface IFileOverwriteOptions {
|
|
8016
7883
|
/**
|
|
8017
|
-
*
|
|
8018
|
-
*
|
|
7884
|
+
* Set to `true` to overwrite a file if it exists. Will
|
|
7885
|
+
* throw an error otherwise if the file does exist.
|
|
8019
7886
|
*/
|
|
8020
|
-
|
|
7887
|
+
readonly overwrite: boolean;
|
|
7888
|
+
}
|
|
7889
|
+
interface IFileUnlockOptions {
|
|
8021
7890
|
/**
|
|
8022
|
-
*
|
|
7891
|
+
* Set to `true` to try to remove any write locks the file might
|
|
7892
|
+
* have. A file that is write locked will throw an error for any
|
|
7893
|
+
* attempt to write to unless `unlock: true` is provided.
|
|
8023
7894
|
*/
|
|
8024
|
-
|
|
7895
|
+
readonly unlock: boolean;
|
|
7896
|
+
}
|
|
7897
|
+
interface IFileReadStreamOptions {
|
|
8025
7898
|
/**
|
|
8026
|
-
*
|
|
7899
|
+
* Is an integer specifying where to begin reading from in the file. If position is undefined,
|
|
7900
|
+
* data will be read from the current file position.
|
|
8027
7901
|
*/
|
|
8028
|
-
|
|
7902
|
+
readonly position?: number;
|
|
8029
7903
|
/**
|
|
8030
|
-
*
|
|
7904
|
+
* Is an integer specifying how many bytes to read from the file. By default, all bytes
|
|
7905
|
+
* will be read.
|
|
8031
7906
|
*/
|
|
8032
|
-
|
|
7907
|
+
readonly length?: number;
|
|
8033
7908
|
/**
|
|
8034
|
-
*
|
|
8035
|
-
* optimized for viewing a code definition.
|
|
7909
|
+
* If provided, the size of the file will be checked against the limits.
|
|
8036
7910
|
*/
|
|
8037
|
-
|
|
7911
|
+
limits?: {
|
|
7912
|
+
readonly size?: number;
|
|
7913
|
+
readonly memory?: number;
|
|
7914
|
+
};
|
|
7915
|
+
}
|
|
7916
|
+
interface IFileWriteOptions extends IFileOverwriteOptions, IFileUnlockOptions {
|
|
8038
7917
|
/**
|
|
8039
|
-
*
|
|
7918
|
+
* Set to `true` to create a file when it does not exist. Will
|
|
7919
|
+
* throw an error otherwise if the file does not exist.
|
|
8040
7920
|
*/
|
|
8041
|
-
|
|
7921
|
+
readonly create: boolean;
|
|
7922
|
+
}
|
|
7923
|
+
declare type IFileOpenOptions = IFileOpenForReadOptions | IFileOpenForWriteOptions;
|
|
7924
|
+
interface IFileOpenForReadOptions {
|
|
8042
7925
|
/**
|
|
8043
|
-
*
|
|
7926
|
+
* A hint that the file should be opened for reading only.
|
|
8044
7927
|
*/
|
|
8045
|
-
|
|
7928
|
+
readonly create: false;
|
|
7929
|
+
}
|
|
7930
|
+
interface IFileOpenForWriteOptions extends IFileUnlockOptions {
|
|
8046
7931
|
/**
|
|
8047
|
-
*
|
|
8048
|
-
* @param selection The new selection
|
|
8049
|
-
* @param source Source of the call that caused the selection
|
|
7932
|
+
* A hint that the file should be opened for reading and writing.
|
|
8050
7933
|
*/
|
|
8051
|
-
|
|
7934
|
+
readonly create: true;
|
|
7935
|
+
}
|
|
7936
|
+
interface IFileDeleteOptions {
|
|
8052
7937
|
/**
|
|
8053
|
-
* Set
|
|
8054
|
-
*
|
|
8055
|
-
*
|
|
7938
|
+
* Set to `true` to recursively delete any children of the file. This
|
|
7939
|
+
* only applies to folders and can lead to an error unless provided
|
|
7940
|
+
* if the folder is not empty.
|
|
8056
7941
|
*/
|
|
8057
|
-
|
|
7942
|
+
readonly recursive: boolean;
|
|
8058
7943
|
/**
|
|
8059
|
-
* Set
|
|
8060
|
-
*
|
|
8061
|
-
*
|
|
7944
|
+
* Set to `true` to attempt to move the file to trash
|
|
7945
|
+
* instead of deleting it permanently from disk. This
|
|
7946
|
+
* option maybe not be supported on all providers.
|
|
8062
7947
|
*/
|
|
8063
|
-
|
|
7948
|
+
readonly useTrash: boolean;
|
|
7949
|
+
}
|
|
7950
|
+
declare enum FileType {
|
|
8064
7951
|
/**
|
|
8065
|
-
*
|
|
8066
|
-
* @param selection The new selection
|
|
8067
|
-
* @param source Source of the call that caused the selection
|
|
7952
|
+
* File is unknown (neither file, directory nor symbolic link).
|
|
8068
7953
|
*/
|
|
8069
|
-
|
|
7954
|
+
Unknown = 0,
|
|
8070
7955
|
/**
|
|
8071
|
-
*
|
|
8072
|
-
* Cursors will be removed or added, as necessary.
|
|
8073
|
-
* @param selections The new selection
|
|
8074
|
-
* @param source Source of the call that caused the selection
|
|
7956
|
+
* File is a normal file.
|
|
8075
7957
|
*/
|
|
8076
|
-
|
|
7958
|
+
File = 1,
|
|
8077
7959
|
/**
|
|
8078
|
-
*
|
|
7960
|
+
* File is a directory.
|
|
8079
7961
|
*/
|
|
8080
|
-
|
|
7962
|
+
Directory = 2,
|
|
8081
7963
|
/**
|
|
8082
|
-
*
|
|
7964
|
+
* File is a symbolic link.
|
|
7965
|
+
*
|
|
7966
|
+
* Note: even when the file is a symbolic link, you can test for
|
|
7967
|
+
* `FileType.File` and `FileType.Directory` to know the type of
|
|
7968
|
+
* the target the link points to.
|
|
8083
7969
|
*/
|
|
8084
|
-
|
|
7970
|
+
SymbolicLink = 64
|
|
7971
|
+
}
|
|
7972
|
+
declare enum FilePermission {
|
|
8085
7973
|
/**
|
|
8086
|
-
*
|
|
7974
|
+
* File is readonly.
|
|
8087
7975
|
*/
|
|
8088
|
-
|
|
7976
|
+
Readonly = 1
|
|
7977
|
+
}
|
|
7978
|
+
interface IStat {
|
|
8089
7979
|
/**
|
|
8090
|
-
*
|
|
8091
|
-
* optimized for viewing a code definition.
|
|
7980
|
+
* The file type.
|
|
8092
7981
|
*/
|
|
8093
|
-
|
|
7982
|
+
readonly type: FileType;
|
|
8094
7983
|
/**
|
|
8095
|
-
*
|
|
7984
|
+
* The last modification date represented as millis from unix epoch.
|
|
8096
7985
|
*/
|
|
8097
|
-
|
|
7986
|
+
readonly mtime: number;
|
|
8098
7987
|
/**
|
|
8099
|
-
*
|
|
7988
|
+
* The creation date represented as millis from unix epoch.
|
|
8100
7989
|
*/
|
|
8101
|
-
|
|
7990
|
+
readonly ctime: number;
|
|
8102
7991
|
/**
|
|
8103
|
-
*
|
|
7992
|
+
* The size of the file in bytes.
|
|
8104
7993
|
*/
|
|
8105
|
-
|
|
7994
|
+
readonly size: number;
|
|
8106
7995
|
/**
|
|
8107
|
-
*
|
|
7996
|
+
* The file permissions.
|
|
8108
7997
|
*/
|
|
8109
|
-
|
|
7998
|
+
readonly permissions?: FilePermission;
|
|
7999
|
+
}
|
|
8000
|
+
interface IWatchOptions {
|
|
8110
8001
|
/**
|
|
8111
|
-
*
|
|
8112
|
-
*
|
|
8002
|
+
* Set to `true` to watch for changes recursively in a folder
|
|
8003
|
+
* and all of its children.
|
|
8113
8004
|
*/
|
|
8114
|
-
|
|
8005
|
+
readonly recursive: boolean;
|
|
8115
8006
|
/**
|
|
8116
|
-
*
|
|
8117
|
-
* optimized for viewing a code definition. Only if it lies outside the viewport.
|
|
8007
|
+
* A set of glob patterns or paths to exclude from watching.
|
|
8118
8008
|
*/
|
|
8119
|
-
|
|
8009
|
+
excludes: string[];
|
|
8120
8010
|
/**
|
|
8121
|
-
*
|
|
8122
|
-
*
|
|
8123
|
-
*
|
|
8124
|
-
* @param payload Extra data to be sent to the handler.
|
|
8011
|
+
* An optional set of glob patterns or paths to include for
|
|
8012
|
+
* watching. If not provided, all paths are considered for
|
|
8013
|
+
* events.
|
|
8125
8014
|
*/
|
|
8126
|
-
|
|
8015
|
+
includes?: Array<string | IRelativePattern>;
|
|
8016
|
+
}
|
|
8017
|
+
declare const enum FileSystemProviderCapabilities {
|
|
8127
8018
|
/**
|
|
8128
|
-
*
|
|
8019
|
+
* Provider supports unbuffered read/write.
|
|
8129
8020
|
*/
|
|
8130
|
-
|
|
8021
|
+
FileReadWrite = 2,
|
|
8131
8022
|
/**
|
|
8132
|
-
*
|
|
8133
|
-
* If the previous model was created by the editor via the value key in the options
|
|
8134
|
-
* literal object, it will be destroyed. Otherwise, if the previous model was set
|
|
8135
|
-
* via setModel, or the model key in the options literal object, the previous model
|
|
8136
|
-
* will not be destroyed.
|
|
8137
|
-
* It is safe to call setModel(null) to simply detach the current model from the editor.
|
|
8023
|
+
* Provider supports open/read/write/close low level file operations.
|
|
8138
8024
|
*/
|
|
8139
|
-
|
|
8025
|
+
FileOpenReadWriteClose = 4,
|
|
8140
8026
|
/**
|
|
8141
|
-
*
|
|
8142
|
-
* will get the ownerId of the editor (meaning they will not show up in other editors).
|
|
8143
|
-
* These decorations will be automatically cleared when the editor's model changes.
|
|
8027
|
+
* Provider supports stream based reading.
|
|
8144
8028
|
*/
|
|
8145
|
-
|
|
8029
|
+
FileReadStream = 16,
|
|
8146
8030
|
/**
|
|
8147
|
-
*
|
|
8148
|
-
* will get the ownerId of the editor (meaning they will not show up in other
|
|
8149
|
-
* editors).
|
|
8150
|
-
* @see {@link ITextModel.changeDecorations}
|
|
8151
|
-
* @internal
|
|
8031
|
+
* Provider supports copy operation.
|
|
8152
8032
|
*/
|
|
8153
|
-
|
|
8154
|
-
}
|
|
8155
|
-
/**
|
|
8156
|
-
* A diff editor.
|
|
8157
|
-
*
|
|
8158
|
-
* @internal
|
|
8159
|
-
*/
|
|
8160
|
-
interface IDiffEditor$1 extends IEditor {
|
|
8033
|
+
FileFolderCopy = 8,
|
|
8161
8034
|
/**
|
|
8162
|
-
*
|
|
8035
|
+
* Provider is path case sensitive.
|
|
8163
8036
|
*/
|
|
8164
|
-
|
|
8037
|
+
PathCaseSensitive = 1024,
|
|
8165
8038
|
/**
|
|
8166
|
-
*
|
|
8039
|
+
* All files of the provider are readonly.
|
|
8167
8040
|
*/
|
|
8168
|
-
|
|
8041
|
+
Readonly = 2048,
|
|
8169
8042
|
/**
|
|
8170
|
-
*
|
|
8043
|
+
* Provider supports to delete via trash.
|
|
8171
8044
|
*/
|
|
8172
|
-
|
|
8045
|
+
Trash = 4096,
|
|
8046
|
+
/**
|
|
8047
|
+
* Provider support to unlock files for writing.
|
|
8048
|
+
*/
|
|
8049
|
+
FileWriteUnlock = 8192,
|
|
8050
|
+
/**
|
|
8051
|
+
* Provider support to read files atomically. This implies the
|
|
8052
|
+
* provider provides the `FileReadWrite` capability too.
|
|
8053
|
+
*/
|
|
8054
|
+
FileAtomicRead = 16384,
|
|
8055
|
+
/**
|
|
8056
|
+
* Provider support to clone files atomically.
|
|
8057
|
+
*/
|
|
8058
|
+
FileClone = 32768
|
|
8059
|
+
}
|
|
8060
|
+
interface IFileSystemProvider {
|
|
8061
|
+
readonly capabilities: FileSystemProviderCapabilities;
|
|
8062
|
+
readonly onDidChangeCapabilities: Event<void>;
|
|
8063
|
+
readonly onDidChangeFile: Event<readonly IFileChange[]>;
|
|
8064
|
+
readonly onDidWatchError?: Event<string>;
|
|
8065
|
+
watch(resource: URI, opts: IWatchOptions): IDisposable;
|
|
8066
|
+
stat(resource: URI): Promise<IStat>;
|
|
8067
|
+
mkdir(resource: URI): Promise<void>;
|
|
8068
|
+
readdir(resource: URI): Promise<[string, FileType][]>;
|
|
8069
|
+
delete(resource: URI, opts: IFileDeleteOptions): Promise<void>;
|
|
8070
|
+
rename(from: URI, to: URI, opts: IFileOverwriteOptions): Promise<void>;
|
|
8071
|
+
copy?(from: URI, to: URI, opts: IFileOverwriteOptions): Promise<void>;
|
|
8072
|
+
readFile?(resource: URI): Promise<Uint8Array>;
|
|
8073
|
+
writeFile?(resource: URI, content: Uint8Array, opts: IFileWriteOptions): Promise<void>;
|
|
8074
|
+
readFileStream?(resource: URI, opts: IFileReadStreamOptions, token: CancellationToken): ReadableStreamEvents<Uint8Array>;
|
|
8075
|
+
open?(resource: URI, opts: IFileOpenOptions): Promise<number>;
|
|
8076
|
+
close?(fd: number): Promise<void>;
|
|
8077
|
+
read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>;
|
|
8078
|
+
write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>;
|
|
8079
|
+
cloneFile?(from: URI, to: URI): Promise<void>;
|
|
8080
|
+
}
|
|
8081
|
+
interface IFileSystemProviderRegistrationEvent {
|
|
8082
|
+
readonly added: boolean;
|
|
8083
|
+
readonly scheme: string;
|
|
8084
|
+
readonly provider?: IFileSystemProvider;
|
|
8085
|
+
}
|
|
8086
|
+
interface IFileSystemProviderCapabilitiesChangeEvent {
|
|
8087
|
+
readonly provider: IFileSystemProvider;
|
|
8088
|
+
readonly scheme: string;
|
|
8089
|
+
}
|
|
8090
|
+
interface IFileSystemProviderActivationEvent {
|
|
8091
|
+
readonly scheme: string;
|
|
8092
|
+
join(promise: Promise<void>): void;
|
|
8093
|
+
}
|
|
8094
|
+
declare const enum FileOperation {
|
|
8095
|
+
CREATE = 0,
|
|
8096
|
+
DELETE = 1,
|
|
8097
|
+
MOVE = 2,
|
|
8098
|
+
COPY = 3,
|
|
8099
|
+
WRITE = 4
|
|
8100
|
+
}
|
|
8101
|
+
interface IFileOperationEvent {
|
|
8102
|
+
readonly resource: URI;
|
|
8103
|
+
readonly operation: FileOperation;
|
|
8104
|
+
isOperation(operation: FileOperation.DELETE | FileOperation.WRITE): boolean;
|
|
8105
|
+
isOperation(operation: FileOperation.CREATE | FileOperation.MOVE | FileOperation.COPY): this is IFileOperationEventWithMetadata;
|
|
8106
|
+
}
|
|
8107
|
+
interface IFileOperationEventWithMetadata extends IFileOperationEvent {
|
|
8108
|
+
readonly target: IFileStatWithMetadata;
|
|
8109
|
+
}
|
|
8110
|
+
declare class FileOperationEvent implements IFileOperationEvent {
|
|
8111
|
+
readonly resource: URI;
|
|
8112
|
+
readonly operation: FileOperation;
|
|
8113
|
+
readonly target?: IFileStatWithMetadata | undefined;
|
|
8114
|
+
constructor(resource: URI, operation: FileOperation.DELETE | FileOperation.WRITE);
|
|
8115
|
+
constructor(resource: URI, operation: FileOperation.CREATE | FileOperation.MOVE | FileOperation.COPY, target: IFileStatWithMetadata);
|
|
8116
|
+
isOperation(operation: FileOperation.DELETE | FileOperation.WRITE): boolean;
|
|
8117
|
+
isOperation(operation: FileOperation.CREATE | FileOperation.MOVE | FileOperation.COPY): this is IFileOperationEventWithMetadata;
|
|
8173
8118
|
}
|
|
8174
8119
|
/**
|
|
8175
|
-
*
|
|
8120
|
+
* Possible changes that can occur to a file.
|
|
8176
8121
|
*/
|
|
8177
|
-
|
|
8122
|
+
declare const enum FileChangeType {
|
|
8123
|
+
UPDATED = 0,
|
|
8124
|
+
ADDED = 1,
|
|
8125
|
+
DELETED = 2
|
|
8126
|
+
}
|
|
8127
|
+
/**
|
|
8128
|
+
* Identifies a single change in a file.
|
|
8129
|
+
*/
|
|
8130
|
+
interface IFileChange {
|
|
8178
8131
|
/**
|
|
8179
|
-
*
|
|
8180
|
-
* but the change is not caused by us setting or clearing the collection.
|
|
8132
|
+
* The type of change that occurred to the file.
|
|
8181
8133
|
*/
|
|
8182
|
-
|
|
8134
|
+
readonly type: FileChangeType;
|
|
8183
8135
|
/**
|
|
8184
|
-
*
|
|
8136
|
+
* The unified resource identifier of the file that changed.
|
|
8185
8137
|
*/
|
|
8186
|
-
|
|
8138
|
+
readonly resource: URI;
|
|
8139
|
+
}
|
|
8140
|
+
declare class FileChangesEvent {
|
|
8141
|
+
private readonly added;
|
|
8142
|
+
private readonly updated;
|
|
8143
|
+
private readonly deleted;
|
|
8144
|
+
constructor(changes: readonly IFileChange[], ignorePathCasing: boolean);
|
|
8187
8145
|
/**
|
|
8188
|
-
*
|
|
8146
|
+
* Find out if the file change events match the provided resource.
|
|
8147
|
+
*
|
|
8148
|
+
* Note: when passing `FileChangeType.DELETED`, we consider a match
|
|
8149
|
+
* also when the parent of the resource got deleted.
|
|
8189
8150
|
*/
|
|
8190
|
-
|
|
8151
|
+
contains(resource: URI, ...types: FileChangeType[]): boolean;
|
|
8191
8152
|
/**
|
|
8192
|
-
*
|
|
8153
|
+
* Find out if the file change events either match the provided
|
|
8154
|
+
* resource, or contain a child of this resource.
|
|
8193
8155
|
*/
|
|
8194
|
-
|
|
8156
|
+
affects(resource: URI, ...types: FileChangeType[]): boolean;
|
|
8157
|
+
private doContains;
|
|
8195
8158
|
/**
|
|
8196
|
-
*
|
|
8159
|
+
* Returns if this event contains added files.
|
|
8197
8160
|
*/
|
|
8198
|
-
|
|
8161
|
+
gotAdded(): boolean;
|
|
8199
8162
|
/**
|
|
8200
|
-
*
|
|
8163
|
+
* Returns if this event contains deleted files.
|
|
8201
8164
|
*/
|
|
8202
|
-
|
|
8165
|
+
gotDeleted(): boolean;
|
|
8203
8166
|
/**
|
|
8204
|
-
*
|
|
8167
|
+
* Returns if this event contains updated files.
|
|
8205
8168
|
*/
|
|
8206
|
-
|
|
8169
|
+
gotUpdated(): boolean;
|
|
8170
|
+
/**
|
|
8171
|
+
* @deprecated use the `contains` or `affects` method to efficiently find
|
|
8172
|
+
* out if the event relates to a given resource. these methods ensure:
|
|
8173
|
+
* - that there is no expensive lookup needed (by using a `TernarySearchTree`)
|
|
8174
|
+
* - correctly handles `FileChangeType.DELETED` events
|
|
8175
|
+
*/
|
|
8176
|
+
readonly rawChanges: readonly IFileChange[];
|
|
8177
|
+
/**
|
|
8178
|
+
* @deprecated use the `contains` or `affects` method to efficiently find
|
|
8179
|
+
* out if the event relates to a given resource. these methods ensure:
|
|
8180
|
+
* - that there is no expensive lookup needed (by using a `TernarySearchTree`)
|
|
8181
|
+
* - correctly handles `FileChangeType.DELETED` events
|
|
8182
|
+
*/
|
|
8183
|
+
readonly rawAdded: URI[];
|
|
8184
|
+
/**
|
|
8185
|
+
* @deprecated use the `contains` or `affects` method to efficiently find
|
|
8186
|
+
* out if the event relates to a given resource. these methods ensure:
|
|
8187
|
+
* - that there is no expensive lookup needed (by using a `TernarySearchTree`)
|
|
8188
|
+
* - correctly handles `FileChangeType.DELETED` events
|
|
8189
|
+
*/
|
|
8190
|
+
readonly rawUpdated: URI[];
|
|
8191
|
+
/**
|
|
8192
|
+
* @deprecated use the `contains` or `affects` method to efficiently find
|
|
8193
|
+
* out if the event relates to a given resource. these methods ensure:
|
|
8194
|
+
* - that there is no expensive lookup needed (by using a `TernarySearchTree`)
|
|
8195
|
+
* - correctly handles `FileChangeType.DELETED` events
|
|
8196
|
+
*/
|
|
8197
|
+
readonly rawDeleted: URI[];
|
|
8207
8198
|
}
|
|
8208
|
-
|
|
8209
|
-
* @internal
|
|
8210
|
-
*/
|
|
8211
|
-
interface IThemeDecorationRenderOptions {
|
|
8212
|
-
backgroundColor?: string | ThemeColor;
|
|
8213
|
-
outline?: string;
|
|
8214
|
-
outlineColor?: string | ThemeColor;
|
|
8215
|
-
outlineStyle?: string;
|
|
8216
|
-
outlineWidth?: string;
|
|
8217
|
-
border?: string;
|
|
8218
|
-
borderColor?: string | ThemeColor;
|
|
8219
|
-
borderRadius?: string;
|
|
8220
|
-
borderSpacing?: string;
|
|
8221
|
-
borderStyle?: string;
|
|
8222
|
-
borderWidth?: string;
|
|
8223
|
-
fontStyle?: string;
|
|
8224
|
-
fontWeight?: string;
|
|
8225
|
-
fontSize?: string;
|
|
8226
|
-
textDecoration?: string;
|
|
8227
|
-
cursor?: string;
|
|
8228
|
-
color?: string | ThemeColor;
|
|
8229
|
-
opacity?: string;
|
|
8230
|
-
letterSpacing?: string;
|
|
8231
|
-
gutterIconPath?: UriComponents;
|
|
8232
|
-
gutterIconSize?: string;
|
|
8233
|
-
overviewRulerColor?: string | ThemeColor;
|
|
8199
|
+
interface IBaseFileStat {
|
|
8234
8200
|
/**
|
|
8235
|
-
*
|
|
8201
|
+
* The unified resource identifier of this file or folder.
|
|
8236
8202
|
*/
|
|
8237
|
-
|
|
8203
|
+
readonly resource: URI;
|
|
8238
8204
|
/**
|
|
8239
|
-
*
|
|
8205
|
+
* The name which is the last segment
|
|
8206
|
+
* of the {{path}}.
|
|
8240
8207
|
*/
|
|
8241
|
-
|
|
8208
|
+
readonly name: string;
|
|
8242
8209
|
/**
|
|
8243
|
-
*
|
|
8210
|
+
* The size of the file.
|
|
8211
|
+
*
|
|
8212
|
+
* The value may or may not be resolved as
|
|
8213
|
+
* it is optional.
|
|
8244
8214
|
*/
|
|
8245
|
-
|
|
8246
|
-
affectsLetterSpacing?: boolean;
|
|
8247
|
-
};
|
|
8215
|
+
readonly size?: number;
|
|
8248
8216
|
/**
|
|
8249
|
-
*
|
|
8217
|
+
* The last modification date represented as millis from unix epoch.
|
|
8218
|
+
*
|
|
8219
|
+
* The value may or may not be resolved as
|
|
8220
|
+
* it is optional.
|
|
8250
8221
|
*/
|
|
8251
|
-
|
|
8252
|
-
|
|
8253
|
-
|
|
8222
|
+
readonly mtime?: number;
|
|
8223
|
+
/**
|
|
8224
|
+
* The creation date represented as millis from unix epoch.
|
|
8225
|
+
*
|
|
8226
|
+
* The value may or may not be resolved as
|
|
8227
|
+
* it is optional.
|
|
8228
|
+
*/
|
|
8229
|
+
readonly ctime?: number;
|
|
8230
|
+
/**
|
|
8231
|
+
* A unique identifier thet represents the
|
|
8232
|
+
* current state of the file or directory.
|
|
8233
|
+
*
|
|
8234
|
+
* The value may or may not be resolved as
|
|
8235
|
+
* it is optional.
|
|
8236
|
+
*/
|
|
8237
|
+
readonly etag?: string;
|
|
8238
|
+
/**
|
|
8239
|
+
* The file is read-only.
|
|
8240
|
+
*/
|
|
8241
|
+
readonly readonly?: boolean;
|
|
8242
|
+
}
|
|
8243
|
+
interface IBaseFileStatWithMetadata extends Required<IBaseFileStat> {
|
|
8254
8244
|
}
|
|
8255
8245
|
/**
|
|
8256
|
-
*
|
|
8246
|
+
* A file resource with meta information and resolved children if any.
|
|
8257
8247
|
*/
|
|
8258
|
-
interface
|
|
8259
|
-
contentText?: string;
|
|
8260
|
-
contentIconPath?: UriComponents;
|
|
8261
|
-
border?: string;
|
|
8262
|
-
borderColor?: string | ThemeColor;
|
|
8263
|
-
borderRadius?: string;
|
|
8264
|
-
fontStyle?: string;
|
|
8265
|
-
fontWeight?: string;
|
|
8266
|
-
fontSize?: string;
|
|
8267
|
-
fontFamily?: string;
|
|
8268
|
-
textDecoration?: string;
|
|
8269
|
-
color?: string | ThemeColor;
|
|
8270
|
-
backgroundColor?: string | ThemeColor;
|
|
8271
|
-
opacity?: string;
|
|
8272
|
-
verticalAlign?: string;
|
|
8273
|
-
margin?: string;
|
|
8274
|
-
padding?: string;
|
|
8275
|
-
width?: string;
|
|
8276
|
-
height?: string;
|
|
8277
|
-
}
|
|
8278
|
-
/**
|
|
8279
|
-
* @internal
|
|
8280
|
-
*/
|
|
8281
|
-
interface IDecorationRenderOptions extends IThemeDecorationRenderOptions {
|
|
8282
|
-
isWholeLine?: boolean;
|
|
8283
|
-
rangeBehavior?: TrackedRangeStickiness;
|
|
8284
|
-
overviewRulerLane?: OverviewRulerLane;
|
|
8285
|
-
light?: IThemeDecorationRenderOptions;
|
|
8286
|
-
dark?: IThemeDecorationRenderOptions;
|
|
8287
|
-
}
|
|
8288
|
-
|
|
8289
|
-
interface IDiffComputationResult {
|
|
8290
|
-
quitEarly: boolean;
|
|
8291
|
-
identical: boolean;
|
|
8292
|
-
changes: ILineChange[];
|
|
8293
|
-
}
|
|
8294
|
-
/**
|
|
8295
|
-
* A change
|
|
8296
|
-
*/
|
|
8297
|
-
interface IChange {
|
|
8298
|
-
readonly originalStartLineNumber: number;
|
|
8299
|
-
readonly originalEndLineNumber: number;
|
|
8300
|
-
readonly modifiedStartLineNumber: number;
|
|
8301
|
-
readonly modifiedEndLineNumber: number;
|
|
8302
|
-
}
|
|
8303
|
-
/**
|
|
8304
|
-
* A character level change.
|
|
8305
|
-
*/
|
|
8306
|
-
interface ICharChange extends IChange {
|
|
8307
|
-
readonly originalStartColumn: number;
|
|
8308
|
-
readonly originalEndColumn: number;
|
|
8309
|
-
readonly modifiedStartColumn: number;
|
|
8310
|
-
readonly modifiedEndColumn: number;
|
|
8311
|
-
}
|
|
8312
|
-
/**
|
|
8313
|
-
* A line change
|
|
8314
|
-
*/
|
|
8315
|
-
interface ILineChange extends IChange {
|
|
8316
|
-
readonly charChanges: ICharChange[] | undefined;
|
|
8317
|
-
}
|
|
8318
|
-
|
|
8319
|
-
/**
|
|
8320
|
-
* A rich code editor.
|
|
8321
|
-
*/
|
|
8322
|
-
type ICodeEditor = monaco.editor.ICodeEditor
|
|
8323
|
-
/**
|
|
8324
|
-
* Information about a line in the diff editor
|
|
8325
|
-
*/
|
|
8326
|
-
interface IDiffLineInformation {
|
|
8327
|
-
readonly equivalentLineNumber: number;
|
|
8328
|
-
}
|
|
8329
|
-
/**
|
|
8330
|
-
* A rich diff editor.
|
|
8331
|
-
*/
|
|
8332
|
-
interface IDiffEditor extends IEditor {
|
|
8248
|
+
interface IFileStat extends IBaseFileStat {
|
|
8333
8249
|
/**
|
|
8334
|
-
*
|
|
8335
|
-
* @internal
|
|
8250
|
+
* The resource is a file.
|
|
8336
8251
|
*/
|
|
8337
|
-
readonly
|
|
8252
|
+
readonly isFile: boolean;
|
|
8338
8253
|
/**
|
|
8339
|
-
*
|
|
8340
|
-
* @internal
|
|
8254
|
+
* The resource is a directory.
|
|
8341
8255
|
*/
|
|
8342
|
-
readonly
|
|
8256
|
+
readonly isDirectory: boolean;
|
|
8343
8257
|
/**
|
|
8344
|
-
*
|
|
8345
|
-
*
|
|
8258
|
+
* The resource is a symbolic link. Note: even when the
|
|
8259
|
+
* file is a symbolic link, you can test for `FileType.File`
|
|
8260
|
+
* and `FileType.Directory` to know the type of the target
|
|
8261
|
+
* the link points to.
|
|
8346
8262
|
*/
|
|
8347
|
-
readonly
|
|
8263
|
+
readonly isSymbolicLink: boolean;
|
|
8348
8264
|
/**
|
|
8349
|
-
*
|
|
8265
|
+
* The children of the file stat or undefined if none.
|
|
8350
8266
|
*/
|
|
8351
|
-
|
|
8267
|
+
children: IFileStat[] | undefined;
|
|
8268
|
+
}
|
|
8269
|
+
interface IFileStatWithMetadata extends IFileStat, IBaseFileStatWithMetadata {
|
|
8270
|
+
readonly mtime: number;
|
|
8271
|
+
readonly ctime: number;
|
|
8272
|
+
readonly etag: string;
|
|
8273
|
+
readonly size: number;
|
|
8274
|
+
readonly readonly: boolean;
|
|
8275
|
+
readonly children: IFileStatWithMetadata[] | undefined;
|
|
8276
|
+
}
|
|
8277
|
+
interface IFileStatResult {
|
|
8278
|
+
readonly stat?: IFileStat;
|
|
8279
|
+
readonly success: boolean;
|
|
8280
|
+
}
|
|
8281
|
+
interface IFileStatWithPartialMetadata extends Omit<IFileStatWithMetadata, 'children'> {
|
|
8282
|
+
}
|
|
8283
|
+
interface IFileContent extends IBaseFileStatWithMetadata {
|
|
8352
8284
|
/**
|
|
8353
|
-
*
|
|
8354
|
-
* @event
|
|
8285
|
+
* The content of a file as buffer.
|
|
8355
8286
|
*/
|
|
8356
|
-
readonly
|
|
8287
|
+
readonly value: VSBuffer;
|
|
8288
|
+
}
|
|
8289
|
+
interface IFileStreamContent extends IBaseFileStatWithMetadata {
|
|
8357
8290
|
/**
|
|
8358
|
-
*
|
|
8291
|
+
* The content of a file as stream.
|
|
8359
8292
|
*/
|
|
8360
|
-
|
|
8293
|
+
readonly value: VSBufferReadableStream;
|
|
8294
|
+
}
|
|
8295
|
+
interface IBaseReadFileOptions extends IFileReadStreamOptions {
|
|
8361
8296
|
/**
|
|
8362
|
-
*
|
|
8297
|
+
* The optional etag parameter allows to return early from resolving the resource if
|
|
8298
|
+
* the contents on disk match the etag. This prevents accumulated reading of resources
|
|
8299
|
+
* that have been read already with the same etag.
|
|
8300
|
+
* It is the task of the caller to makes sure to handle this error case from the promise.
|
|
8363
8301
|
*/
|
|
8364
|
-
|
|
8302
|
+
readonly etag?: string;
|
|
8303
|
+
}
|
|
8304
|
+
interface IReadFileStreamOptions extends IBaseReadFileOptions {
|
|
8305
|
+
}
|
|
8306
|
+
interface IReadFileOptions extends IBaseReadFileOptions {
|
|
8365
8307
|
/**
|
|
8366
|
-
*
|
|
8308
|
+
* The optional `atomic` flag can be used to make sure
|
|
8309
|
+
* the `readFile` method is not running in parallel with
|
|
8310
|
+
* any `write` operations in the same process.
|
|
8311
|
+
*
|
|
8312
|
+
* Typically you should not need to use this flag but if
|
|
8313
|
+
* for example you are quickly reading a file right after
|
|
8314
|
+
* a file event occurred and the file changes a lot, there
|
|
8315
|
+
* is a chance that a read returns an empty or partial file
|
|
8316
|
+
* because a pending write has not finished yet.
|
|
8317
|
+
*
|
|
8318
|
+
* Note: this does not prevent the file from being written
|
|
8319
|
+
* to from a different process. If you need such atomic
|
|
8320
|
+
* operations, you better use a real database as storage.
|
|
8367
8321
|
*/
|
|
8368
|
-
|
|
8322
|
+
readonly atomic?: boolean;
|
|
8323
|
+
}
|
|
8324
|
+
interface IWriteFileOptions {
|
|
8369
8325
|
/**
|
|
8370
|
-
*
|
|
8371
|
-
* If the previous model was created by the editor via the value key in the options
|
|
8372
|
-
* literal object, it will be destroyed. Otherwise, if the previous model was set
|
|
8373
|
-
* via setModel, or the model key in the options literal object, the previous model
|
|
8374
|
-
* will not be destroyed.
|
|
8375
|
-
* It is safe to call setModel(null) to simply detach the current model from the editor.
|
|
8326
|
+
* The last known modification time of the file. This can be used to prevent dirty writes.
|
|
8376
8327
|
*/
|
|
8377
|
-
|
|
8328
|
+
readonly mtime?: number;
|
|
8378
8329
|
/**
|
|
8379
|
-
*
|
|
8330
|
+
* The etag of the file. This can be used to prevent dirty writes.
|
|
8380
8331
|
*/
|
|
8381
|
-
|
|
8332
|
+
readonly etag?: string;
|
|
8382
8333
|
/**
|
|
8383
|
-
*
|
|
8334
|
+
* Whether to attempt to unlock a file before writing.
|
|
8384
8335
|
*/
|
|
8385
|
-
|
|
8336
|
+
readonly unlock?: boolean;
|
|
8337
|
+
}
|
|
8338
|
+
interface IResolveFileOptions {
|
|
8386
8339
|
/**
|
|
8387
|
-
*
|
|
8340
|
+
* Automatically continue resolving children of a directory until the provided resources
|
|
8341
|
+
* are found.
|
|
8388
8342
|
*/
|
|
8389
|
-
|
|
8343
|
+
readonly resolveTo?: readonly URI[];
|
|
8390
8344
|
/**
|
|
8391
|
-
*
|
|
8392
|
-
* @internal
|
|
8345
|
+
* Automatically continue resolving children of a directory if the number of children is 1.
|
|
8393
8346
|
*/
|
|
8394
|
-
|
|
8347
|
+
readonly resolveSingleChildDescendants?: boolean;
|
|
8395
8348
|
/**
|
|
8396
|
-
*
|
|
8397
|
-
*
|
|
8349
|
+
* Will resolve mtime, ctime, size and etag of files if enabled. This can have a negative impact
|
|
8350
|
+
* on performance and thus should only be used when these values are required.
|
|
8398
8351
|
*/
|
|
8399
|
-
|
|
8352
|
+
readonly resolveMetadata?: boolean;
|
|
8353
|
+
}
|
|
8354
|
+
interface IResolveMetadataFileOptions extends IResolveFileOptions {
|
|
8355
|
+
readonly resolveMetadata: true;
|
|
8356
|
+
}
|
|
8357
|
+
interface ICreateFileOptions {
|
|
8400
8358
|
/**
|
|
8401
|
-
*
|
|
8402
|
-
*
|
|
8359
|
+
* Overwrite the file to create if it already exists on disk. Otherwise
|
|
8360
|
+
* an error will be thrown (FILE_MODIFIED_SINCE).
|
|
8403
8361
|
*/
|
|
8404
|
-
|
|
8362
|
+
readonly overwrite?: boolean;
|
|
8363
|
+
}
|
|
8364
|
+
|
|
8365
|
+
declare enum LogLevel {
|
|
8366
|
+
Trace = 0,
|
|
8367
|
+
Debug = 1,
|
|
8368
|
+
Info = 2,
|
|
8369
|
+
Warning = 3,
|
|
8370
|
+
Error = 4,
|
|
8371
|
+
Critical = 5,
|
|
8372
|
+
Off = 6
|
|
8373
|
+
}
|
|
8374
|
+
interface ILogger extends IDisposable {
|
|
8375
|
+
onDidChangeLogLevel: Event<LogLevel>;
|
|
8376
|
+
getLevel(): LogLevel;
|
|
8377
|
+
setLevel(level: LogLevel): void;
|
|
8378
|
+
trace(message: string, ...args: any[]): void;
|
|
8379
|
+
debug(message: string, ...args: any[]): void;
|
|
8380
|
+
info(message: string, ...args: any[]): void;
|
|
8381
|
+
warn(message: string, ...args: any[]): void;
|
|
8382
|
+
error(message: string | Error, ...args: any[]): void;
|
|
8383
|
+
critical(message: string | Error, ...args: any[]): void;
|
|
8405
8384
|
/**
|
|
8406
|
-
*
|
|
8385
|
+
* An operation to flush the contents. Can be synchronous.
|
|
8407
8386
|
*/
|
|
8408
|
-
|
|
8387
|
+
flush(): void;
|
|
8409
8388
|
}
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
interface ICodeEditorService {
|
|
8389
|
+
declare const ILogService: ServiceIdentifier<ILogService>;
|
|
8390
|
+
interface ILogService extends ILogger {
|
|
8413
8391
|
readonly _serviceBrand: undefined;
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
readonly onDiffEditorRemove: Event<IDiffEditor>;
|
|
8418
|
-
readonly onDidChangeTransientModelProperty: Event<ITextModel>;
|
|
8419
|
-
readonly onDecorationTypeRegistered: Event<string>;
|
|
8420
|
-
addCodeEditor(editor: ICodeEditor): void;
|
|
8421
|
-
removeCodeEditor(editor: ICodeEditor): void;
|
|
8422
|
-
listCodeEditors(): readonly ICodeEditor[];
|
|
8423
|
-
addDiffEditor(editor: IDiffEditor): void;
|
|
8424
|
-
removeDiffEditor(editor: IDiffEditor): void;
|
|
8425
|
-
listDiffEditors(): readonly IDiffEditor[];
|
|
8392
|
+
}
|
|
8393
|
+
|
|
8394
|
+
interface IExtUri {
|
|
8426
8395
|
/**
|
|
8427
|
-
*
|
|
8396
|
+
* Compares two uris.
|
|
8397
|
+
*
|
|
8398
|
+
* @param uri1 Uri
|
|
8399
|
+
* @param uri2 Uri
|
|
8400
|
+
* @param ignoreFragment Ignore the fragment (defaults to `false`)
|
|
8428
8401
|
*/
|
|
8429
|
-
|
|
8430
|
-
registerDecorationType(description: string, key: string, options: IDecorationRenderOptions, parentTypeKey?: string, editor?: ICodeEditor): void;
|
|
8431
|
-
removeDecorationType(key: string): void;
|
|
8432
|
-
resolveDecorationOptions(typeKey: string, writable: boolean): IModelDecorationOptions;
|
|
8433
|
-
resolveDecorationCSSRules(decorationTypeKey: string): CSSRuleList | null;
|
|
8434
|
-
setModelProperty(resource: URI, key: string, value: any): void;
|
|
8435
|
-
getModelProperty(resource: URI, key: string): any;
|
|
8436
|
-
setTransientModelProperty(model: ITextModel, key: string, value: any): void;
|
|
8437
|
-
getTransientModelProperty(model: ITextModel, key: string): any;
|
|
8438
|
-
getTransientModelProperties(model: ITextModel): [string, any][] | undefined;
|
|
8439
|
-
getActiveCodeEditor(): ICodeEditor | null;
|
|
8440
|
-
openCodeEditor(input: ITextResourceEditorInput, source: ICodeEditor | null, sideBySide?: boolean): Promise<ICodeEditor | null>;
|
|
8441
|
-
registerCodeEditorOpenHandler(handler: ICodeEditorOpenHandler): IDisposable;
|
|
8442
|
-
}
|
|
8443
|
-
interface ICodeEditorOpenHandler {
|
|
8444
|
-
(input: ITextResourceEditorInput, source: ICodeEditor | null, sideBySide?: boolean): Promise<ICodeEditor | null>;
|
|
8445
|
-
}
|
|
8446
|
-
|
|
8447
|
-
interface IDimension {
|
|
8448
|
-
readonly width: number;
|
|
8449
|
-
readonly height: number;
|
|
8450
|
-
}
|
|
8451
|
-
declare class Dimension implements IDimension {
|
|
8452
|
-
readonly width: number;
|
|
8453
|
-
readonly height: number;
|
|
8454
|
-
static readonly None: Dimension;
|
|
8455
|
-
constructor(width: number, height: number);
|
|
8456
|
-
with(width?: number, height?: number): Dimension;
|
|
8457
|
-
static is(obj: unknown): obj is IDimension;
|
|
8458
|
-
static lift(obj: IDimension): Dimension;
|
|
8459
|
-
static equals(a: Dimension | undefined, b: Dimension | undefined): boolean;
|
|
8460
|
-
}
|
|
8461
|
-
|
|
8462
|
-
interface ILayoutOffsetInfo {
|
|
8402
|
+
compare(uri1: URI, uri2: URI, ignoreFragment?: boolean): number;
|
|
8463
8403
|
/**
|
|
8464
|
-
*
|
|
8404
|
+
* Tests whether two uris are equal
|
|
8405
|
+
*
|
|
8406
|
+
* @param uri1 Uri
|
|
8407
|
+
* @param uri2 Uri
|
|
8408
|
+
* @param ignoreFragment Ignore the fragment (defaults to `false`)
|
|
8465
8409
|
*/
|
|
8466
|
-
|
|
8410
|
+
isEqual(uri1: URI | undefined, uri2: URI | undefined, ignoreFragment?: boolean): boolean;
|
|
8467
8411
|
/**
|
|
8468
|
-
*
|
|
8412
|
+
* Tests whether a `candidate` URI is a parent or equal of a given `base` URI.
|
|
8413
|
+
*
|
|
8414
|
+
* @param base A uri which is "longer" or at least same length as `parentCandidate`
|
|
8415
|
+
* @param parentCandidate A uri which is "shorter" or up to same length as `base`
|
|
8416
|
+
* @param ignoreFragment Ignore the fragment (defaults to `false`)
|
|
8469
8417
|
*/
|
|
8470
|
-
|
|
8471
|
-
}
|
|
8472
|
-
declare const ILayoutService: ServiceIdentifier<ILayoutService>;
|
|
8473
|
-
interface ILayoutService {
|
|
8474
|
-
readonly _serviceBrand: undefined;
|
|
8418
|
+
isEqualOrParent(base: URI, parentCandidate: URI, ignoreFragment?: boolean): boolean;
|
|
8475
8419
|
/**
|
|
8476
|
-
*
|
|
8420
|
+
* Creates a key from a resource URI to be used to resource comparison and for resource maps.
|
|
8421
|
+
* @see {@link ResourceMap}
|
|
8422
|
+
* @param uri Uri
|
|
8423
|
+
* @param ignoreFragment Ignore the fragment (defaults to `false`)
|
|
8477
8424
|
*/
|
|
8478
|
-
|
|
8425
|
+
getComparisonKey(uri: URI, ignoreFragment?: boolean): string;
|
|
8479
8426
|
/**
|
|
8480
|
-
*
|
|
8427
|
+
* Whether the casing of the path-component of the uri should be ignored.
|
|
8481
8428
|
*/
|
|
8482
|
-
|
|
8429
|
+
ignorePathCasing(uri: URI): boolean;
|
|
8430
|
+
basenameOrAuthority(resource: URI): string;
|
|
8483
8431
|
/**
|
|
8484
|
-
*
|
|
8485
|
-
*
|
|
8486
|
-
* **NOTE**: In the standalone editor case, multiple editors can be created on a page.
|
|
8487
|
-
* Therefore, in the standalone editor case, there are multiple containers, not just
|
|
8488
|
-
* a single one. If you ship code that needs a "container" for the standalone editor,
|
|
8489
|
-
* please use `ICodeEditorService` to get the current focused code editor and use its
|
|
8490
|
-
* container if necessary. You can also instantiate `EditorScopedLayoutService`
|
|
8491
|
-
* which implements `ILayoutService` but is not a part of the service collection because
|
|
8492
|
-
* it is code editor instance specific.
|
|
8493
|
-
*
|
|
8432
|
+
* Returns the basename of the path component of an uri.
|
|
8433
|
+
* @param resource
|
|
8494
8434
|
*/
|
|
8495
|
-
|
|
8435
|
+
basename(resource: URI): string;
|
|
8496
8436
|
/**
|
|
8497
|
-
*
|
|
8437
|
+
* Returns the extension of the path component of an uri.
|
|
8438
|
+
* @param resource
|
|
8498
8439
|
*/
|
|
8499
|
-
|
|
8440
|
+
extname(resource: URI): string;
|
|
8500
8441
|
/**
|
|
8501
|
-
*
|
|
8502
|
-
*
|
|
8442
|
+
* Return a URI representing the directory of a URI path.
|
|
8443
|
+
*
|
|
8444
|
+
* @param resource The input URI.
|
|
8445
|
+
* @returns The URI representing the directory of the input URI.
|
|
8503
8446
|
*/
|
|
8504
|
-
|
|
8447
|
+
dirname(resource: URI): URI;
|
|
8505
8448
|
/**
|
|
8506
|
-
*
|
|
8449
|
+
* Join a URI path with path fragments and normalizes the resulting path.
|
|
8450
|
+
*
|
|
8451
|
+
* @param resource The input URI.
|
|
8452
|
+
* @param pathFragment The path fragment to add to the URI path.
|
|
8453
|
+
* @returns The resulting URI.
|
|
8507
8454
|
*/
|
|
8508
|
-
|
|
8509
|
-
}
|
|
8510
|
-
|
|
8511
|
-
interface IPropertyData {
|
|
8512
|
-
classification: 'SystemMetaData' | 'CallstackOrException' | 'CustomerContent' | 'PublicNonPersonalData' | 'EndUserPseudonymizedInformation';
|
|
8513
|
-
purpose: 'PerformanceAndHealth' | 'FeatureInsight' | 'BusinessInsight';
|
|
8514
|
-
comment?: string;
|
|
8515
|
-
expiration?: string;
|
|
8516
|
-
endpoint?: string;
|
|
8517
|
-
isMeasurement?: boolean;
|
|
8518
|
-
}
|
|
8519
|
-
interface IGDPRProperty {
|
|
8520
|
-
owner?: string;
|
|
8521
|
-
comment?: string;
|
|
8522
|
-
expiration?: string;
|
|
8523
|
-
readonly [name: string]: IPropertyData | undefined | IGDPRProperty | string;
|
|
8524
|
-
}
|
|
8525
|
-
declare type IGDPRPropertyWithoutMetadata<T> = Omit<T, 'owner' | 'comment' | 'expiration'>;
|
|
8526
|
-
declare type ClassifiedEvent<T extends IGDPRProperty> = {
|
|
8527
|
-
[k in keyof IGDPRPropertyWithoutMetadata<T>]: any;
|
|
8528
|
-
};
|
|
8529
|
-
declare type StrictPropertyChecker<TEvent, TClassifiedEvent, TError> = keyof TEvent extends keyof TClassifiedEvent ? keyof TClassifiedEvent extends keyof TEvent ? TEvent : TError : TError;
|
|
8530
|
-
declare type StrictPropertyCheckError = {
|
|
8531
|
-
error: 'Type of classified event does not match event properties';
|
|
8532
|
-
};
|
|
8533
|
-
declare type StrictPropertyCheck<T extends IGDPRProperty, E> = StrictPropertyChecker<E, ClassifiedEvent<T>, StrictPropertyCheckError>;
|
|
8534
|
-
declare type GDPRClassification<T> = {
|
|
8535
|
-
[_ in keyof T]: IPropertyData | IGDPRProperty | undefined | string;
|
|
8536
|
-
};
|
|
8537
|
-
|
|
8538
|
-
/**
|
|
8539
|
-
* @deprecated Use {@link IObservable} instead.
|
|
8540
|
-
*/
|
|
8541
|
-
interface IObservableValue<T> {
|
|
8542
|
-
onDidChange: Event<T>;
|
|
8543
|
-
readonly value: T;
|
|
8544
|
-
}
|
|
8545
|
-
|
|
8546
|
-
interface ITelemetryInfo {
|
|
8547
|
-
sessionId: string;
|
|
8548
|
-
machineId: string;
|
|
8549
|
-
firstSessionDate: string;
|
|
8550
|
-
msftInternal?: boolean;
|
|
8551
|
-
}
|
|
8552
|
-
interface ITelemetryData {
|
|
8553
|
-
from?: string;
|
|
8554
|
-
target?: string;
|
|
8555
|
-
[key: string]: any;
|
|
8556
|
-
}
|
|
8557
|
-
declare const ITelemetryService: ServiceIdentifier<ITelemetryService>;
|
|
8558
|
-
interface ITelemetryService {
|
|
8455
|
+
joinPath(resource: URI, ...pathFragment: string[]): URI;
|
|
8559
8456
|
/**
|
|
8560
|
-
*
|
|
8457
|
+
* Normalizes the path part of a URI: Resolves `.` and `..` elements with directory names.
|
|
8458
|
+
*
|
|
8459
|
+
* @param resource The URI to normalize the path.
|
|
8460
|
+
* @returns The URI with the normalized path.
|
|
8561
8461
|
*/
|
|
8562
|
-
|
|
8563
|
-
readonly _serviceBrand: undefined;
|
|
8462
|
+
normalizePath(resource: URI): URI;
|
|
8564
8463
|
/**
|
|
8565
|
-
*
|
|
8464
|
+
*
|
|
8465
|
+
* @param from
|
|
8466
|
+
* @param to
|
|
8566
8467
|
*/
|
|
8567
|
-
|
|
8468
|
+
relativePath(from: URI, to: URI): string | undefined;
|
|
8568
8469
|
/**
|
|
8569
|
-
*
|
|
8570
|
-
*
|
|
8470
|
+
* Resolves an absolute or relative path against a base URI.
|
|
8471
|
+
* The path can be relative or absolute posix or a Windows path
|
|
8571
8472
|
*/
|
|
8572
|
-
|
|
8473
|
+
resolvePath(base: URI, path: string): URI;
|
|
8573
8474
|
/**
|
|
8574
|
-
*
|
|
8475
|
+
* Returns true if the URI path is absolute.
|
|
8575
8476
|
*/
|
|
8576
|
-
|
|
8577
|
-
publicLogError2<E extends ClassifiedEvent<T> = never, T extends GDPRClassification<T> = never>(eventName: string, data?: StrictPropertyCheck<T, E>): Promise<void>;
|
|
8578
|
-
getTelemetryInfo(): Promise<ITelemetryInfo>;
|
|
8579
|
-
setExperimentProperty(name: string, value: string): void;
|
|
8580
|
-
readonly telemetryLevel: IObservableValue<TelemetryLevel>;
|
|
8581
|
-
}
|
|
8582
|
-
declare const enum TelemetryLevel {
|
|
8583
|
-
NONE = 0,
|
|
8584
|
-
CRASH = 1,
|
|
8585
|
-
ERROR = 2,
|
|
8586
|
-
USAGE = 3
|
|
8587
|
-
}
|
|
8588
|
-
|
|
8589
|
-
declare type DialogType = 'none' | 'info' | 'error' | 'question' | 'warning';
|
|
8590
|
-
interface ICheckbox {
|
|
8591
|
-
readonly label: string;
|
|
8592
|
-
readonly checked?: boolean;
|
|
8593
|
-
}
|
|
8594
|
-
interface IConfirmation {
|
|
8595
|
-
readonly title?: string;
|
|
8596
|
-
readonly type?: DialogType;
|
|
8597
|
-
readonly message: string;
|
|
8598
|
-
readonly detail?: string;
|
|
8599
|
-
readonly primaryButton?: string;
|
|
8600
|
-
readonly secondaryButton?: string;
|
|
8601
|
-
readonly checkbox?: ICheckbox;
|
|
8602
|
-
}
|
|
8603
|
-
interface IConfirmationResult {
|
|
8477
|
+
isAbsolutePath(resource: URI): boolean;
|
|
8604
8478
|
/**
|
|
8605
|
-
*
|
|
8606
|
-
* pressed.
|
|
8479
|
+
* Tests whether the two authorities are the same
|
|
8607
8480
|
*/
|
|
8608
|
-
|
|
8481
|
+
isEqualAuthority(a1: string, a2: string): boolean;
|
|
8609
8482
|
/**
|
|
8610
|
-
*
|
|
8611
|
-
* with the checkbox option defined.
|
|
8483
|
+
* Returns true if the URI path has a trailing path separator
|
|
8612
8484
|
*/
|
|
8613
|
-
|
|
8614
|
-
}
|
|
8615
|
-
interface IShowResult {
|
|
8485
|
+
hasTrailingPathSeparator(resource: URI, sep?: string): boolean;
|
|
8616
8486
|
/**
|
|
8617
|
-
*
|
|
8618
|
-
*
|
|
8619
|
-
* option then promise with index `0` is returned.
|
|
8487
|
+
* Removes a trailing path separator, if there's one.
|
|
8488
|
+
* Important: Doesn't remove the first slash, it would make the URI invalid
|
|
8620
8489
|
*/
|
|
8621
|
-
|
|
8490
|
+
removeTrailingPathSeparator(resource: URI, sep?: string): URI;
|
|
8622
8491
|
/**
|
|
8623
|
-
*
|
|
8624
|
-
*
|
|
8492
|
+
* Adds a trailing path separator to the URI if there isn't one already.
|
|
8493
|
+
* For example, c:\ would be unchanged, but c:\users would become c:\users\
|
|
8625
8494
|
*/
|
|
8626
|
-
|
|
8495
|
+
addTrailingPathSeparator(resource: URI, sep?: string): URI;
|
|
8627
8496
|
}
|
|
8628
|
-
|
|
8497
|
+
|
|
8498
|
+
declare const IUriIdentityService: ServiceIdentifier<IUriIdentityService>;
|
|
8499
|
+
interface IUriIdentityService {
|
|
8500
|
+
readonly _serviceBrand: undefined;
|
|
8629
8501
|
/**
|
|
8630
|
-
*
|
|
8631
|
-
* or `undefined` if none.
|
|
8502
|
+
* Uri extensions that are aware of casing.
|
|
8632
8503
|
*/
|
|
8633
|
-
readonly
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8648
|
-
|
|
8649
|
-
|
|
8650
|
-
|
|
8651
|
-
|
|
8652
|
-
|
|
8653
|
-
|
|
8654
|
-
|
|
8655
|
-
|
|
8504
|
+
readonly extUri: IExtUri;
|
|
8505
|
+
/**
|
|
8506
|
+
* Returns a canonical uri for the given resource. Different uris can point to the same
|
|
8507
|
+
* resource. That's because of casing or missing normalization, e.g the following uris
|
|
8508
|
+
* are different but refer to the same document (because windows paths are not case-sensitive)
|
|
8509
|
+
*
|
|
8510
|
+
* ```txt
|
|
8511
|
+
* file:///c:/foo/bar.txt
|
|
8512
|
+
* file:///c:/FOO/BAR.txt
|
|
8513
|
+
* ```
|
|
8514
|
+
*
|
|
8515
|
+
* This function should be invoked when feeding uris into the system that represent the truth,
|
|
8516
|
+
* e.g document uris or marker-to-document associations etc. This function should NOT be called
|
|
8517
|
+
* to pretty print a label nor to sanitize a uri.
|
|
8518
|
+
*
|
|
8519
|
+
* Samples:
|
|
8520
|
+
*
|
|
8521
|
+
* | in | out | |
|
|
8522
|
+
* |---|---|---|
|
|
8523
|
+
* | `file:///foo/bar/../bar` | `file:///foo/bar` | n/a |
|
|
8524
|
+
* | `file:///foo/bar/../bar#frag` | `file:///foo/bar#frag` | keep fragment |
|
|
8525
|
+
* | `file:///foo/BAR` | `file:///foo/bar` | assume ignore case |
|
|
8526
|
+
* | `file:///foo/bar/../BAR?q=2` | `file:///foo/BAR?q=2` | query makes it a different document |
|
|
8527
|
+
*/
|
|
8528
|
+
asCanonicalUri(uri: URI): URI;
|
|
8656
8529
|
}
|
|
8657
|
-
|
|
8530
|
+
|
|
8658
8531
|
/**
|
|
8659
|
-
*
|
|
8660
|
-
*
|
|
8661
|
-
* Note: use the `INotificationService.prompt()` method for a non-modal way to ask
|
|
8662
|
-
* the user for input.
|
|
8532
|
+
* Flags to indicate whether to use the default profile or not.
|
|
8663
8533
|
*/
|
|
8664
|
-
|
|
8534
|
+
declare type UseDefaultProfileFlags = {
|
|
8535
|
+
settings?: boolean;
|
|
8536
|
+
keybindings?: boolean;
|
|
8537
|
+
tasks?: boolean;
|
|
8538
|
+
snippets?: boolean;
|
|
8539
|
+
extensions?: boolean;
|
|
8540
|
+
uiState?: boolean;
|
|
8541
|
+
};
|
|
8542
|
+
interface IUserDataProfile {
|
|
8543
|
+
readonly id: string;
|
|
8544
|
+
readonly isDefault: boolean;
|
|
8545
|
+
readonly name: string;
|
|
8546
|
+
readonly location: URI;
|
|
8547
|
+
readonly globalStorageHome: URI;
|
|
8548
|
+
readonly settingsResource: URI;
|
|
8549
|
+
readonly keybindingsResource: URI;
|
|
8550
|
+
readonly tasksResource: URI;
|
|
8551
|
+
readonly snippetsHome: URI;
|
|
8552
|
+
readonly extensionsResource: URI | undefined;
|
|
8553
|
+
readonly useDefaultFlags?: UseDefaultProfileFlags;
|
|
8554
|
+
}
|
|
8555
|
+
|
|
8556
|
+
declare enum WillSaveStateReason {
|
|
8557
|
+
/**
|
|
8558
|
+
* No specific reason to save state.
|
|
8559
|
+
*/
|
|
8560
|
+
NONE = 0,
|
|
8561
|
+
/**
|
|
8562
|
+
* A hint that the workbench is about to shutdown.
|
|
8563
|
+
*/
|
|
8564
|
+
SHUTDOWN = 1
|
|
8565
|
+
}
|
|
8566
|
+
interface IWillSaveStateEvent {
|
|
8567
|
+
readonly reason: WillSaveStateReason;
|
|
8568
|
+
}
|
|
8569
|
+
declare const IStorageService: ServiceIdentifier<IStorageService>;
|
|
8570
|
+
interface IStorageService {
|
|
8665
8571
|
readonly _serviceBrand: undefined;
|
|
8666
8572
|
/**
|
|
8667
|
-
*
|
|
8573
|
+
* Emitted whenever data is updated or deleted.
|
|
8668
8574
|
*/
|
|
8669
|
-
|
|
8575
|
+
readonly onDidChangeValue: Event<IStorageValueChangeEvent>;
|
|
8670
8576
|
/**
|
|
8671
|
-
*
|
|
8577
|
+
* Emitted whenever target of a storage entry changes.
|
|
8672
8578
|
*/
|
|
8673
|
-
|
|
8579
|
+
readonly onDidChangeTarget: Event<IStorageTargetChangeEvent>;
|
|
8674
8580
|
/**
|
|
8675
|
-
*
|
|
8581
|
+
* Emitted when the storage is about to persist. This is the right time
|
|
8582
|
+
* to persist data to ensure it is stored before the application shuts
|
|
8583
|
+
* down.
|
|
8584
|
+
*
|
|
8585
|
+
* The will save state event allows to optionally ask for the reason of
|
|
8586
|
+
* saving the state, e.g. to find out if the state is saved due to a
|
|
8587
|
+
* shutdown.
|
|
8588
|
+
*
|
|
8589
|
+
* Note: this event may be fired many times, not only on shutdown to prevent
|
|
8590
|
+
* loss of state in situations where the shutdown is not sufficient to
|
|
8591
|
+
* persist the data properly.
|
|
8676
8592
|
*/
|
|
8677
|
-
|
|
8593
|
+
readonly onWillSaveState: Event<IWillSaveStateEvent>;
|
|
8678
8594
|
/**
|
|
8679
|
-
*
|
|
8595
|
+
* Retrieve an element stored with the given key from storage. Use
|
|
8596
|
+
* the provided `defaultValue` if the element is `null` or `undefined`.
|
|
8680
8597
|
*
|
|
8681
|
-
* @param
|
|
8682
|
-
*
|
|
8683
|
-
|
|
8684
|
-
|
|
8598
|
+
* @param scope allows to define the scope of the storage operation
|
|
8599
|
+
* to either the current workspace only, all workspaces or all profiles.
|
|
8600
|
+
*/
|
|
8601
|
+
get(key: string, scope: StorageScope, fallbackValue: string): string;
|
|
8602
|
+
get(key: string, scope: StorageScope, fallbackValue?: string): string | undefined;
|
|
8603
|
+
/**
|
|
8604
|
+
* Retrieve an element stored with the given key from storage. Use
|
|
8605
|
+
* the provided `defaultValue` if the element is `null` or `undefined`.
|
|
8606
|
+
* The element will be converted to a `boolean`.
|
|
8685
8607
|
*
|
|
8686
|
-
* @
|
|
8687
|
-
*
|
|
8688
|
-
* option then promise with index `0` is returned.
|
|
8608
|
+
* @param scope allows to define the scope of the storage operation
|
|
8609
|
+
* to either the current workspace only, all workspaces or all profiles.
|
|
8689
8610
|
*/
|
|
8690
|
-
|
|
8611
|
+
getBoolean(key: string, scope: StorageScope, fallbackValue: boolean): boolean;
|
|
8612
|
+
getBoolean(key: string, scope: StorageScope, fallbackValue?: boolean): boolean | undefined;
|
|
8691
8613
|
/**
|
|
8692
|
-
*
|
|
8614
|
+
* Retrieve an element stored with the given key from storage. Use
|
|
8615
|
+
* the provided `defaultValue` if the element is `null` or `undefined`.
|
|
8616
|
+
* The element will be converted to a `number` using `parseInt` with a
|
|
8617
|
+
* base of `10`.
|
|
8693
8618
|
*
|
|
8694
|
-
*
|
|
8695
|
-
*
|
|
8696
|
-
* option then promise with index `0` is returned. In addition, the values for the
|
|
8697
|
-
* inputs are returned as well.
|
|
8619
|
+
* @param scope allows to define the scope of the storage operation
|
|
8620
|
+
* to either the current workspace only, all workspaces or all profiles.
|
|
8698
8621
|
*/
|
|
8699
|
-
|
|
8622
|
+
getNumber(key: string, scope: StorageScope, fallbackValue: number): number;
|
|
8623
|
+
getNumber(key: string, scope: StorageScope, fallbackValue?: number): number | undefined;
|
|
8700
8624
|
/**
|
|
8701
|
-
*
|
|
8625
|
+
* Store a value under the given key to storage. The value will be
|
|
8626
|
+
* converted to a `string`. Storing either `undefined` or `null` will
|
|
8627
|
+
* remove the entry under the key.
|
|
8628
|
+
*
|
|
8629
|
+
* @param scope allows to define the scope of the storage operation
|
|
8630
|
+
* to either the current workspace only, all workspaces or all profiles.
|
|
8631
|
+
*
|
|
8632
|
+
* @param target allows to define the target of the storage operation
|
|
8633
|
+
* to either the current machine or user.
|
|
8702
8634
|
*/
|
|
8703
|
-
|
|
8704
|
-
}
|
|
8705
|
-
declare const enum ConfirmResult {
|
|
8706
|
-
SAVE = 0,
|
|
8707
|
-
DONT_SAVE = 1,
|
|
8708
|
-
CANCEL = 2
|
|
8709
|
-
}
|
|
8710
|
-
|
|
8711
|
-
declare class UndoRedoSource {
|
|
8712
|
-
private static _ID;
|
|
8713
|
-
readonly id: number;
|
|
8714
|
-
private order;
|
|
8715
|
-
constructor();
|
|
8716
|
-
nextOrder(): number;
|
|
8717
|
-
static None: UndoRedoSource;
|
|
8718
|
-
}
|
|
8719
|
-
|
|
8720
|
-
interface IRelativePattern {
|
|
8635
|
+
store(key: string, value: string | boolean | number | undefined | null, scope: StorageScope, target: StorageTarget): void;
|
|
8721
8636
|
/**
|
|
8722
|
-
*
|
|
8637
|
+
* Delete an element stored under the provided key from storage.
|
|
8638
|
+
*
|
|
8639
|
+
* The scope argument allows to define the scope of the storage
|
|
8640
|
+
* operation to either the current workspace only, all workspaces
|
|
8641
|
+
* or all profiles.
|
|
8723
8642
|
*/
|
|
8724
|
-
|
|
8643
|
+
remove(key: string, scope: StorageScope): void;
|
|
8725
8644
|
/**
|
|
8726
|
-
*
|
|
8727
|
-
*
|
|
8645
|
+
* Returns all the keys used in the storage for the provided `scope`
|
|
8646
|
+
* and `target`.
|
|
8728
8647
|
*
|
|
8729
|
-
*
|
|
8730
|
-
*
|
|
8648
|
+
* Note: this will NOT return all keys stored in the storage layer.
|
|
8649
|
+
* Some keys may not have an associated `StorageTarget` and thus
|
|
8650
|
+
* will be excluded from the results.
|
|
8651
|
+
*
|
|
8652
|
+
* @param scope allows to define the scope for the keys
|
|
8653
|
+
* to either the current workspace only, all workspaces or all profiles.
|
|
8654
|
+
*
|
|
8655
|
+
* @param target allows to define the target for the keys
|
|
8656
|
+
* to either the current machine or user.
|
|
8731
8657
|
*/
|
|
8732
|
-
|
|
8733
|
-
}
|
|
8734
|
-
|
|
8735
|
-
interface LanguageFilter {
|
|
8736
|
-
readonly language?: string;
|
|
8737
|
-
readonly scheme?: string;
|
|
8738
|
-
readonly pattern?: string | IRelativePattern;
|
|
8739
|
-
readonly notebookType?: string;
|
|
8658
|
+
keys(scope: StorageScope, target: StorageTarget): string[];
|
|
8740
8659
|
/**
|
|
8741
|
-
*
|
|
8660
|
+
* Log the contents of the storage to the console.
|
|
8742
8661
|
*/
|
|
8743
|
-
|
|
8744
|
-
|
|
8662
|
+
log(): void;
|
|
8663
|
+
/**
|
|
8664
|
+
* Switch storage to another workspace or profile. Optionally preserve the
|
|
8665
|
+
* current data to the new storage.
|
|
8666
|
+
*/
|
|
8667
|
+
switch(to: IAnyWorkspaceIdentifier | IUserDataProfile, preserveData: boolean): Promise<void>;
|
|
8668
|
+
/**
|
|
8669
|
+
* Whether the storage for the given scope was created during this session or
|
|
8670
|
+
* existed before.
|
|
8671
|
+
*/
|
|
8672
|
+
isNew(scope: StorageScope): boolean;
|
|
8673
|
+
/**
|
|
8674
|
+
* Allows to flush state, e.g. in cases where a shutdown is
|
|
8675
|
+
* imminent. This will send out the `onWillSaveState` to ask
|
|
8676
|
+
* everyone for latest state.
|
|
8677
|
+
*
|
|
8678
|
+
* @returns a `Promise` that can be awaited on when all updates
|
|
8679
|
+
* to the underlying storage have been flushed.
|
|
8680
|
+
*/
|
|
8681
|
+
flush(reason?: WillSaveStateReason): Promise<void>;
|
|
8745
8682
|
}
|
|
8746
|
-
declare
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8683
|
+
declare const enum StorageScope {
|
|
8684
|
+
/**
|
|
8685
|
+
* The stored data will be scoped to all workspaces across all profiles.
|
|
8686
|
+
*/
|
|
8687
|
+
APPLICATION = -1,
|
|
8688
|
+
/**
|
|
8689
|
+
* The stored data will be scoped to all workspaces of the same profile.
|
|
8690
|
+
*/
|
|
8691
|
+
PROFILE = 0,
|
|
8692
|
+
/**
|
|
8693
|
+
* The stored data will be scoped to the current workspace.
|
|
8694
|
+
*/
|
|
8695
|
+
WORKSPACE = 1
|
|
8751
8696
|
}
|
|
8752
|
-
|
|
8753
|
-
|
|
8697
|
+
declare const enum StorageTarget {
|
|
8698
|
+
/**
|
|
8699
|
+
* The stored data is user specific and applies across machines.
|
|
8700
|
+
*/
|
|
8701
|
+
USER = 0,
|
|
8702
|
+
/**
|
|
8703
|
+
* The stored data is machine specific.
|
|
8704
|
+
*/
|
|
8705
|
+
MACHINE = 1
|
|
8754
8706
|
}
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
readonly
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
|
|
8765
|
-
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8770
|
-
|
|
8707
|
+
interface IStorageValueChangeEvent {
|
|
8708
|
+
/**
|
|
8709
|
+
* The scope for the storage entry that changed
|
|
8710
|
+
* or was removed.
|
|
8711
|
+
*/
|
|
8712
|
+
readonly scope: StorageScope;
|
|
8713
|
+
/**
|
|
8714
|
+
* The `key` of the storage entry that was changed
|
|
8715
|
+
* or was removed.
|
|
8716
|
+
*/
|
|
8717
|
+
readonly key: string;
|
|
8718
|
+
/**
|
|
8719
|
+
* The `target` can be `undefined` if a key is being
|
|
8720
|
+
* removed.
|
|
8721
|
+
*/
|
|
8722
|
+
readonly target: StorageTarget | undefined;
|
|
8771
8723
|
}
|
|
8772
|
-
|
|
8773
|
-
|
|
8774
|
-
|
|
8775
|
-
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
Critical = 5,
|
|
8780
|
-
Off = 6
|
|
8724
|
+
interface IStorageTargetChangeEvent {
|
|
8725
|
+
/**
|
|
8726
|
+
* The scope for the target that changed. Listeners
|
|
8727
|
+
* should use `keys(scope, target)` to get an updated
|
|
8728
|
+
* list of keys for the given `scope` and `target`.
|
|
8729
|
+
*/
|
|
8730
|
+
readonly scope: StorageScope;
|
|
8781
8731
|
}
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
|
|
8788
|
-
|
|
8789
|
-
|
|
8790
|
-
error(message: string | Error, ...args: any[]): void;
|
|
8791
|
-
critical(message: string | Error, ...args: any[]): void;
|
|
8732
|
+
|
|
8733
|
+
/**
|
|
8734
|
+
* Virtual Key Codes, the value does not hold any inherent meaning.
|
|
8735
|
+
* Inspired somewhat from https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
|
|
8736
|
+
* But these are "more general", as they should work across browsers & OS`s.
|
|
8737
|
+
*/
|
|
8738
|
+
declare const enum KeyCode {
|
|
8739
|
+
DependsOnKbLayout = -1,
|
|
8792
8740
|
/**
|
|
8793
|
-
*
|
|
8741
|
+
* Placed first to cover the 0 value of the enum.
|
|
8794
8742
|
*/
|
|
8795
|
-
|
|
8743
|
+
Unknown = 0,
|
|
8744
|
+
Backspace = 1,
|
|
8745
|
+
Tab = 2,
|
|
8746
|
+
Enter = 3,
|
|
8747
|
+
Shift = 4,
|
|
8748
|
+
Ctrl = 5,
|
|
8749
|
+
Alt = 6,
|
|
8750
|
+
PauseBreak = 7,
|
|
8751
|
+
CapsLock = 8,
|
|
8752
|
+
Escape = 9,
|
|
8753
|
+
Space = 10,
|
|
8754
|
+
PageUp = 11,
|
|
8755
|
+
PageDown = 12,
|
|
8756
|
+
End = 13,
|
|
8757
|
+
Home = 14,
|
|
8758
|
+
LeftArrow = 15,
|
|
8759
|
+
UpArrow = 16,
|
|
8760
|
+
RightArrow = 17,
|
|
8761
|
+
DownArrow = 18,
|
|
8762
|
+
Insert = 19,
|
|
8763
|
+
Delete = 20,
|
|
8764
|
+
Digit0 = 21,
|
|
8765
|
+
Digit1 = 22,
|
|
8766
|
+
Digit2 = 23,
|
|
8767
|
+
Digit3 = 24,
|
|
8768
|
+
Digit4 = 25,
|
|
8769
|
+
Digit5 = 26,
|
|
8770
|
+
Digit6 = 27,
|
|
8771
|
+
Digit7 = 28,
|
|
8772
|
+
Digit8 = 29,
|
|
8773
|
+
Digit9 = 30,
|
|
8774
|
+
KeyA = 31,
|
|
8775
|
+
KeyB = 32,
|
|
8776
|
+
KeyC = 33,
|
|
8777
|
+
KeyD = 34,
|
|
8778
|
+
KeyE = 35,
|
|
8779
|
+
KeyF = 36,
|
|
8780
|
+
KeyG = 37,
|
|
8781
|
+
KeyH = 38,
|
|
8782
|
+
KeyI = 39,
|
|
8783
|
+
KeyJ = 40,
|
|
8784
|
+
KeyK = 41,
|
|
8785
|
+
KeyL = 42,
|
|
8786
|
+
KeyM = 43,
|
|
8787
|
+
KeyN = 44,
|
|
8788
|
+
KeyO = 45,
|
|
8789
|
+
KeyP = 46,
|
|
8790
|
+
KeyQ = 47,
|
|
8791
|
+
KeyR = 48,
|
|
8792
|
+
KeyS = 49,
|
|
8793
|
+
KeyT = 50,
|
|
8794
|
+
KeyU = 51,
|
|
8795
|
+
KeyV = 52,
|
|
8796
|
+
KeyW = 53,
|
|
8797
|
+
KeyX = 54,
|
|
8798
|
+
KeyY = 55,
|
|
8799
|
+
KeyZ = 56,
|
|
8800
|
+
Meta = 57,
|
|
8801
|
+
ContextMenu = 58,
|
|
8802
|
+
F1 = 59,
|
|
8803
|
+
F2 = 60,
|
|
8804
|
+
F3 = 61,
|
|
8805
|
+
F4 = 62,
|
|
8806
|
+
F5 = 63,
|
|
8807
|
+
F6 = 64,
|
|
8808
|
+
F7 = 65,
|
|
8809
|
+
F8 = 66,
|
|
8810
|
+
F9 = 67,
|
|
8811
|
+
F10 = 68,
|
|
8812
|
+
F11 = 69,
|
|
8813
|
+
F12 = 70,
|
|
8814
|
+
F13 = 71,
|
|
8815
|
+
F14 = 72,
|
|
8816
|
+
F15 = 73,
|
|
8817
|
+
F16 = 74,
|
|
8818
|
+
F17 = 75,
|
|
8819
|
+
F18 = 76,
|
|
8820
|
+
F19 = 77,
|
|
8821
|
+
NumLock = 78,
|
|
8822
|
+
ScrollLock = 79,
|
|
8823
|
+
/**
|
|
8824
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
8825
|
+
* For the US standard keyboard, the ';:' key
|
|
8826
|
+
*/
|
|
8827
|
+
Semicolon = 80,
|
|
8828
|
+
/**
|
|
8829
|
+
* For any country/region, the '+' key
|
|
8830
|
+
* For the US standard keyboard, the '=+' key
|
|
8831
|
+
*/
|
|
8832
|
+
Equal = 81,
|
|
8833
|
+
/**
|
|
8834
|
+
* For any country/region, the ',' key
|
|
8835
|
+
* For the US standard keyboard, the ',<' key
|
|
8836
|
+
*/
|
|
8837
|
+
Comma = 82,
|
|
8838
|
+
/**
|
|
8839
|
+
* For any country/region, the '-' key
|
|
8840
|
+
* For the US standard keyboard, the '-_' key
|
|
8841
|
+
*/
|
|
8842
|
+
Minus = 83,
|
|
8843
|
+
/**
|
|
8844
|
+
* For any country/region, the '.' key
|
|
8845
|
+
* For the US standard keyboard, the '.>' key
|
|
8846
|
+
*/
|
|
8847
|
+
Period = 84,
|
|
8848
|
+
/**
|
|
8849
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
8850
|
+
* For the US standard keyboard, the '/?' key
|
|
8851
|
+
*/
|
|
8852
|
+
Slash = 85,
|
|
8853
|
+
/**
|
|
8854
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
8855
|
+
* For the US standard keyboard, the '`~' key
|
|
8856
|
+
*/
|
|
8857
|
+
Backquote = 86,
|
|
8858
|
+
/**
|
|
8859
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
8860
|
+
* For the US standard keyboard, the '[{' key
|
|
8861
|
+
*/
|
|
8862
|
+
BracketLeft = 87,
|
|
8863
|
+
/**
|
|
8864
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
8865
|
+
* For the US standard keyboard, the '\|' key
|
|
8866
|
+
*/
|
|
8867
|
+
Backslash = 88,
|
|
8868
|
+
/**
|
|
8869
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
8870
|
+
* For the US standard keyboard, the ']}' key
|
|
8871
|
+
*/
|
|
8872
|
+
BracketRight = 89,
|
|
8873
|
+
/**
|
|
8874
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
8875
|
+
* For the US standard keyboard, the ''"' key
|
|
8876
|
+
*/
|
|
8877
|
+
Quote = 90,
|
|
8878
|
+
/**
|
|
8879
|
+
* Used for miscellaneous characters; it can vary by keyboard.
|
|
8880
|
+
*/
|
|
8881
|
+
OEM_8 = 91,
|
|
8882
|
+
/**
|
|
8883
|
+
* Either the angle bracket key or the backslash key on the RT 102-key keyboard.
|
|
8884
|
+
*/
|
|
8885
|
+
IntlBackslash = 92,
|
|
8886
|
+
Numpad0 = 93,
|
|
8887
|
+
Numpad1 = 94,
|
|
8888
|
+
Numpad2 = 95,
|
|
8889
|
+
Numpad3 = 96,
|
|
8890
|
+
Numpad4 = 97,
|
|
8891
|
+
Numpad5 = 98,
|
|
8892
|
+
Numpad6 = 99,
|
|
8893
|
+
Numpad7 = 100,
|
|
8894
|
+
Numpad8 = 101,
|
|
8895
|
+
Numpad9 = 102,
|
|
8896
|
+
NumpadMultiply = 103,
|
|
8897
|
+
NumpadAdd = 104,
|
|
8898
|
+
NUMPAD_SEPARATOR = 105,
|
|
8899
|
+
NumpadSubtract = 106,
|
|
8900
|
+
NumpadDecimal = 107,
|
|
8901
|
+
NumpadDivide = 108,
|
|
8902
|
+
/**
|
|
8903
|
+
* Cover all key codes when IME is processing input.
|
|
8904
|
+
*/
|
|
8905
|
+
KEY_IN_COMPOSITION = 109,
|
|
8906
|
+
ABNT_C1 = 110,
|
|
8907
|
+
ABNT_C2 = 111,
|
|
8908
|
+
AudioVolumeMute = 112,
|
|
8909
|
+
AudioVolumeUp = 113,
|
|
8910
|
+
AudioVolumeDown = 114,
|
|
8911
|
+
BrowserSearch = 115,
|
|
8912
|
+
BrowserHome = 116,
|
|
8913
|
+
BrowserBack = 117,
|
|
8914
|
+
BrowserForward = 118,
|
|
8915
|
+
MediaTrackNext = 119,
|
|
8916
|
+
MediaTrackPrevious = 120,
|
|
8917
|
+
MediaStop = 121,
|
|
8918
|
+
MediaPlayPause = 122,
|
|
8919
|
+
LaunchMediaPlayer = 123,
|
|
8920
|
+
LaunchMail = 124,
|
|
8921
|
+
LaunchApp2 = 125,
|
|
8922
|
+
/**
|
|
8923
|
+
* VK_CLEAR, 0x0C, CLEAR key
|
|
8924
|
+
*/
|
|
8925
|
+
Clear = 126,
|
|
8926
|
+
/**
|
|
8927
|
+
* Placed last to cover the length of the enum.
|
|
8928
|
+
* Please do not depend on this value!
|
|
8929
|
+
*/
|
|
8930
|
+
MAX_VALUE = 127
|
|
8796
8931
|
}
|
|
8797
|
-
|
|
8798
|
-
|
|
8799
|
-
|
|
8932
|
+
|
|
8933
|
+
declare const enum OperatingSystem {
|
|
8934
|
+
Windows = 1,
|
|
8935
|
+
Macintosh = 2,
|
|
8936
|
+
Linux = 3
|
|
8800
8937
|
}
|
|
8801
8938
|
|
|
8802
|
-
interface
|
|
8803
|
-
|
|
8804
|
-
|
|
8939
|
+
interface Modifiers {
|
|
8940
|
+
readonly ctrlKey: boolean;
|
|
8941
|
+
readonly shiftKey: boolean;
|
|
8942
|
+
readonly altKey: boolean;
|
|
8943
|
+
readonly metaKey: boolean;
|
|
8805
8944
|
}
|
|
8806
|
-
|
|
8807
|
-
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
|
|
8811
|
-
|
|
8945
|
+
interface IBaseKeybinding extends Modifiers {
|
|
8946
|
+
isDuplicateModifierCase(): boolean;
|
|
8947
|
+
}
|
|
8948
|
+
declare class SimpleKeybinding implements IBaseKeybinding {
|
|
8949
|
+
readonly ctrlKey: boolean;
|
|
8950
|
+
readonly shiftKey: boolean;
|
|
8951
|
+
readonly altKey: boolean;
|
|
8952
|
+
readonly metaKey: boolean;
|
|
8953
|
+
readonly keyCode: KeyCode;
|
|
8954
|
+
constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, keyCode: KeyCode);
|
|
8955
|
+
equals(other: SimpleKeybinding): boolean;
|
|
8956
|
+
getHashCode(): string;
|
|
8957
|
+
isModifierKey(): boolean;
|
|
8958
|
+
toChord(): ChordKeybinding;
|
|
8959
|
+
/**
|
|
8960
|
+
* Does this keybinding refer to the key code of a modifier and it also has the modifier flag?
|
|
8961
|
+
*/
|
|
8962
|
+
isDuplicateModifierCase(): boolean;
|
|
8963
|
+
}
|
|
8964
|
+
declare class ChordKeybinding {
|
|
8965
|
+
readonly parts: SimpleKeybinding[];
|
|
8966
|
+
constructor(parts: SimpleKeybinding[]);
|
|
8967
|
+
getHashCode(): string;
|
|
8968
|
+
equals(other: ChordKeybinding | null): boolean;
|
|
8969
|
+
}
|
|
8970
|
+
declare type Keybinding = ChordKeybinding;
|
|
8971
|
+
declare class ResolvedKeybindingPart {
|
|
8972
|
+
readonly ctrlKey: boolean;
|
|
8973
|
+
readonly shiftKey: boolean;
|
|
8974
|
+
readonly altKey: boolean;
|
|
8975
|
+
readonly metaKey: boolean;
|
|
8976
|
+
readonly keyLabel: string | null;
|
|
8977
|
+
readonly keyAriaLabel: string | null;
|
|
8978
|
+
constructor(ctrlKey: boolean, shiftKey: boolean, altKey: boolean, metaKey: boolean, kbLabel: string | null, kbAriaLabel: string | null);
|
|
8979
|
+
}
|
|
8980
|
+
declare type KeybindingModifier = 'ctrl' | 'shift' | 'alt' | 'meta';
|
|
8981
|
+
/**
|
|
8982
|
+
* A resolved keybinding. Can be a simple keybinding or a chord keybinding.
|
|
8983
|
+
*/
|
|
8984
|
+
declare abstract class ResolvedKeybinding {
|
|
8985
|
+
/**
|
|
8986
|
+
* This prints the binding in a format suitable for displaying in the UI.
|
|
8987
|
+
*/
|
|
8988
|
+
abstract getLabel(): string | null;
|
|
8989
|
+
/**
|
|
8990
|
+
* This prints the binding in a format suitable for ARIA.
|
|
8991
|
+
*/
|
|
8992
|
+
abstract getAriaLabel(): string | null;
|
|
8993
|
+
/**
|
|
8994
|
+
* This prints the binding in a format suitable for electron's accelerators.
|
|
8995
|
+
* See https://github.com/electron/electron/blob/master/docs/api/accelerator.md
|
|
8996
|
+
*/
|
|
8997
|
+
abstract getElectronAccelerator(): string | null;
|
|
8998
|
+
/**
|
|
8999
|
+
* This prints the binding in a format suitable for user settings.
|
|
9000
|
+
*/
|
|
9001
|
+
abstract getUserSettingsLabel(): string | null;
|
|
9002
|
+
/**
|
|
9003
|
+
* Is the user settings label reflecting the label?
|
|
9004
|
+
*/
|
|
9005
|
+
abstract isWYSIWYG(): boolean;
|
|
9006
|
+
/**
|
|
9007
|
+
* Is the binding a chord?
|
|
9008
|
+
*/
|
|
9009
|
+
abstract isChord(): boolean;
|
|
9010
|
+
/**
|
|
9011
|
+
* Returns the parts that comprise of the keybinding.
|
|
9012
|
+
* Simple keybindings return one element.
|
|
9013
|
+
*/
|
|
9014
|
+
abstract getParts(): ResolvedKeybindingPart[];
|
|
9015
|
+
/**
|
|
9016
|
+
* Returns the parts that should be used for dispatching.
|
|
9017
|
+
* Returns null for parts consisting of only modifier keys
|
|
9018
|
+
* @example keybinding "Shift" -> null
|
|
9019
|
+
* @example keybinding ("D" with shift == true) -> "shift+D"
|
|
9020
|
+
*/
|
|
9021
|
+
abstract getDispatchParts(): (string | null)[];
|
|
9022
|
+
/**
|
|
9023
|
+
* Returns the parts that should be used for dispatching single modifier keys
|
|
9024
|
+
* Returns null for parts that contain more than one modifier or a regular key.
|
|
9025
|
+
* @example keybinding "Shift" -> "shift"
|
|
9026
|
+
* @example keybinding ("D" with shift == true") -> null
|
|
9027
|
+
*/
|
|
9028
|
+
abstract getSingleModifierDispatchParts(): (KeybindingModifier | null)[];
|
|
8812
9029
|
}
|
|
8813
9030
|
|
|
8814
|
-
|
|
8815
|
-
|
|
8816
|
-
|
|
8817
|
-
|
|
8818
|
-
|
|
8819
|
-
|
|
8820
|
-
|
|
8821
|
-
|
|
8822
|
-
|
|
8823
|
-
|
|
8824
|
-
|
|
8825
|
-
|
|
9031
|
+
interface IDimension$1 {
|
|
9032
|
+
width: number;
|
|
9033
|
+
height: number;
|
|
9034
|
+
}
|
|
9035
|
+
|
|
9036
|
+
/**
|
|
9037
|
+
* A model for the diff editor.
|
|
9038
|
+
*/
|
|
9039
|
+
interface IDiffEditorModel {
|
|
9040
|
+
/**
|
|
9041
|
+
* Original model.
|
|
9042
|
+
*/
|
|
9043
|
+
original: ITextModel;
|
|
9044
|
+
/**
|
|
9045
|
+
* Modified model.
|
|
9046
|
+
*/
|
|
9047
|
+
modified: ITextModel;
|
|
9048
|
+
}
|
|
9049
|
+
interface IEditorAction {
|
|
9050
|
+
readonly id: string;
|
|
9051
|
+
readonly label: string;
|
|
9052
|
+
readonly alias: string;
|
|
9053
|
+
isSupported(): boolean;
|
|
9054
|
+
run(): Promise<void>;
|
|
9055
|
+
}
|
|
9056
|
+
declare type IEditorModel = ITextModel | IDiffEditorModel;
|
|
9057
|
+
/**
|
|
9058
|
+
* A (serializable) state of the cursors.
|
|
9059
|
+
*/
|
|
9060
|
+
interface ICursorState {
|
|
9061
|
+
inSelectionMode: boolean;
|
|
9062
|
+
selectionStart: IPosition;
|
|
9063
|
+
position: IPosition;
|
|
9064
|
+
}
|
|
9065
|
+
/**
|
|
9066
|
+
* A (serializable) state of the view.
|
|
9067
|
+
*/
|
|
9068
|
+
interface IViewState {
|
|
9069
|
+
/** written by previous versions */
|
|
9070
|
+
scrollTop?: number;
|
|
9071
|
+
/** written by previous versions */
|
|
9072
|
+
scrollTopWithoutViewZones?: number;
|
|
9073
|
+
scrollLeft: number;
|
|
9074
|
+
firstPosition: IPosition;
|
|
9075
|
+
firstPositionDeltaTop: number;
|
|
8826
9076
|
}
|
|
8827
|
-
|
|
8828
|
-
|
|
8829
|
-
|
|
8830
|
-
|
|
8831
|
-
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8835
|
-
|
|
9077
|
+
/**
|
|
9078
|
+
* A (serializable) state of the code editor.
|
|
9079
|
+
*/
|
|
9080
|
+
interface ICodeEditorViewState {
|
|
9081
|
+
cursorState: ICursorState[];
|
|
9082
|
+
viewState: IViewState;
|
|
9083
|
+
contributionsState: {
|
|
9084
|
+
[id: string]: any;
|
|
9085
|
+
};
|
|
8836
9086
|
}
|
|
8837
|
-
|
|
8838
|
-
|
|
8839
|
-
|
|
8840
|
-
|
|
8841
|
-
|
|
8842
|
-
|
|
8843
|
-
readonly metaKey: boolean;
|
|
8844
|
-
readonly keyCode: KeyCode;
|
|
8845
|
-
readonly code: string;
|
|
9087
|
+
/**
|
|
9088
|
+
* (Serializable) View state for the diff editor.
|
|
9089
|
+
*/
|
|
9090
|
+
interface IDiffEditorViewState {
|
|
9091
|
+
original: ICodeEditorViewState | null;
|
|
9092
|
+
modified: ICodeEditorViewState | null;
|
|
8846
9093
|
}
|
|
8847
|
-
|
|
8848
|
-
|
|
8849
|
-
|
|
9094
|
+
/**
|
|
9095
|
+
* An editor view state.
|
|
9096
|
+
*/
|
|
9097
|
+
declare type IEditorViewState = ICodeEditorViewState | IDiffEditorViewState;
|
|
9098
|
+
declare const enum ScrollType {
|
|
9099
|
+
Smooth = 0,
|
|
9100
|
+
Immediate = 1
|
|
8850
9101
|
}
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8854
|
-
|
|
8855
|
-
onDidUpdateKeybindings: Event<void>;
|
|
9102
|
+
/**
|
|
9103
|
+
* An editor.
|
|
9104
|
+
*/
|
|
9105
|
+
interface IEditor {
|
|
8856
9106
|
/**
|
|
8857
|
-
*
|
|
9107
|
+
* An event emitted when the editor has been disposed.
|
|
9108
|
+
* @event
|
|
8858
9109
|
*/
|
|
8859
|
-
|
|
8860
|
-
resolveKeyboardEvent(keyboardEvent: IKeyboardEvent): ResolvedKeybinding;
|
|
8861
|
-
resolveUserBinding(userBinding: string): ResolvedKeybinding[];
|
|
9110
|
+
onDidDispose(listener: () => void): IDisposable;
|
|
8862
9111
|
/**
|
|
8863
|
-
*
|
|
9112
|
+
* Dispose the editor.
|
|
8864
9113
|
*/
|
|
8865
|
-
|
|
9114
|
+
dispose(): void;
|
|
8866
9115
|
/**
|
|
8867
|
-
*
|
|
9116
|
+
* Get a unique id for this editor instance.
|
|
8868
9117
|
*/
|
|
8869
|
-
|
|
8870
|
-
dispatchByUserSettingsLabel(userSettingsLabel: string, target: IContextKeyServiceTarget): void;
|
|
9118
|
+
getId(): string;
|
|
8871
9119
|
/**
|
|
8872
|
-
*
|
|
8873
|
-
*
|
|
9120
|
+
* Get the editor type. Please see `EditorType`.
|
|
9121
|
+
* This is to avoid an instanceof check
|
|
8874
9122
|
*/
|
|
8875
|
-
|
|
9123
|
+
getEditorType(): string;
|
|
8876
9124
|
/**
|
|
8877
|
-
*
|
|
8878
|
-
* @returns The preferred keybinding or null if the command is not bound.
|
|
9125
|
+
* Update the editor's options after the editor has been created.
|
|
8879
9126
|
*/
|
|
8880
|
-
|
|
8881
|
-
getDefaultKeybindingsContent(): string;
|
|
8882
|
-
getDefaultKeybindings(): readonly ResolvedKeybindingItem[];
|
|
8883
|
-
getKeybindings(): readonly ResolvedKeybindingItem[];
|
|
8884
|
-
customKeybindingsCount(): number;
|
|
9127
|
+
updateOptions(newOptions: IEditorOptions$1): void;
|
|
8885
9128
|
/**
|
|
8886
|
-
*
|
|
8887
|
-
*
|
|
9129
|
+
* Indicates that the editor becomes visible.
|
|
9130
|
+
* @internal
|
|
8888
9131
|
*/
|
|
8889
|
-
|
|
8890
|
-
registerSchemaContribution(contribution: KeybindingsSchemaContribution): void;
|
|
8891
|
-
toggleLogging(): boolean;
|
|
8892
|
-
_dumpDebugInfo(): string;
|
|
8893
|
-
_dumpDebugInfoJSON(): string;
|
|
8894
|
-
}
|
|
8895
|
-
|
|
8896
|
-
declare const ILanguageFeaturesService: ServiceIdentifier<ILanguageFeaturesService>;
|
|
8897
|
-
interface ILanguageFeaturesService {
|
|
8898
|
-
readonly _serviceBrand: undefined;
|
|
8899
|
-
readonly referenceProvider: LanguageFeatureRegistry<ReferenceProvider>;
|
|
8900
|
-
readonly definitionProvider: LanguageFeatureRegistry<DefinitionProvider>;
|
|
8901
|
-
readonly typeDefinitionProvider: LanguageFeatureRegistry<TypeDefinitionProvider>;
|
|
8902
|
-
readonly declarationProvider: LanguageFeatureRegistry<DeclarationProvider>;
|
|
8903
|
-
readonly implementationProvider: LanguageFeatureRegistry<ImplementationProvider>;
|
|
8904
|
-
readonly codeActionProvider: LanguageFeatureRegistry<CodeActionProvider>;
|
|
8905
|
-
readonly documentPasteEditProvider: LanguageFeatureRegistry<DocumentPasteEditProvider>;
|
|
8906
|
-
readonly renameProvider: LanguageFeatureRegistry<RenameProvider>;
|
|
8907
|
-
readonly documentFormattingEditProvider: LanguageFeatureRegistry<DocumentFormattingEditProvider>;
|
|
8908
|
-
readonly documentRangeFormattingEditProvider: LanguageFeatureRegistry<DocumentRangeFormattingEditProvider>;
|
|
8909
|
-
readonly onTypeFormattingEditProvider: LanguageFeatureRegistry<OnTypeFormattingEditProvider>;
|
|
8910
|
-
readonly documentSymbolProvider: LanguageFeatureRegistry<DocumentSymbolProvider>;
|
|
8911
|
-
readonly inlayHintsProvider: LanguageFeatureRegistry<InlayHintsProvider>;
|
|
8912
|
-
readonly colorProvider: LanguageFeatureRegistry<DocumentColorProvider>;
|
|
8913
|
-
readonly codeLensProvider: LanguageFeatureRegistry<CodeLensProvider>;
|
|
8914
|
-
readonly signatureHelpProvider: LanguageFeatureRegistry<SignatureHelpProvider>;
|
|
8915
|
-
readonly hoverProvider: LanguageFeatureRegistry<HoverProvider>;
|
|
8916
|
-
readonly documentHighlightProvider: LanguageFeatureRegistry<DocumentHighlightProvider>;
|
|
8917
|
-
readonly documentRangeSemanticTokensProvider: LanguageFeatureRegistry<DocumentRangeSemanticTokensProvider>;
|
|
8918
|
-
readonly documentSemanticTokensProvider: LanguageFeatureRegistry<DocumentSemanticTokensProvider>;
|
|
8919
|
-
readonly selectionRangeProvider: LanguageFeatureRegistry<SelectionRangeProvider>;
|
|
8920
|
-
readonly foldingRangeProvider: LanguageFeatureRegistry<FoldingRangeProvider>;
|
|
8921
|
-
readonly linkProvider: LanguageFeatureRegistry<LinkProvider>;
|
|
8922
|
-
readonly inlineCompletionsProvider: LanguageFeatureRegistry<InlineCompletionsProvider>;
|
|
8923
|
-
readonly completionProvider: LanguageFeatureRegistry<CompletionItemProvider>;
|
|
8924
|
-
readonly linkedEditingRangeProvider: LanguageFeatureRegistry<LinkedEditingRangeProvider>;
|
|
8925
|
-
readonly inlineValuesProvider: LanguageFeatureRegistry<InlineValuesProvider>;
|
|
8926
|
-
readonly evaluatableExpressionProvider: LanguageFeatureRegistry<EvaluatableExpressionProvider>;
|
|
8927
|
-
readonly documentOnDropEditProvider: LanguageFeatureRegistry<DocumentOnDropEditProvider>;
|
|
8928
|
-
setNotebookTypeResolver(resolver: NotebookInfoResolver | undefined): void;
|
|
8929
|
-
}
|
|
8930
|
-
|
|
8931
|
-
type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
|
|
8932
|
-
/**
|
|
8933
|
-
* We don't want to eagerly instantiate services because embedders get a one time chance
|
|
8934
|
-
* to override services when they create the first editor.
|
|
8935
|
-
*/
|
|
8936
|
-
declare module StandaloneServices {
|
|
8937
|
-
function get<T>(serviceId: ServiceIdentifier<T>): T;
|
|
8938
|
-
function initialize(overrides: IEditorOverrideServices): IInstantiationService;
|
|
8939
|
-
}
|
|
8940
|
-
|
|
8941
|
-
declare class ResourceEdit {
|
|
8942
|
-
readonly metadata?: WorkspaceEditMetadata | undefined;
|
|
8943
|
-
protected constructor(metadata?: WorkspaceEditMetadata | undefined);
|
|
8944
|
-
static convert(edit: WorkspaceEdit): ResourceEdit[];
|
|
8945
|
-
}
|
|
8946
|
-
interface IBulkEditOptions {
|
|
8947
|
-
editor?: ICodeEditor;
|
|
8948
|
-
progress?: IProgress<IProgressStep>;
|
|
8949
|
-
token?: CancellationToken;
|
|
8950
|
-
showPreview?: boolean;
|
|
8951
|
-
label?: string;
|
|
8952
|
-
code?: string;
|
|
8953
|
-
quotableLabel?: string;
|
|
8954
|
-
undoRedoSource?: UndoRedoSource;
|
|
8955
|
-
undoRedoGroupId?: number;
|
|
8956
|
-
confirmBeforeUndo?: boolean;
|
|
8957
|
-
respectAutoSaveConfig?: boolean;
|
|
8958
|
-
}
|
|
8959
|
-
interface IBulkEditResult {
|
|
8960
|
-
ariaSummary: string;
|
|
8961
|
-
}
|
|
8962
|
-
declare type IBulkEditPreviewHandler = (edits: ResourceEdit[], options?: IBulkEditOptions) => Promise<ResourceEdit[]>;
|
|
8963
|
-
declare const IBulkEditService: ServiceIdentifier<IBulkEditService>;
|
|
8964
|
-
interface IBulkEditService {
|
|
8965
|
-
readonly _serviceBrand: undefined;
|
|
8966
|
-
hasPreviewHandler(): boolean;
|
|
8967
|
-
setPreviewHandler(handler: IBulkEditPreviewHandler): IDisposable;
|
|
8968
|
-
apply(edit: ResourceEdit[], options?: IBulkEditOptions): Promise<IBulkEditResult>;
|
|
8969
|
-
}
|
|
8970
|
-
|
|
8971
|
-
interface UnicodeHighlighterOptions {
|
|
8972
|
-
nonBasicASCII: boolean;
|
|
8973
|
-
ambiguousCharacters: boolean;
|
|
8974
|
-
invisibleCharacters: boolean;
|
|
8975
|
-
includeComments: boolean;
|
|
8976
|
-
includeStrings: boolean;
|
|
8977
|
-
allowedCodePoints: number[];
|
|
8978
|
-
allowedLocales: string[];
|
|
8979
|
-
}
|
|
8980
|
-
|
|
8981
|
-
declare const IEditorWorkerService: ServiceIdentifier<IEditorWorkerService>;
|
|
8982
|
-
interface IEditorWorkerService {
|
|
8983
|
-
readonly _serviceBrand: undefined;
|
|
8984
|
-
canComputeUnicodeHighlights(uri: URI): boolean;
|
|
8985
|
-
computedUnicodeHighlights(uri: URI, options: UnicodeHighlighterOptions, range?: IRange): Promise<IUnicodeHighlightsResult>;
|
|
8986
|
-
computeDiff(original: URI, modified: URI, ignoreTrimWhitespace: boolean, maxComputationTime: number): Promise<IDiffComputationResult | null>;
|
|
8987
|
-
canComputeDirtyDiff(original: URI, modified: URI): boolean;
|
|
8988
|
-
computeDirtyDiff(original: URI, modified: URI, ignoreTrimWhitespace: boolean): Promise<IChange[] | null>;
|
|
8989
|
-
computeMoreMinimalEdits(resource: URI, edits: TextEdit[] | null | undefined): Promise<TextEdit[] | undefined>;
|
|
8990
|
-
canComputeWordRanges(resource: URI): boolean;
|
|
8991
|
-
computeWordRanges(resource: URI, range: IRange): Promise<{
|
|
8992
|
-
[word: string]: IRange[];
|
|
8993
|
-
} | null>;
|
|
8994
|
-
canNavigateValueSet(resource: URI): boolean;
|
|
8995
|
-
navigateValueSet(resource: URI, range: IRange, up: boolean): Promise<IInplaceReplaceSupportResult | null>;
|
|
8996
|
-
}
|
|
8997
|
-
interface IUnicodeHighlightsResult {
|
|
8998
|
-
ranges: IRange[];
|
|
8999
|
-
hasMore: boolean;
|
|
9000
|
-
nonBasicAsciiCharacterCount: number;
|
|
9001
|
-
invisibleCharacterCount: number;
|
|
9002
|
-
ambiguousCharacterCount: number;
|
|
9003
|
-
}
|
|
9004
|
-
|
|
9005
|
-
declare class SemanticTokensProviderStyling {
|
|
9006
|
-
private readonly _legend;
|
|
9007
|
-
private readonly _themeService;
|
|
9008
|
-
private readonly _languageService;
|
|
9009
|
-
private readonly _logService;
|
|
9010
|
-
private readonly _hashTable;
|
|
9011
|
-
private _hasWarnedOverlappingTokens;
|
|
9012
|
-
private _hasWarnedInvalidLengthTokens;
|
|
9013
|
-
private _hasWarnedInvalidEditStart;
|
|
9014
|
-
constructor(_legend: SemanticTokensLegend, _themeService: IThemeService, _languageService: ILanguageService, _logService: ILogService);
|
|
9015
|
-
getMetadata(tokenTypeIndex: number, tokenModifierSet: number, languageId: string): number;
|
|
9016
|
-
warnOverlappingSemanticTokens(lineNumber: number, startColumn: number): void;
|
|
9017
|
-
warnInvalidLengthSemanticTokens(lineNumber: number, startColumn: number): void;
|
|
9018
|
-
warnInvalidEditStart(previousResultId: string | undefined, resultId: string | undefined, editIndex: number, editStart: number, maxExpectedStart: number): void;
|
|
9019
|
-
}
|
|
9020
|
-
|
|
9021
|
-
declare type DocumentTokensProvider = DocumentSemanticTokensProvider | DocumentRangeSemanticTokensProvider;
|
|
9022
|
-
declare const IModelService: ServiceIdentifier<IModelService>;
|
|
9023
|
-
interface IModelService {
|
|
9024
|
-
readonly _serviceBrand: undefined;
|
|
9025
|
-
createModel(value: string | ITextBufferFactory, languageSelection: ILanguageSelection | null, resource?: URI, isForSimpleWidget?: boolean): ITextModel;
|
|
9026
|
-
updateModel(model: ITextModel, value: string | ITextBufferFactory): void;
|
|
9027
|
-
setMode(model: ITextModel, languageSelection: ILanguageSelection): void;
|
|
9028
|
-
destroyModel(resource: URI): void;
|
|
9029
|
-
getModels(): ITextModel[];
|
|
9030
|
-
getCreationOptions(language: string, resource: URI, isForSimpleWidget: boolean): ITextModelCreationOptions;
|
|
9031
|
-
getModel(resource: URI): ITextModel | null;
|
|
9032
|
-
getSemanticTokensProviderStyling(provider: DocumentTokensProvider): SemanticTokensProviderStyling;
|
|
9033
|
-
onModelAdded: Event<ITextModel>;
|
|
9034
|
-
onModelRemoved: Event<ITextModel>;
|
|
9035
|
-
onModelLanguageChanged: Event<{
|
|
9036
|
-
model: ITextModel;
|
|
9037
|
-
oldLanguageId: string;
|
|
9038
|
-
}>;
|
|
9039
|
-
}
|
|
9040
|
-
|
|
9041
|
-
declare const IClipboardService: ServiceIdentifier<IClipboardService>;
|
|
9042
|
-
interface IClipboardService {
|
|
9043
|
-
readonly _serviceBrand: undefined;
|
|
9132
|
+
onVisible(): void;
|
|
9044
9133
|
/**
|
|
9045
|
-
*
|
|
9134
|
+
* Indicates that the editor becomes hidden.
|
|
9135
|
+
* @internal
|
|
9046
9136
|
*/
|
|
9047
|
-
|
|
9137
|
+
onHide(): void;
|
|
9048
9138
|
/**
|
|
9049
|
-
*
|
|
9139
|
+
* Instructs the editor to remeasure its container. This method should
|
|
9140
|
+
* be called when the container of the editor gets resized.
|
|
9141
|
+
*
|
|
9142
|
+
* If a dimension is passed in, the passed in value will be used.
|
|
9143
|
+
*/
|
|
9144
|
+
layout(dimension?: IDimension$1): void;
|
|
9145
|
+
/**
|
|
9146
|
+
* Brings browser focus to the editor text
|
|
9050
9147
|
*/
|
|
9051
|
-
|
|
9148
|
+
focus(): void;
|
|
9052
9149
|
/**
|
|
9053
|
-
*
|
|
9150
|
+
* Returns true if the text inside this editor is focused (i.e. cursor is blinking).
|
|
9054
9151
|
*/
|
|
9055
|
-
|
|
9152
|
+
hasTextFocus(): boolean;
|
|
9056
9153
|
/**
|
|
9057
|
-
*
|
|
9154
|
+
* Returns all actions associated with this editor.
|
|
9058
9155
|
*/
|
|
9059
|
-
|
|
9156
|
+
getSupportedActions(): IEditorAction[];
|
|
9060
9157
|
/**
|
|
9061
|
-
*
|
|
9158
|
+
* Saves current view state of the editor in a serializable object.
|
|
9062
9159
|
*/
|
|
9063
|
-
|
|
9160
|
+
saveViewState(): IEditorViewState | null;
|
|
9064
9161
|
/**
|
|
9065
|
-
*
|
|
9162
|
+
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
|
|
9066
9163
|
*/
|
|
9067
|
-
|
|
9164
|
+
restoreViewState(state: IEditorViewState | null): void;
|
|
9068
9165
|
/**
|
|
9069
|
-
*
|
|
9166
|
+
* Given a position, returns a column number that takes tab-widths into account.
|
|
9070
9167
|
*/
|
|
9071
|
-
|
|
9072
|
-
}
|
|
9073
|
-
|
|
9074
|
-
interface ReadableStreamEvents<T> {
|
|
9168
|
+
getVisibleColumnFromPosition(position: IPosition): number;
|
|
9075
9169
|
/**
|
|
9076
|
-
*
|
|
9077
|
-
*
|
|
9078
|
-
*
|
|
9079
|
-
* NOTE: PLEASE UNDERSTAND THAT ADDING A DATA LISTENER CAN
|
|
9080
|
-
* TURN THE STREAM INTO FLOWING MODE. IT IS THEREFOR THE
|
|
9081
|
-
* LAST LISTENER THAT SHOULD BE ADDED AND NOT THE FIRST
|
|
9082
|
-
*
|
|
9083
|
-
* Use `listenStream` as a helper method to listen to
|
|
9084
|
-
* stream events in the right order.
|
|
9170
|
+
* Given a position, returns a column number that takes tab-widths into account.
|
|
9171
|
+
* @internal
|
|
9085
9172
|
*/
|
|
9086
|
-
|
|
9173
|
+
getStatusbarColumn(position: IPosition): number;
|
|
9087
9174
|
/**
|
|
9088
|
-
*
|
|
9175
|
+
* Returns the primary position of the cursor.
|
|
9089
9176
|
*/
|
|
9090
|
-
|
|
9177
|
+
getPosition(): Position$1 | null;
|
|
9091
9178
|
/**
|
|
9092
|
-
*
|
|
9093
|
-
*
|
|
9094
|
-
*
|
|
9179
|
+
* Set the primary position of the cursor. This will remove any secondary cursors.
|
|
9180
|
+
* @param position New primary cursor's position
|
|
9181
|
+
* @param source Source of the call that caused the position
|
|
9095
9182
|
*/
|
|
9096
|
-
|
|
9097
|
-
}
|
|
9098
|
-
/**
|
|
9099
|
-
* A interface that emulates the API shape of a node.js readable
|
|
9100
|
-
* stream for use in native and web environments.
|
|
9101
|
-
*/
|
|
9102
|
-
interface ReadableStream<T> extends ReadableStreamEvents<T> {
|
|
9183
|
+
setPosition(position: IPosition, source?: string): void;
|
|
9103
9184
|
/**
|
|
9104
|
-
*
|
|
9185
|
+
* Scroll vertically as necessary and reveal a line.
|
|
9105
9186
|
*/
|
|
9106
|
-
|
|
9187
|
+
revealLine(lineNumber: number, scrollType?: ScrollType): void;
|
|
9107
9188
|
/**
|
|
9108
|
-
*
|
|
9189
|
+
* Scroll vertically as necessary and reveal a line centered vertically.
|
|
9109
9190
|
*/
|
|
9110
|
-
|
|
9191
|
+
revealLineInCenter(lineNumber: number, scrollType?: ScrollType): void;
|
|
9111
9192
|
/**
|
|
9112
|
-
*
|
|
9193
|
+
* Scroll vertically as necessary and reveal a line centered vertically only if it lies outside the viewport.
|
|
9113
9194
|
*/
|
|
9114
|
-
|
|
9195
|
+
revealLineInCenterIfOutsideViewport(lineNumber: number, scrollType?: ScrollType): void;
|
|
9115
9196
|
/**
|
|
9116
|
-
*
|
|
9197
|
+
* Scroll vertically as necessary and reveal a line close to the top of the viewport,
|
|
9198
|
+
* optimized for viewing a code definition.
|
|
9117
9199
|
*/
|
|
9118
|
-
|
|
9119
|
-
}
|
|
9120
|
-
/**
|
|
9121
|
-
* A interface that emulates the API shape of a node.js readable
|
|
9122
|
-
* for use in native and web environments.
|
|
9123
|
-
*/
|
|
9124
|
-
interface Readable<T> {
|
|
9200
|
+
revealLineNearTop(lineNumber: number, scrollType?: ScrollType): void;
|
|
9125
9201
|
/**
|
|
9126
|
-
*
|
|
9127
|
-
* null to indicate that no more data can be read.
|
|
9202
|
+
* Scroll vertically or horizontally as necessary and reveal a position.
|
|
9128
9203
|
*/
|
|
9129
|
-
|
|
9130
|
-
}
|
|
9131
|
-
|
|
9132
|
-
declare class VSBuffer {
|
|
9204
|
+
revealPosition(position: IPosition, scrollType?: ScrollType): void;
|
|
9133
9205
|
/**
|
|
9134
|
-
*
|
|
9135
|
-
* might use a nodejs Buffer allocated from node's Buffer pool, which is not transferrable.
|
|
9206
|
+
* Scroll vertically or horizontally as necessary and reveal a position centered vertically.
|
|
9136
9207
|
*/
|
|
9137
|
-
|
|
9208
|
+
revealPositionInCenter(position: IPosition, scrollType?: ScrollType): void;
|
|
9138
9209
|
/**
|
|
9139
|
-
*
|
|
9140
|
-
* the returned `VSBuffer` instance might use a nodejs Buffer allocated from node's Buffer pool,
|
|
9141
|
-
* which is not transferrable.
|
|
9210
|
+
* Scroll vertically or horizontally as necessary and reveal a position centered vertically only if it lies outside the viewport.
|
|
9142
9211
|
*/
|
|
9143
|
-
|
|
9212
|
+
revealPositionInCenterIfOutsideViewport(position: IPosition, scrollType?: ScrollType): void;
|
|
9144
9213
|
/**
|
|
9145
|
-
*
|
|
9146
|
-
*
|
|
9214
|
+
* Scroll vertically or horizontally as necessary and reveal a position close to the top of the viewport,
|
|
9215
|
+
* optimized for viewing a code definition.
|
|
9147
9216
|
*/
|
|
9148
|
-
|
|
9149
|
-
dontUseNodeBuffer?: boolean;
|
|
9150
|
-
}): VSBuffer;
|
|
9217
|
+
revealPositionNearTop(position: IPosition, scrollType?: ScrollType): void;
|
|
9151
9218
|
/**
|
|
9152
|
-
*
|
|
9153
|
-
* might use a nodejs Buffer allocated from node's Buffer pool, which is not transferrable.
|
|
9219
|
+
* Returns the primary selection of the editor.
|
|
9154
9220
|
*/
|
|
9155
|
-
|
|
9221
|
+
getSelection(): Selection | null;
|
|
9156
9222
|
/**
|
|
9157
|
-
*
|
|
9158
|
-
* might use a nodejs Buffer allocated from node's Buffer pool, which is not transferrable.
|
|
9223
|
+
* Returns all the selections of the editor.
|
|
9159
9224
|
*/
|
|
9160
|
-
|
|
9161
|
-
readonly buffer: Uint8Array;
|
|
9162
|
-
readonly byteLength: number;
|
|
9163
|
-
private constructor();
|
|
9225
|
+
getSelections(): Selection[] | null;
|
|
9164
9226
|
/**
|
|
9165
|
-
*
|
|
9166
|
-
*
|
|
9227
|
+
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
9228
|
+
* @param selection The new selection
|
|
9229
|
+
* @param source Source of the call that caused the selection
|
|
9167
9230
|
*/
|
|
9168
|
-
|
|
9169
|
-
toString(): string;
|
|
9170
|
-
slice(start?: number, end?: number): VSBuffer;
|
|
9171
|
-
set(array: VSBuffer, offset?: number): void;
|
|
9172
|
-
set(array: Uint8Array, offset?: number): void;
|
|
9173
|
-
set(array: ArrayBuffer, offset?: number): void;
|
|
9174
|
-
set(array: ArrayBufferView, offset?: number): void;
|
|
9175
|
-
set(array: VSBuffer | Uint8Array | ArrayBuffer | ArrayBufferView, offset?: number): void;
|
|
9176
|
-
readUInt32BE(offset: number): number;
|
|
9177
|
-
writeUInt32BE(value: number, offset: number): void;
|
|
9178
|
-
readUInt32LE(offset: number): number;
|
|
9179
|
-
writeUInt32LE(value: number, offset: number): void;
|
|
9180
|
-
readUInt8(offset: number): number;
|
|
9181
|
-
writeUInt8(value: number, offset: number): void;
|
|
9182
|
-
}
|
|
9183
|
-
interface VSBufferReadable extends Readable<VSBuffer> {
|
|
9184
|
-
}
|
|
9185
|
-
interface VSBufferReadableStream extends ReadableStream<VSBuffer> {
|
|
9186
|
-
}
|
|
9187
|
-
|
|
9188
|
-
declare const IFileService: ServiceIdentifier<IFileService>;
|
|
9189
|
-
interface IFileService {
|
|
9190
|
-
readonly _serviceBrand: undefined;
|
|
9231
|
+
setSelection(selection: IRange, source?: string): void;
|
|
9191
9232
|
/**
|
|
9192
|
-
*
|
|
9233
|
+
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
9234
|
+
* @param selection The new selection
|
|
9235
|
+
* @param source Source of the call that caused the selection
|
|
9193
9236
|
*/
|
|
9194
|
-
|
|
9237
|
+
setSelection(selection: Range, source?: string): void;
|
|
9195
9238
|
/**
|
|
9196
|
-
*
|
|
9239
|
+
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
9240
|
+
* @param selection The new selection
|
|
9241
|
+
* @param source Source of the call that caused the selection
|
|
9197
9242
|
*/
|
|
9198
|
-
|
|
9243
|
+
setSelection(selection: ISelection, source?: string): void;
|
|
9199
9244
|
/**
|
|
9200
|
-
*
|
|
9201
|
-
*
|
|
9245
|
+
* Set the primary selection of the editor. This will remove any secondary cursors.
|
|
9246
|
+
* @param selection The new selection
|
|
9247
|
+
* @param source Source of the call that caused the selection
|
|
9202
9248
|
*/
|
|
9203
|
-
|
|
9249
|
+
setSelection(selection: Selection, source?: string): void;
|
|
9204
9250
|
/**
|
|
9205
|
-
*
|
|
9251
|
+
* Set the selections for all the cursors of the editor.
|
|
9252
|
+
* Cursors will be removed or added, as necessary.
|
|
9253
|
+
* @param selections The new selection
|
|
9254
|
+
* @param source Source of the call that caused the selection
|
|
9206
9255
|
*/
|
|
9207
|
-
|
|
9256
|
+
setSelections(selections: readonly ISelection[], source?: string): void;
|
|
9208
9257
|
/**
|
|
9209
|
-
*
|
|
9258
|
+
* Scroll vertically as necessary and reveal lines.
|
|
9210
9259
|
*/
|
|
9211
|
-
|
|
9260
|
+
revealLines(startLineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
|
|
9212
9261
|
/**
|
|
9213
|
-
*
|
|
9262
|
+
* Scroll vertically as necessary and reveal lines centered vertically.
|
|
9214
9263
|
*/
|
|
9215
|
-
|
|
9264
|
+
revealLinesInCenter(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
|
|
9216
9265
|
/**
|
|
9217
|
-
*
|
|
9218
|
-
* first activating any extension that wants to be activated
|
|
9219
|
-
* on the provided resource scheme to include extensions that
|
|
9220
|
-
* contribute file system providers for the given resource.
|
|
9266
|
+
* Scroll vertically as necessary and reveal lines centered vertically only if it lies outside the viewport.
|
|
9221
9267
|
*/
|
|
9222
|
-
|
|
9268
|
+
revealLinesInCenterIfOutsideViewport(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
|
|
9223
9269
|
/**
|
|
9224
|
-
*
|
|
9225
|
-
*
|
|
9226
|
-
*
|
|
9227
|
-
* Note: this does NOT account for contributed providers from
|
|
9228
|
-
* extensions that have not been activated yet. To include those,
|
|
9229
|
-
* consider to call `await fileService.canHandleResource(resource)`.
|
|
9270
|
+
* Scroll vertically as necessary and reveal lines close to the top of the viewport,
|
|
9271
|
+
* optimized for viewing a code definition.
|
|
9230
9272
|
*/
|
|
9231
|
-
|
|
9273
|
+
revealLinesNearTop(lineNumber: number, endLineNumber: number, scrollType?: ScrollType): void;
|
|
9232
9274
|
/**
|
|
9233
|
-
*
|
|
9275
|
+
* Scroll vertically or horizontally as necessary and reveal a range.
|
|
9234
9276
|
*/
|
|
9235
|
-
|
|
9277
|
+
revealRange(range: IRange, scrollType?: ScrollType): void;
|
|
9236
9278
|
/**
|
|
9237
|
-
*
|
|
9279
|
+
* Scroll vertically or horizontally as necessary and reveal a range centered vertically.
|
|
9238
9280
|
*/
|
|
9239
|
-
|
|
9240
|
-
scheme: string;
|
|
9241
|
-
capabilities: FileSystemProviderCapabilities;
|
|
9242
|
-
}>;
|
|
9281
|
+
revealRangeInCenter(range: IRange, scrollType?: ScrollType): void;
|
|
9243
9282
|
/**
|
|
9244
|
-
*
|
|
9245
|
-
* (if any) as well as all files that have been watched explicitly using the #watch() API.
|
|
9283
|
+
* Scroll vertically or horizontally as necessary and reveal a range at the top of the viewport.
|
|
9246
9284
|
*/
|
|
9247
|
-
|
|
9285
|
+
revealRangeAtTop(range: IRange, scrollType?: ScrollType): void;
|
|
9248
9286
|
/**
|
|
9249
|
-
*
|
|
9287
|
+
* Scroll vertically or horizontally as necessary and reveal a range centered vertically only if it lies outside the viewport.
|
|
9250
9288
|
*/
|
|
9251
|
-
|
|
9289
|
+
revealRangeInCenterIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;
|
|
9252
9290
|
/**
|
|
9253
|
-
*
|
|
9254
|
-
*
|
|
9255
|
-
* you do not need children information.
|
|
9256
|
-
*
|
|
9257
|
-
* If the optional parameter "resolveTo" is specified in options, the stat service is asked
|
|
9258
|
-
* to provide a stat object that should contain the full graph of folders up to all of the
|
|
9259
|
-
* target resources.
|
|
9260
|
-
*
|
|
9261
|
-
* If the optional parameter "resolveSingleChildDescendants" is specified in options,
|
|
9262
|
-
* the stat service is asked to automatically resolve child folders that only
|
|
9263
|
-
* contain a single element.
|
|
9264
|
-
*
|
|
9265
|
-
* If the optional parameter "resolveMetadata" is specified in options,
|
|
9266
|
-
* the stat will contain metadata information such as size, mtime and etag.
|
|
9291
|
+
* Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,
|
|
9292
|
+
* optimized for viewing a code definition.
|
|
9267
9293
|
*/
|
|
9268
|
-
|
|
9269
|
-
resolve(resource: URI, options?: IResolveFileOptions): Promise<IFileStat>;
|
|
9294
|
+
revealRangeNearTop(range: IRange, scrollType?: ScrollType): void;
|
|
9270
9295
|
/**
|
|
9271
|
-
*
|
|
9272
|
-
*
|
|
9273
|
-
* If one of the resolve targets fails to resolve returns a fake `IFileStat` instead of
|
|
9274
|
-
* making the whole call fail.
|
|
9296
|
+
* Scroll vertically or horizontally as necessary and reveal a range close to the top of the viewport,
|
|
9297
|
+
* optimized for viewing a code definition. Only if it lies outside the viewport.
|
|
9275
9298
|
*/
|
|
9276
|
-
|
|
9277
|
-
|
|
9278
|
-
|
|
9279
|
-
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9283
|
-
|
|
9299
|
+
revealRangeNearTopIfOutsideViewport(range: IRange, scrollType?: ScrollType): void;
|
|
9300
|
+
/**
|
|
9301
|
+
* Directly trigger a handler or an editor action.
|
|
9302
|
+
* @param source The source of the call.
|
|
9303
|
+
* @param handlerId The id of the handler or the id of a contribution.
|
|
9304
|
+
* @param payload Extra data to be sent to the handler.
|
|
9305
|
+
*/
|
|
9306
|
+
trigger(source: string | null | undefined, handlerId: string, payload: any): void;
|
|
9284
9307
|
/**
|
|
9285
|
-
*
|
|
9286
|
-
* resource is pointing to a folder.
|
|
9308
|
+
* Gets the current model attached to this editor.
|
|
9287
9309
|
*/
|
|
9288
|
-
|
|
9310
|
+
getModel(): IEditorModel | null;
|
|
9289
9311
|
/**
|
|
9290
|
-
*
|
|
9312
|
+
* Sets the current model attached to this editor.
|
|
9313
|
+
* If the previous model was created by the editor via the value key in the options
|
|
9314
|
+
* literal object, it will be destroyed. Otherwise, if the previous model was set
|
|
9315
|
+
* via setModel, or the model key in the options literal object, the previous model
|
|
9316
|
+
* will not be destroyed.
|
|
9317
|
+
* It is safe to call setModel(null) to simply detach the current model from the editor.
|
|
9291
9318
|
*/
|
|
9292
|
-
|
|
9319
|
+
setModel(model: IEditorModel | null): void;
|
|
9293
9320
|
/**
|
|
9294
|
-
*
|
|
9321
|
+
* Create a collection of decorations. All decorations added through this collection
|
|
9322
|
+
* will get the ownerId of the editor (meaning they will not show up in other editors).
|
|
9323
|
+
* These decorations will be automatically cleared when the editor's model changes.
|
|
9295
9324
|
*/
|
|
9296
|
-
|
|
9325
|
+
createDecorationsCollection(decorations?: IModelDeltaDecoration[]): IEditorDecorationsCollection;
|
|
9297
9326
|
/**
|
|
9298
|
-
*
|
|
9327
|
+
* Change the decorations. All decorations added through this changeAccessor
|
|
9328
|
+
* will get the ownerId of the editor (meaning they will not show up in other
|
|
9329
|
+
* editors).
|
|
9330
|
+
* @see {@link ITextModel.changeDecorations}
|
|
9331
|
+
* @internal
|
|
9299
9332
|
*/
|
|
9300
|
-
|
|
9333
|
+
changeDecorations(callback: (changeAccessor: IModelDecorationsChangeAccessor) => any): any;
|
|
9334
|
+
}
|
|
9335
|
+
/**
|
|
9336
|
+
* A diff editor.
|
|
9337
|
+
*
|
|
9338
|
+
* @internal
|
|
9339
|
+
*/
|
|
9340
|
+
interface IDiffEditor$1 extends IEditor {
|
|
9301
9341
|
/**
|
|
9302
|
-
*
|
|
9303
|
-
*
|
|
9304
|
-
* Emits a `FileOperation.WRITE` file operation event when successful.
|
|
9342
|
+
* Type the getModel() of IEditor.
|
|
9305
9343
|
*/
|
|
9306
|
-
|
|
9344
|
+
getModel(): IDiffEditorModel | null;
|
|
9307
9345
|
/**
|
|
9308
|
-
*
|
|
9309
|
-
*
|
|
9310
|
-
* The optional parameter overwrite can be set to replace an existing file at the location.
|
|
9311
|
-
*
|
|
9312
|
-
* Emits a `FileOperation.MOVE` file operation event when successful.
|
|
9346
|
+
* Get the `original` editor.
|
|
9313
9347
|
*/
|
|
9314
|
-
|
|
9348
|
+
getOriginalEditor(): IEditor;
|
|
9315
9349
|
/**
|
|
9316
|
-
*
|
|
9317
|
-
* be performed. Returns an Error if the operation cannot be done.
|
|
9350
|
+
* Get the `modified` editor.
|
|
9318
9351
|
*/
|
|
9319
|
-
|
|
9352
|
+
getModifiedEditor(): IEditor;
|
|
9353
|
+
}
|
|
9354
|
+
/**
|
|
9355
|
+
* A collection of decorations
|
|
9356
|
+
*/
|
|
9357
|
+
interface IEditorDecorationsCollection {
|
|
9320
9358
|
/**
|
|
9321
|
-
*
|
|
9322
|
-
*
|
|
9323
|
-
*
|
|
9324
|
-
* Emits a `FileOperation.COPY` file operation event when successful.
|
|
9359
|
+
* An event emitted when decorations change in the editor,
|
|
9360
|
+
* but the change is not caused by us setting or clearing the collection.
|
|
9325
9361
|
*/
|
|
9326
|
-
|
|
9362
|
+
onDidChange: Event<IModelDecorationsChangedEvent>;
|
|
9327
9363
|
/**
|
|
9328
|
-
*
|
|
9329
|
-
* be performed. Returns an Error if the operation cannot be done.
|
|
9364
|
+
* Get the decorations count.
|
|
9330
9365
|
*/
|
|
9331
|
-
|
|
9366
|
+
length: number;
|
|
9332
9367
|
/**
|
|
9333
|
-
*
|
|
9334
|
-
*
|
|
9335
|
-
* If the target path exists, it will be overwritten.
|
|
9368
|
+
* Get the range for a decoration.
|
|
9336
9369
|
*/
|
|
9337
|
-
|
|
9370
|
+
getRange(index: number): Range | null;
|
|
9338
9371
|
/**
|
|
9339
|
-
*
|
|
9340
|
-
* will have the stat model object as a result.
|
|
9341
|
-
*
|
|
9342
|
-
* The optional parameter content can be used as value to fill into the new file.
|
|
9343
|
-
*
|
|
9344
|
-
* Emits a `FileOperation.CREATE` file operation event when successful.
|
|
9372
|
+
* Get all ranges for decorations.
|
|
9345
9373
|
*/
|
|
9346
|
-
|
|
9374
|
+
getRanges(): Range[];
|
|
9347
9375
|
/**
|
|
9348
|
-
*
|
|
9349
|
-
* be performed. Returns an Error if the operation cannot be done.
|
|
9376
|
+
* Determine if a decoration is in this collection.
|
|
9350
9377
|
*/
|
|
9351
|
-
|
|
9378
|
+
has(decoration: IModelDecoration): boolean;
|
|
9352
9379
|
/**
|
|
9353
|
-
*
|
|
9354
|
-
* will have the stat model object as a result.
|
|
9355
|
-
*
|
|
9356
|
-
* Emits a `FileOperation.CREATE` file operation event when successful.
|
|
9380
|
+
* Replace all previous decorations with `newDecorations`.
|
|
9357
9381
|
*/
|
|
9358
|
-
|
|
9382
|
+
set(newDecorations: IModelDeltaDecoration[]): void;
|
|
9359
9383
|
/**
|
|
9360
|
-
*
|
|
9361
|
-
* move the file to trash. The optional recursive parameter allows to delete
|
|
9362
|
-
* non-empty folders recursively.
|
|
9363
|
-
*
|
|
9364
|
-
* Emits a `FileOperation.DELETE` file operation event when successful.
|
|
9384
|
+
* Remove all previous decorations.
|
|
9365
9385
|
*/
|
|
9366
|
-
|
|
9386
|
+
clear(): void;
|
|
9387
|
+
}
|
|
9388
|
+
/**
|
|
9389
|
+
* @internal
|
|
9390
|
+
*/
|
|
9391
|
+
interface IThemeDecorationRenderOptions {
|
|
9392
|
+
backgroundColor?: string | ThemeColor;
|
|
9393
|
+
outline?: string;
|
|
9394
|
+
outlineColor?: string | ThemeColor;
|
|
9395
|
+
outlineStyle?: string;
|
|
9396
|
+
outlineWidth?: string;
|
|
9397
|
+
border?: string;
|
|
9398
|
+
borderColor?: string | ThemeColor;
|
|
9399
|
+
borderRadius?: string;
|
|
9400
|
+
borderSpacing?: string;
|
|
9401
|
+
borderStyle?: string;
|
|
9402
|
+
borderWidth?: string;
|
|
9403
|
+
fontStyle?: string;
|
|
9404
|
+
fontWeight?: string;
|
|
9405
|
+
fontSize?: string;
|
|
9406
|
+
textDecoration?: string;
|
|
9407
|
+
cursor?: string;
|
|
9408
|
+
color?: string | ThemeColor;
|
|
9409
|
+
opacity?: string;
|
|
9410
|
+
letterSpacing?: string;
|
|
9411
|
+
gutterIconPath?: UriComponents;
|
|
9412
|
+
gutterIconSize?: string;
|
|
9413
|
+
overviewRulerColor?: string | ThemeColor;
|
|
9367
9414
|
/**
|
|
9368
|
-
*
|
|
9369
|
-
* be performed. Returns an Error if the operation cannot be done.
|
|
9415
|
+
* @deprecated
|
|
9370
9416
|
*/
|
|
9371
|
-
|
|
9417
|
+
before?: IContentDecorationRenderOptions;
|
|
9372
9418
|
/**
|
|
9373
|
-
*
|
|
9419
|
+
* @deprecated
|
|
9374
9420
|
*/
|
|
9375
|
-
|
|
9421
|
+
after?: IContentDecorationRenderOptions;
|
|
9376
9422
|
/**
|
|
9377
|
-
*
|
|
9378
|
-
*
|
|
9379
|
-
* Note: recursive file watching is not supported from this method. Only events from files
|
|
9380
|
-
* that are direct children of the provided resource will be reported.
|
|
9423
|
+
* @deprecated
|
|
9381
9424
|
*/
|
|
9382
|
-
|
|
9425
|
+
beforeInjectedText?: IContentDecorationRenderOptions & {
|
|
9426
|
+
affectsLetterSpacing?: boolean;
|
|
9427
|
+
};
|
|
9383
9428
|
/**
|
|
9384
|
-
*
|
|
9429
|
+
* @deprecated
|
|
9385
9430
|
*/
|
|
9386
|
-
|
|
9431
|
+
afterInjectedText?: IContentDecorationRenderOptions & {
|
|
9432
|
+
affectsLetterSpacing?: boolean;
|
|
9433
|
+
};
|
|
9387
9434
|
}
|
|
9388
|
-
|
|
9435
|
+
/**
|
|
9436
|
+
* @internal
|
|
9437
|
+
*/
|
|
9438
|
+
interface IContentDecorationRenderOptions {
|
|
9439
|
+
contentText?: string;
|
|
9440
|
+
contentIconPath?: UriComponents;
|
|
9441
|
+
border?: string;
|
|
9442
|
+
borderColor?: string | ThemeColor;
|
|
9443
|
+
borderRadius?: string;
|
|
9444
|
+
fontStyle?: string;
|
|
9445
|
+
fontWeight?: string;
|
|
9446
|
+
fontSize?: string;
|
|
9447
|
+
fontFamily?: string;
|
|
9448
|
+
textDecoration?: string;
|
|
9449
|
+
color?: string | ThemeColor;
|
|
9450
|
+
backgroundColor?: string | ThemeColor;
|
|
9451
|
+
opacity?: string;
|
|
9452
|
+
verticalAlign?: string;
|
|
9453
|
+
margin?: string;
|
|
9454
|
+
padding?: string;
|
|
9455
|
+
width?: string;
|
|
9456
|
+
height?: string;
|
|
9457
|
+
}
|
|
9458
|
+
/**
|
|
9459
|
+
* @internal
|
|
9460
|
+
*/
|
|
9461
|
+
interface IDecorationRenderOptions extends IThemeDecorationRenderOptions {
|
|
9462
|
+
isWholeLine?: boolean;
|
|
9463
|
+
rangeBehavior?: TrackedRangeStickiness;
|
|
9464
|
+
overviewRulerLane?: OverviewRulerLane;
|
|
9465
|
+
light?: IThemeDecorationRenderOptions;
|
|
9466
|
+
dark?: IThemeDecorationRenderOptions;
|
|
9467
|
+
}
|
|
9468
|
+
|
|
9469
|
+
interface IDiffComputationResult {
|
|
9470
|
+
quitEarly: boolean;
|
|
9471
|
+
identical: boolean;
|
|
9472
|
+
changes: ILineChange[];
|
|
9473
|
+
}
|
|
9474
|
+
/**
|
|
9475
|
+
* A change
|
|
9476
|
+
*/
|
|
9477
|
+
interface IChange {
|
|
9478
|
+
readonly originalStartLineNumber: number;
|
|
9479
|
+
readonly originalEndLineNumber: number;
|
|
9480
|
+
readonly modifiedStartLineNumber: number;
|
|
9481
|
+
readonly modifiedEndLineNumber: number;
|
|
9482
|
+
}
|
|
9483
|
+
/**
|
|
9484
|
+
* A character level change.
|
|
9485
|
+
*/
|
|
9486
|
+
interface ICharChange extends IChange {
|
|
9487
|
+
readonly originalStartColumn: number;
|
|
9488
|
+
readonly originalEndColumn: number;
|
|
9489
|
+
readonly modifiedStartColumn: number;
|
|
9490
|
+
readonly modifiedEndColumn: number;
|
|
9491
|
+
}
|
|
9492
|
+
/**
|
|
9493
|
+
* A line change
|
|
9494
|
+
*/
|
|
9495
|
+
interface ILineChange extends IChange {
|
|
9496
|
+
readonly charChanges: ICharChange[] | undefined;
|
|
9497
|
+
}
|
|
9498
|
+
|
|
9499
|
+
/**
|
|
9500
|
+
* A rich code editor.
|
|
9501
|
+
*/
|
|
9502
|
+
type ICodeEditor = monaco.editor.ICodeEditor
|
|
9503
|
+
/**
|
|
9504
|
+
* Information about a line in the diff editor
|
|
9505
|
+
*/
|
|
9506
|
+
interface IDiffLineInformation {
|
|
9507
|
+
readonly equivalentLineNumber: number;
|
|
9508
|
+
}
|
|
9509
|
+
/**
|
|
9510
|
+
* A rich diff editor.
|
|
9511
|
+
*/
|
|
9512
|
+
interface IDiffEditor extends IEditor {
|
|
9389
9513
|
/**
|
|
9390
|
-
*
|
|
9391
|
-
*
|
|
9514
|
+
* Returns whether the diff editor is ignoring trim whitespace or not.
|
|
9515
|
+
* @internal
|
|
9516
|
+
*/
|
|
9517
|
+
readonly ignoreTrimWhitespace: boolean;
|
|
9518
|
+
/**
|
|
9519
|
+
* Returns whether the diff editor is rendering side by side or inline.
|
|
9520
|
+
* @internal
|
|
9521
|
+
*/
|
|
9522
|
+
readonly renderSideBySide: boolean;
|
|
9523
|
+
/**
|
|
9524
|
+
* Timeout in milliseconds after which diff computation is cancelled.
|
|
9525
|
+
* @internal
|
|
9392
9526
|
*/
|
|
9393
|
-
readonly
|
|
9394
|
-
}
|
|
9395
|
-
interface IFileUnlockOptions {
|
|
9527
|
+
readonly maxComputationTime: number;
|
|
9396
9528
|
/**
|
|
9397
|
-
*
|
|
9398
|
-
* have. A file that is write locked will throw an error for any
|
|
9399
|
-
* attempt to write to unless `unlock: true` is provided.
|
|
9529
|
+
* @see {@link ICodeEditor.getContainerDomNode}
|
|
9400
9530
|
*/
|
|
9401
|
-
|
|
9402
|
-
}
|
|
9403
|
-
interface IFileReadStreamOptions {
|
|
9531
|
+
getContainerDomNode(): HTMLElement;
|
|
9404
9532
|
/**
|
|
9405
|
-
*
|
|
9406
|
-
*
|
|
9533
|
+
* An event emitted when the diff information computed by this diff editor has been updated.
|
|
9534
|
+
* @event
|
|
9407
9535
|
*/
|
|
9408
|
-
readonly
|
|
9536
|
+
readonly onDidUpdateDiff: Event<void>;
|
|
9409
9537
|
/**
|
|
9410
|
-
*
|
|
9411
|
-
* will be read.
|
|
9538
|
+
* Saves current view state of the editor in a serializable object.
|
|
9412
9539
|
*/
|
|
9413
|
-
|
|
9540
|
+
saveViewState(): IDiffEditorViewState | null;
|
|
9414
9541
|
/**
|
|
9415
|
-
*
|
|
9542
|
+
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
|
|
9416
9543
|
*/
|
|
9417
|
-
|
|
9418
|
-
readonly size?: number;
|
|
9419
|
-
readonly memory?: number;
|
|
9420
|
-
};
|
|
9421
|
-
}
|
|
9422
|
-
interface IFileWriteOptions extends IFileOverwriteOptions, IFileUnlockOptions {
|
|
9544
|
+
restoreViewState(state: IDiffEditorViewState | null): void;
|
|
9423
9545
|
/**
|
|
9424
|
-
*
|
|
9425
|
-
* throw an error otherwise if the file does not exist.
|
|
9546
|
+
* Type the getModel() of IEditor.
|
|
9426
9547
|
*/
|
|
9427
|
-
|
|
9428
|
-
}
|
|
9429
|
-
declare type IFileOpenOptions = IFileOpenForReadOptions | IFileOpenForWriteOptions;
|
|
9430
|
-
interface IFileOpenForReadOptions {
|
|
9548
|
+
getModel(): IDiffEditorModel | null;
|
|
9431
9549
|
/**
|
|
9432
|
-
*
|
|
9550
|
+
* Sets the current model attached to this editor.
|
|
9551
|
+
* If the previous model was created by the editor via the value key in the options
|
|
9552
|
+
* literal object, it will be destroyed. Otherwise, if the previous model was set
|
|
9553
|
+
* via setModel, or the model key in the options literal object, the previous model
|
|
9554
|
+
* will not be destroyed.
|
|
9555
|
+
* It is safe to call setModel(null) to simply detach the current model from the editor.
|
|
9433
9556
|
*/
|
|
9434
|
-
|
|
9435
|
-
}
|
|
9436
|
-
interface IFileOpenForWriteOptions extends IFileUnlockOptions {
|
|
9557
|
+
setModel(model: IDiffEditorModel | null): void;
|
|
9437
9558
|
/**
|
|
9438
|
-
*
|
|
9559
|
+
* Get the `original` editor.
|
|
9439
9560
|
*/
|
|
9440
|
-
|
|
9441
|
-
}
|
|
9442
|
-
interface IFileDeleteOptions {
|
|
9561
|
+
getOriginalEditor(): ICodeEditor;
|
|
9443
9562
|
/**
|
|
9444
|
-
*
|
|
9445
|
-
* only applies to folders and can lead to an error unless provided
|
|
9446
|
-
* if the folder is not empty.
|
|
9563
|
+
* Get the `modified` editor.
|
|
9447
9564
|
*/
|
|
9448
|
-
|
|
9565
|
+
getModifiedEditor(): ICodeEditor;
|
|
9449
9566
|
/**
|
|
9450
|
-
*
|
|
9451
|
-
* instead of deleting it permanently from disk. This
|
|
9452
|
-
* option maybe not be supported on all providers.
|
|
9567
|
+
* Get the computed diff information.
|
|
9453
9568
|
*/
|
|
9454
|
-
|
|
9455
|
-
}
|
|
9456
|
-
declare enum FileType {
|
|
9569
|
+
getLineChanges(): ILineChange[] | null;
|
|
9457
9570
|
/**
|
|
9458
|
-
*
|
|
9571
|
+
* Get the computed diff information.
|
|
9572
|
+
* @internal
|
|
9459
9573
|
*/
|
|
9460
|
-
|
|
9574
|
+
getDiffComputationResult(): IDiffComputationResult | null;
|
|
9461
9575
|
/**
|
|
9462
|
-
*
|
|
9576
|
+
* Get information based on computed diff about a line number from the original model.
|
|
9577
|
+
* If the diff computation is not finished or the model is missing, will return null.
|
|
9463
9578
|
*/
|
|
9464
|
-
|
|
9579
|
+
getDiffLineInformationForOriginal(lineNumber: number): IDiffLineInformation | null;
|
|
9465
9580
|
/**
|
|
9466
|
-
*
|
|
9581
|
+
* Get information based on computed diff about a line number from the modified model.
|
|
9582
|
+
* If the diff computation is not finished or the model is missing, will return null.
|
|
9467
9583
|
*/
|
|
9468
|
-
|
|
9584
|
+
getDiffLineInformationForModified(lineNumber: number): IDiffLineInformation | null;
|
|
9469
9585
|
/**
|
|
9470
|
-
*
|
|
9471
|
-
*
|
|
9472
|
-
* Note: even when the file is a symbolic link, you can test for
|
|
9473
|
-
* `FileType.File` and `FileType.Directory` to know the type of
|
|
9474
|
-
* the target the link points to.
|
|
9586
|
+
* Update the editor's options after the editor has been created.
|
|
9475
9587
|
*/
|
|
9476
|
-
|
|
9588
|
+
updateOptions(newOptions: IDiffEditorOptions): void;
|
|
9477
9589
|
}
|
|
9478
|
-
|
|
9590
|
+
|
|
9591
|
+
declare const ICodeEditorService: ServiceIdentifier<ICodeEditorService>;
|
|
9592
|
+
interface ICodeEditorService {
|
|
9593
|
+
readonly _serviceBrand: undefined;
|
|
9594
|
+
readonly onCodeEditorAdd: Event<ICodeEditor>;
|
|
9595
|
+
readonly onCodeEditorRemove: Event<ICodeEditor>;
|
|
9596
|
+
readonly onDiffEditorAdd: Event<IDiffEditor>;
|
|
9597
|
+
readonly onDiffEditorRemove: Event<IDiffEditor>;
|
|
9598
|
+
readonly onDidChangeTransientModelProperty: Event<ITextModel>;
|
|
9599
|
+
readonly onDecorationTypeRegistered: Event<string>;
|
|
9600
|
+
addCodeEditor(editor: ICodeEditor): void;
|
|
9601
|
+
removeCodeEditor(editor: ICodeEditor): void;
|
|
9602
|
+
listCodeEditors(): readonly ICodeEditor[];
|
|
9603
|
+
addDiffEditor(editor: IDiffEditor): void;
|
|
9604
|
+
removeDiffEditor(editor: IDiffEditor): void;
|
|
9605
|
+
listDiffEditors(): readonly IDiffEditor[];
|
|
9479
9606
|
/**
|
|
9480
|
-
*
|
|
9607
|
+
* Returns the current focused code editor (if the focus is in the editor or in an editor widget) or null.
|
|
9481
9608
|
*/
|
|
9482
|
-
|
|
9609
|
+
getFocusedCodeEditor(): ICodeEditor | null;
|
|
9610
|
+
registerDecorationType(description: string, key: string, options: IDecorationRenderOptions, parentTypeKey?: string, editor?: ICodeEditor): void;
|
|
9611
|
+
removeDecorationType(key: string): void;
|
|
9612
|
+
resolveDecorationOptions(typeKey: string, writable: boolean): IModelDecorationOptions;
|
|
9613
|
+
resolveDecorationCSSRules(decorationTypeKey: string): CSSRuleList | null;
|
|
9614
|
+
setModelProperty(resource: URI, key: string, value: any): void;
|
|
9615
|
+
getModelProperty(resource: URI, key: string): any;
|
|
9616
|
+
setTransientModelProperty(model: ITextModel, key: string, value: any): void;
|
|
9617
|
+
getTransientModelProperty(model: ITextModel, key: string): any;
|
|
9618
|
+
getTransientModelProperties(model: ITextModel): [string, any][] | undefined;
|
|
9619
|
+
getActiveCodeEditor(): ICodeEditor | null;
|
|
9620
|
+
openCodeEditor(input: ITextResourceEditorInput, source: ICodeEditor | null, sideBySide?: boolean): Promise<ICodeEditor | null>;
|
|
9621
|
+
registerCodeEditorOpenHandler(handler: ICodeEditorOpenHandler): IDisposable;
|
|
9483
9622
|
}
|
|
9484
|
-
interface
|
|
9623
|
+
interface ICodeEditorOpenHandler {
|
|
9624
|
+
(input: ITextResourceEditorInput, source: ICodeEditor | null, sideBySide?: boolean): Promise<ICodeEditor | null>;
|
|
9625
|
+
}
|
|
9626
|
+
|
|
9627
|
+
interface IDimension {
|
|
9628
|
+
readonly width: number;
|
|
9629
|
+
readonly height: number;
|
|
9630
|
+
}
|
|
9631
|
+
declare class Dimension implements IDimension {
|
|
9632
|
+
readonly width: number;
|
|
9633
|
+
readonly height: number;
|
|
9634
|
+
static readonly None: Dimension;
|
|
9635
|
+
constructor(width: number, height: number);
|
|
9636
|
+
with(width?: number, height?: number): Dimension;
|
|
9637
|
+
static is(obj: unknown): obj is IDimension;
|
|
9638
|
+
static lift(obj: IDimension): Dimension;
|
|
9639
|
+
static equals(a: Dimension | undefined, b: Dimension | undefined): boolean;
|
|
9640
|
+
}
|
|
9641
|
+
|
|
9642
|
+
interface ILayoutOffsetInfo {
|
|
9485
9643
|
/**
|
|
9486
|
-
*
|
|
9644
|
+
* Generic top offset
|
|
9487
9645
|
*/
|
|
9488
|
-
readonly
|
|
9646
|
+
readonly top: number;
|
|
9489
9647
|
/**
|
|
9490
|
-
*
|
|
9648
|
+
* Quick pick specific top offset.
|
|
9491
9649
|
*/
|
|
9492
|
-
readonly
|
|
9650
|
+
readonly quickPickTop: number;
|
|
9651
|
+
}
|
|
9652
|
+
declare const ILayoutService: ServiceIdentifier<ILayoutService>;
|
|
9653
|
+
interface ILayoutService {
|
|
9654
|
+
readonly _serviceBrand: undefined;
|
|
9493
9655
|
/**
|
|
9494
|
-
* The
|
|
9656
|
+
* The dimensions of the container.
|
|
9495
9657
|
*/
|
|
9496
|
-
readonly
|
|
9658
|
+
readonly dimension: IDimension;
|
|
9497
9659
|
/**
|
|
9498
|
-
*
|
|
9660
|
+
* Does the application have a single container?
|
|
9499
9661
|
*/
|
|
9500
|
-
readonly
|
|
9662
|
+
readonly hasContainer: boolean;
|
|
9501
9663
|
/**
|
|
9502
|
-
*
|
|
9664
|
+
* Container of the application.
|
|
9665
|
+
*
|
|
9666
|
+
* **NOTE**: In the standalone editor case, multiple editors can be created on a page.
|
|
9667
|
+
* Therefore, in the standalone editor case, there are multiple containers, not just
|
|
9668
|
+
* a single one. If you ship code that needs a "container" for the standalone editor,
|
|
9669
|
+
* please use `ICodeEditorService` to get the current focused code editor and use its
|
|
9670
|
+
* container if necessary. You can also instantiate `EditorScopedLayoutService`
|
|
9671
|
+
* which implements `ILayoutService` but is not a part of the service collection because
|
|
9672
|
+
* it is code editor instance specific.
|
|
9673
|
+
*
|
|
9503
9674
|
*/
|
|
9504
|
-
readonly
|
|
9505
|
-
}
|
|
9506
|
-
interface IWatchOptions {
|
|
9675
|
+
readonly container: HTMLElement;
|
|
9507
9676
|
/**
|
|
9508
|
-
*
|
|
9509
|
-
* and all of its children.
|
|
9677
|
+
* An offset to use for positioning elements inside the container.
|
|
9510
9678
|
*/
|
|
9511
|
-
readonly
|
|
9679
|
+
readonly offset: ILayoutOffsetInfo;
|
|
9512
9680
|
/**
|
|
9513
|
-
*
|
|
9681
|
+
* An event that is emitted when the container is layed out. The
|
|
9682
|
+
* event carries the dimensions of the container as part of it.
|
|
9514
9683
|
*/
|
|
9515
|
-
|
|
9684
|
+
readonly onDidLayout: Event<IDimension>;
|
|
9516
9685
|
/**
|
|
9517
|
-
*
|
|
9518
|
-
* watching. If not provided, all paths are considered for
|
|
9519
|
-
* events.
|
|
9686
|
+
* Focus the primary component of the container.
|
|
9520
9687
|
*/
|
|
9521
|
-
|
|
9688
|
+
focus(): void;
|
|
9522
9689
|
}
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9531
|
-
|
|
9690
|
+
|
|
9691
|
+
interface IPropertyData {
|
|
9692
|
+
classification: 'SystemMetaData' | 'CallstackOrException' | 'CustomerContent' | 'PublicNonPersonalData' | 'EndUserPseudonymizedInformation';
|
|
9693
|
+
purpose: 'PerformanceAndHealth' | 'FeatureInsight' | 'BusinessInsight';
|
|
9694
|
+
comment?: string;
|
|
9695
|
+
expiration?: string;
|
|
9696
|
+
endpoint?: string;
|
|
9697
|
+
isMeasurement?: boolean;
|
|
9698
|
+
}
|
|
9699
|
+
interface IGDPRProperty {
|
|
9700
|
+
owner?: string;
|
|
9701
|
+
comment?: string;
|
|
9702
|
+
expiration?: string;
|
|
9703
|
+
readonly [name: string]: IPropertyData | undefined | IGDPRProperty | string;
|
|
9704
|
+
}
|
|
9705
|
+
declare type IGDPRPropertyWithoutMetadata<T> = Omit<T, 'owner' | 'comment' | 'expiration'>;
|
|
9706
|
+
declare type ClassifiedEvent<T extends IGDPRProperty> = {
|
|
9707
|
+
[k in keyof IGDPRPropertyWithoutMetadata<T>]: any;
|
|
9708
|
+
};
|
|
9709
|
+
declare type StrictPropertyChecker<TEvent, TClassifiedEvent, TError> = keyof TEvent extends keyof TClassifiedEvent ? keyof TClassifiedEvent extends keyof TEvent ? TEvent : TError : TError;
|
|
9710
|
+
declare type StrictPropertyCheckError = {
|
|
9711
|
+
error: 'Type of classified event does not match event properties';
|
|
9712
|
+
};
|
|
9713
|
+
declare type StrictPropertyCheck<T extends IGDPRProperty, E> = StrictPropertyChecker<E, ClassifiedEvent<T>, StrictPropertyCheckError>;
|
|
9714
|
+
declare type GDPRClassification<T> = {
|
|
9715
|
+
[_ in keyof T]: IPropertyData | IGDPRProperty | undefined | string;
|
|
9716
|
+
};
|
|
9717
|
+
|
|
9718
|
+
/**
|
|
9719
|
+
* @deprecated Use {@link IObservable} instead.
|
|
9720
|
+
*/
|
|
9721
|
+
interface IObservableValue<T> {
|
|
9722
|
+
onDidChange: Event<T>;
|
|
9723
|
+
readonly value: T;
|
|
9724
|
+
}
|
|
9725
|
+
|
|
9726
|
+
interface ITelemetryInfo {
|
|
9727
|
+
sessionId: string;
|
|
9728
|
+
machineId: string;
|
|
9729
|
+
firstSessionDate: string;
|
|
9730
|
+
msftInternal?: boolean;
|
|
9731
|
+
}
|
|
9732
|
+
interface ITelemetryData {
|
|
9733
|
+
from?: string;
|
|
9734
|
+
target?: string;
|
|
9735
|
+
[key: string]: any;
|
|
9736
|
+
}
|
|
9737
|
+
declare const ITelemetryService: ServiceIdentifier<ITelemetryService>;
|
|
9738
|
+
interface ITelemetryService {
|
|
9532
9739
|
/**
|
|
9533
|
-
*
|
|
9740
|
+
* Whether error telemetry will get sent. If false, `publicLogError` will no-op.
|
|
9534
9741
|
*/
|
|
9535
|
-
|
|
9742
|
+
readonly sendErrorTelemetry: boolean;
|
|
9743
|
+
readonly _serviceBrand: undefined;
|
|
9536
9744
|
/**
|
|
9537
|
-
*
|
|
9745
|
+
* @deprecated Use publicLog2 and the typescript GDPR annotation where possible
|
|
9538
9746
|
*/
|
|
9539
|
-
|
|
9747
|
+
publicLog(eventName: string, data?: ITelemetryData, anonymizeFilePaths?: boolean): Promise<void>;
|
|
9540
9748
|
/**
|
|
9541
|
-
*
|
|
9749
|
+
* Sends a telemetry event that has been privacy approved.
|
|
9750
|
+
* Do not call this unless you have been given approval.
|
|
9542
9751
|
*/
|
|
9543
|
-
|
|
9752
|
+
publicLog2<E extends ClassifiedEvent<T> = never, T extends GDPRClassification<T> = never>(eventName: string, data?: StrictPropertyCheck<T, E>, anonymizeFilePaths?: boolean): Promise<void>;
|
|
9544
9753
|
/**
|
|
9545
|
-
*
|
|
9754
|
+
* @deprecated Use publicLogError2 and the typescript GDPR annotation where possible
|
|
9546
9755
|
*/
|
|
9547
|
-
|
|
9756
|
+
publicLogError(errorEventName: string, data?: ITelemetryData): Promise<void>;
|
|
9757
|
+
publicLogError2<E extends ClassifiedEvent<T> = never, T extends GDPRClassification<T> = never>(eventName: string, data?: StrictPropertyCheck<T, E>): Promise<void>;
|
|
9758
|
+
getTelemetryInfo(): Promise<ITelemetryInfo>;
|
|
9759
|
+
setExperimentProperty(name: string, value: string): void;
|
|
9760
|
+
readonly telemetryLevel: IObservableValue<TelemetryLevel>;
|
|
9761
|
+
}
|
|
9762
|
+
declare const enum TelemetryLevel {
|
|
9763
|
+
NONE = 0,
|
|
9764
|
+
CRASH = 1,
|
|
9765
|
+
ERROR = 2,
|
|
9766
|
+
USAGE = 3
|
|
9767
|
+
}
|
|
9768
|
+
|
|
9769
|
+
declare type DialogType = 'none' | 'info' | 'error' | 'question' | 'warning';
|
|
9770
|
+
interface ICheckbox {
|
|
9771
|
+
readonly label: string;
|
|
9772
|
+
readonly checked?: boolean;
|
|
9773
|
+
}
|
|
9774
|
+
interface IConfirmation {
|
|
9775
|
+
readonly title?: string;
|
|
9776
|
+
readonly type?: DialogType;
|
|
9777
|
+
readonly message: string;
|
|
9778
|
+
readonly detail?: string;
|
|
9779
|
+
readonly primaryButton?: string;
|
|
9780
|
+
readonly secondaryButton?: string;
|
|
9781
|
+
readonly checkbox?: ICheckbox;
|
|
9782
|
+
}
|
|
9783
|
+
interface IConfirmationResult {
|
|
9548
9784
|
/**
|
|
9549
|
-
*
|
|
9785
|
+
* Will be true if the dialog was confirmed with the primary button
|
|
9786
|
+
* pressed.
|
|
9550
9787
|
*/
|
|
9551
|
-
|
|
9788
|
+
readonly confirmed: boolean;
|
|
9552
9789
|
/**
|
|
9553
|
-
*
|
|
9790
|
+
* This will only be defined if the confirmation was created
|
|
9791
|
+
* with the checkbox option defined.
|
|
9554
9792
|
*/
|
|
9555
|
-
|
|
9793
|
+
readonly checkboxChecked?: boolean;
|
|
9794
|
+
}
|
|
9795
|
+
interface IShowResult {
|
|
9556
9796
|
/**
|
|
9557
|
-
*
|
|
9558
|
-
*
|
|
9797
|
+
* Selected choice index. If the user refused to choose,
|
|
9798
|
+
* then a promise with index of `cancelId` option is returned. If there is no such
|
|
9799
|
+
* option then promise with index `0` is returned.
|
|
9559
9800
|
*/
|
|
9560
|
-
|
|
9801
|
+
readonly choice: number;
|
|
9561
9802
|
/**
|
|
9562
|
-
*
|
|
9803
|
+
* This will only be defined if the confirmation was created
|
|
9804
|
+
* with the checkbox option defined.
|
|
9563
9805
|
*/
|
|
9564
|
-
|
|
9565
|
-
}
|
|
9566
|
-
interface IFileSystemProvider {
|
|
9567
|
-
readonly capabilities: FileSystemProviderCapabilities;
|
|
9568
|
-
readonly onDidChangeCapabilities: Event<void>;
|
|
9569
|
-
readonly onDidChangeFile: Event<readonly IFileChange[]>;
|
|
9570
|
-
readonly onDidWatchError?: Event<string>;
|
|
9571
|
-
watch(resource: URI, opts: IWatchOptions): IDisposable;
|
|
9572
|
-
stat(resource: URI): Promise<IStat>;
|
|
9573
|
-
mkdir(resource: URI): Promise<void>;
|
|
9574
|
-
readdir(resource: URI): Promise<[string, FileType][]>;
|
|
9575
|
-
delete(resource: URI, opts: IFileDeleteOptions): Promise<void>;
|
|
9576
|
-
rename(from: URI, to: URI, opts: IFileOverwriteOptions): Promise<void>;
|
|
9577
|
-
copy?(from: URI, to: URI, opts: IFileOverwriteOptions): Promise<void>;
|
|
9578
|
-
readFile?(resource: URI): Promise<Uint8Array>;
|
|
9579
|
-
writeFile?(resource: URI, content: Uint8Array, opts: IFileWriteOptions): Promise<void>;
|
|
9580
|
-
readFileStream?(resource: URI, opts: IFileReadStreamOptions, token: CancellationToken): ReadableStreamEvents<Uint8Array>;
|
|
9581
|
-
open?(resource: URI, opts: IFileOpenOptions): Promise<number>;
|
|
9582
|
-
close?(fd: number): Promise<void>;
|
|
9583
|
-
read?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>;
|
|
9584
|
-
write?(fd: number, pos: number, data: Uint8Array, offset: number, length: number): Promise<number>;
|
|
9585
|
-
cloneFile?(from: URI, to: URI): Promise<void>;
|
|
9586
|
-
}
|
|
9587
|
-
interface IFileSystemProviderRegistrationEvent {
|
|
9588
|
-
readonly added: boolean;
|
|
9589
|
-
readonly scheme: string;
|
|
9590
|
-
readonly provider?: IFileSystemProvider;
|
|
9591
|
-
}
|
|
9592
|
-
interface IFileSystemProviderCapabilitiesChangeEvent {
|
|
9593
|
-
readonly provider: IFileSystemProvider;
|
|
9594
|
-
readonly scheme: string;
|
|
9595
|
-
}
|
|
9596
|
-
interface IFileSystemProviderActivationEvent {
|
|
9597
|
-
readonly scheme: string;
|
|
9598
|
-
join(promise: Promise<void>): void;
|
|
9806
|
+
readonly checkboxChecked?: boolean;
|
|
9599
9807
|
}
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9605
|
-
|
|
9808
|
+
interface IInputResult extends IShowResult {
|
|
9809
|
+
/**
|
|
9810
|
+
* Values for the input fields as provided by the user
|
|
9811
|
+
* or `undefined` if none.
|
|
9812
|
+
*/
|
|
9813
|
+
readonly values?: string[];
|
|
9606
9814
|
}
|
|
9607
|
-
interface
|
|
9608
|
-
readonly
|
|
9609
|
-
readonly
|
|
9610
|
-
|
|
9611
|
-
|
|
9815
|
+
interface ICustomDialogOptions {
|
|
9816
|
+
readonly buttonDetails?: string[];
|
|
9817
|
+
readonly markdownDetails?: ICustomDialogMarkdown[];
|
|
9818
|
+
readonly classes?: string[];
|
|
9819
|
+
readonly icon?: Codicon;
|
|
9820
|
+
readonly disableCloseAction?: boolean;
|
|
9612
9821
|
}
|
|
9613
|
-
interface
|
|
9614
|
-
readonly
|
|
9822
|
+
interface ICustomDialogMarkdown {
|
|
9823
|
+
readonly markdown: IMarkdownString;
|
|
9824
|
+
readonly classes?: string[];
|
|
9615
9825
|
}
|
|
9616
|
-
|
|
9617
|
-
readonly
|
|
9618
|
-
readonly
|
|
9619
|
-
readonly
|
|
9620
|
-
|
|
9621
|
-
constructor(resource: URI, operation: FileOperation.CREATE | FileOperation.MOVE | FileOperation.COPY, target: IFileStatWithMetadata);
|
|
9622
|
-
isOperation(operation: FileOperation.DELETE | FileOperation.WRITE): boolean;
|
|
9623
|
-
isOperation(operation: FileOperation.CREATE | FileOperation.MOVE | FileOperation.COPY): this is IFileOperationEventWithMetadata;
|
|
9826
|
+
interface IDialogOptions {
|
|
9827
|
+
readonly cancelId?: number;
|
|
9828
|
+
readonly detail?: string;
|
|
9829
|
+
readonly checkbox?: ICheckbox;
|
|
9830
|
+
readonly custom?: boolean | ICustomDialogOptions;
|
|
9624
9831
|
}
|
|
9625
|
-
|
|
9626
|
-
|
|
9627
|
-
|
|
9628
|
-
|
|
9629
|
-
UPDATED = 0,
|
|
9630
|
-
ADDED = 1,
|
|
9631
|
-
DELETED = 2
|
|
9832
|
+
interface IInput {
|
|
9833
|
+
readonly placeholder?: string;
|
|
9834
|
+
readonly type?: 'text' | 'password';
|
|
9835
|
+
readonly value?: string;
|
|
9632
9836
|
}
|
|
9837
|
+
declare const IDialogService: ServiceIdentifier<IDialogService>;
|
|
9633
9838
|
/**
|
|
9634
|
-
*
|
|
9839
|
+
* A service to bring up modal dialogs.
|
|
9840
|
+
*
|
|
9841
|
+
* Note: use the `INotificationService.prompt()` method for a non-modal way to ask
|
|
9842
|
+
* the user for input.
|
|
9635
9843
|
*/
|
|
9636
|
-
interface
|
|
9637
|
-
|
|
9638
|
-
* The type of change that occurred to the file.
|
|
9639
|
-
*/
|
|
9640
|
-
readonly type: FileChangeType;
|
|
9641
|
-
/**
|
|
9642
|
-
* The unified resource identifier of the file that changed.
|
|
9643
|
-
*/
|
|
9644
|
-
readonly resource: URI;
|
|
9645
|
-
}
|
|
9646
|
-
declare class FileChangesEvent {
|
|
9647
|
-
private readonly added;
|
|
9648
|
-
private readonly updated;
|
|
9649
|
-
private readonly deleted;
|
|
9650
|
-
constructor(changes: readonly IFileChange[], ignorePathCasing: boolean);
|
|
9651
|
-
/**
|
|
9652
|
-
* Find out if the file change events match the provided resource.
|
|
9653
|
-
*
|
|
9654
|
-
* Note: when passing `FileChangeType.DELETED`, we consider a match
|
|
9655
|
-
* also when the parent of the resource got deleted.
|
|
9656
|
-
*/
|
|
9657
|
-
contains(resource: URI, ...types: FileChangeType[]): boolean;
|
|
9844
|
+
interface IDialogService {
|
|
9845
|
+
readonly _serviceBrand: undefined;
|
|
9658
9846
|
/**
|
|
9659
|
-
*
|
|
9660
|
-
* resource, or contain a child of this resource.
|
|
9847
|
+
* An event that fires when a dialog is about to show.
|
|
9661
9848
|
*/
|
|
9662
|
-
|
|
9663
|
-
private doContains;
|
|
9849
|
+
onWillShowDialog: Event<void>;
|
|
9664
9850
|
/**
|
|
9665
|
-
*
|
|
9851
|
+
* An event that fires when a dialog did show (closed).
|
|
9666
9852
|
*/
|
|
9667
|
-
|
|
9853
|
+
onDidShowDialog: Event<void>;
|
|
9668
9854
|
/**
|
|
9669
|
-
*
|
|
9855
|
+
* Ask the user for confirmation with a modal dialog.
|
|
9670
9856
|
*/
|
|
9671
|
-
|
|
9857
|
+
confirm(confirmation: IConfirmation): Promise<IConfirmationResult>;
|
|
9672
9858
|
/**
|
|
9673
|
-
*
|
|
9859
|
+
* Present a modal dialog to the user.
|
|
9860
|
+
*
|
|
9861
|
+
* @param severity the severity of the message
|
|
9862
|
+
* @param message the message to show
|
|
9863
|
+
* @param buttons the buttons to show. By convention, the first button should be the
|
|
9864
|
+
* primary action and the last button the "Cancel" action.
|
|
9865
|
+
*
|
|
9866
|
+
* @returns A promise with the selected choice index. If the user refused to choose,
|
|
9867
|
+
* then a promise with index of `cancelId` option is returned. If there is no such
|
|
9868
|
+
* option then promise with index `0` is returned.
|
|
9674
9869
|
*/
|
|
9675
|
-
|
|
9870
|
+
show(severity: Severity$1, message: string, buttons?: string[], options?: IDialogOptions): Promise<IShowResult>;
|
|
9676
9871
|
/**
|
|
9677
|
-
*
|
|
9678
|
-
*
|
|
9679
|
-
*
|
|
9680
|
-
*
|
|
9872
|
+
* Present a modal dialog to the user asking for input.
|
|
9873
|
+
*
|
|
9874
|
+
* @returns A promise with the selected choice index. If the user refused to choose,
|
|
9875
|
+
* then a promise with index of `cancelId` option is returned. If there is no such
|
|
9876
|
+
* option then promise with index `0` is returned. In addition, the values for the
|
|
9877
|
+
* inputs are returned as well.
|
|
9681
9878
|
*/
|
|
9682
|
-
|
|
9879
|
+
input(severity: Severity$1, message: string, buttons: string[], inputs: IInput[], options?: IDialogOptions): Promise<IInputResult>;
|
|
9683
9880
|
/**
|
|
9684
|
-
*
|
|
9685
|
-
* out if the event relates to a given resource. these methods ensure:
|
|
9686
|
-
* - that there is no expensive lookup needed (by using a `TernarySearchTree`)
|
|
9687
|
-
* - correctly handles `FileChangeType.DELETED` events
|
|
9881
|
+
* Present the about dialog to the user.
|
|
9688
9882
|
*/
|
|
9689
|
-
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9883
|
+
about(): Promise<void>;
|
|
9884
|
+
}
|
|
9885
|
+
declare const enum ConfirmResult {
|
|
9886
|
+
SAVE = 0,
|
|
9887
|
+
DONT_SAVE = 1,
|
|
9888
|
+
CANCEL = 2
|
|
9889
|
+
}
|
|
9890
|
+
|
|
9891
|
+
declare class UndoRedoSource {
|
|
9892
|
+
private static _ID;
|
|
9893
|
+
readonly id: number;
|
|
9894
|
+
private order;
|
|
9895
|
+
constructor();
|
|
9896
|
+
nextOrder(): number;
|
|
9897
|
+
static None: UndoRedoSource;
|
|
9704
9898
|
}
|
|
9705
|
-
|
|
9899
|
+
|
|
9900
|
+
interface LanguageFilter {
|
|
9901
|
+
readonly language?: string;
|
|
9902
|
+
readonly scheme?: string;
|
|
9903
|
+
readonly pattern?: string | IRelativePattern;
|
|
9904
|
+
readonly notebookType?: string;
|
|
9706
9905
|
/**
|
|
9707
|
-
*
|
|
9906
|
+
* This provider is implemented in the UI thread.
|
|
9708
9907
|
*/
|
|
9709
|
-
readonly
|
|
9908
|
+
readonly hasAccessToAllModels?: boolean;
|
|
9909
|
+
readonly exclusive?: boolean;
|
|
9910
|
+
}
|
|
9911
|
+
declare type LanguageSelector = string | LanguageFilter | ReadonlyArray<string | LanguageFilter>;
|
|
9912
|
+
|
|
9913
|
+
interface NotebookInfo {
|
|
9914
|
+
readonly uri: URI;
|
|
9915
|
+
readonly type: string;
|
|
9916
|
+
}
|
|
9917
|
+
interface NotebookInfoResolver {
|
|
9918
|
+
(uri: URI): NotebookInfo | undefined;
|
|
9919
|
+
}
|
|
9920
|
+
declare class LanguageFeatureRegistry<T> {
|
|
9921
|
+
private readonly _notebookInfoResolver?;
|
|
9922
|
+
private _clock;
|
|
9923
|
+
private readonly _entries;
|
|
9924
|
+
private readonly _onDidChange;
|
|
9925
|
+
readonly onDidChange: Event<number>;
|
|
9926
|
+
constructor(_notebookInfoResolver?: NotebookInfoResolver | undefined);
|
|
9927
|
+
register(selector: LanguageSelector, provider: T): IDisposable;
|
|
9928
|
+
has(model: ITextModel): boolean;
|
|
9929
|
+
all(model: ITextModel): T[];
|
|
9930
|
+
ordered(model: ITextModel): T[];
|
|
9931
|
+
orderedGroups(model: ITextModel): T[][];
|
|
9932
|
+
private _orderedForEach;
|
|
9933
|
+
private _lastCandidate;
|
|
9934
|
+
private _updateScores;
|
|
9935
|
+
private static _compareByScoreAndTime;
|
|
9936
|
+
}
|
|
9937
|
+
|
|
9938
|
+
interface ICommandEvent {
|
|
9939
|
+
commandId: string;
|
|
9940
|
+
args: any[];
|
|
9941
|
+
}
|
|
9942
|
+
declare const ICommandService: ServiceIdentifier<ICommandService>;
|
|
9943
|
+
interface ICommandService {
|
|
9944
|
+
readonly _serviceBrand: undefined;
|
|
9945
|
+
onWillExecuteCommand: Event<ICommandEvent>;
|
|
9946
|
+
onDidExecuteCommand: Event<ICommandEvent>;
|
|
9947
|
+
executeCommand<T = any>(commandId: string, ...args: any[]): Promise<T | undefined>;
|
|
9948
|
+
}
|
|
9949
|
+
|
|
9950
|
+
declare class ResolvedKeybindingItem {
|
|
9951
|
+
_resolvedKeybindingItemBrand: void;
|
|
9952
|
+
readonly resolvedKeybinding: ResolvedKeybinding | undefined;
|
|
9953
|
+
readonly keypressParts: string[];
|
|
9954
|
+
readonly bubble: boolean;
|
|
9955
|
+
readonly command: string | null;
|
|
9956
|
+
readonly commandArgs: any;
|
|
9957
|
+
readonly when: ContextKeyExpression | undefined;
|
|
9958
|
+
readonly isDefault: boolean;
|
|
9959
|
+
readonly extensionId: string | null;
|
|
9960
|
+
readonly isBuiltinExtension: boolean;
|
|
9961
|
+
constructor(resolvedKeybinding: ResolvedKeybinding | undefined, command: string | null, commandArgs: any, when: ContextKeyExpression | undefined, isDefault: boolean, extensionId: string | null, isBuiltinExtension: boolean);
|
|
9962
|
+
}
|
|
9963
|
+
|
|
9964
|
+
interface IResolveResult {
|
|
9965
|
+
/** Whether the resolved keybinding is entering a chord */
|
|
9966
|
+
enterChord: boolean;
|
|
9967
|
+
/** Whether the resolved keybinding is leaving (and executing) a chord */
|
|
9968
|
+
leaveChord: boolean;
|
|
9969
|
+
commandId: string | null;
|
|
9970
|
+
commandArgs: any;
|
|
9971
|
+
bubble: boolean;
|
|
9972
|
+
}
|
|
9973
|
+
|
|
9974
|
+
interface IKeyboardEvent {
|
|
9975
|
+
readonly _standardKeyboardEventBrand: true;
|
|
9976
|
+
readonly ctrlKey: boolean;
|
|
9977
|
+
readonly shiftKey: boolean;
|
|
9978
|
+
readonly altKey: boolean;
|
|
9979
|
+
readonly metaKey: boolean;
|
|
9980
|
+
readonly keyCode: KeyCode;
|
|
9981
|
+
readonly code: string;
|
|
9982
|
+
}
|
|
9983
|
+
interface KeybindingsSchemaContribution {
|
|
9984
|
+
readonly onDidChange?: Event<void>;
|
|
9985
|
+
getSchemaAdditions(): IJSONSchema[];
|
|
9986
|
+
}
|
|
9987
|
+
declare const IKeybindingService: ServiceIdentifier<IKeybindingService>;
|
|
9988
|
+
interface IKeybindingService {
|
|
9989
|
+
readonly _serviceBrand: undefined;
|
|
9990
|
+
readonly inChordMode: boolean;
|
|
9991
|
+
onDidUpdateKeybindings: Event<void>;
|
|
9710
9992
|
/**
|
|
9711
|
-
*
|
|
9712
|
-
* of the {{path}}.
|
|
9993
|
+
* Returns none, one or many (depending on keyboard layout)!
|
|
9713
9994
|
*/
|
|
9714
|
-
|
|
9995
|
+
resolveKeybinding(keybinding: Keybinding): ResolvedKeybinding[];
|
|
9996
|
+
resolveKeyboardEvent(keyboardEvent: IKeyboardEvent): ResolvedKeybinding;
|
|
9997
|
+
resolveUserBinding(userBinding: string): ResolvedKeybinding[];
|
|
9715
9998
|
/**
|
|
9716
|
-
*
|
|
9717
|
-
*
|
|
9718
|
-
* The value may or may not be resolved as
|
|
9719
|
-
* it is optional.
|
|
9999
|
+
* Resolve and dispatch `keyboardEvent` and invoke the command.
|
|
9720
10000
|
*/
|
|
9721
|
-
|
|
10001
|
+
dispatchEvent(e: IKeyboardEvent, target: IContextKeyServiceTarget): boolean;
|
|
9722
10002
|
/**
|
|
9723
|
-
*
|
|
9724
|
-
*
|
|
9725
|
-
* The value may or may not be resolved as
|
|
9726
|
-
* it is optional.
|
|
10003
|
+
* Resolve and dispatch `keyboardEvent`, but do not invoke the command or change inner state.
|
|
9727
10004
|
*/
|
|
9728
|
-
|
|
10005
|
+
softDispatch(keyboardEvent: IKeyboardEvent, target: IContextKeyServiceTarget): IResolveResult | null;
|
|
10006
|
+
dispatchByUserSettingsLabel(userSettingsLabel: string, target: IContextKeyServiceTarget): void;
|
|
9729
10007
|
/**
|
|
9730
|
-
*
|
|
9731
|
-
*
|
|
9732
|
-
* The value may or may not be resolved as
|
|
9733
|
-
* it is optional.
|
|
10008
|
+
* Look up keybindings for a command.
|
|
10009
|
+
* Use `lookupKeybinding` if you are interested in the preferred keybinding.
|
|
9734
10010
|
*/
|
|
9735
|
-
|
|
10011
|
+
lookupKeybindings(commandId: string): ResolvedKeybinding[];
|
|
9736
10012
|
/**
|
|
9737
|
-
*
|
|
9738
|
-
*
|
|
9739
|
-
*
|
|
9740
|
-
* The value may or may not be resolved as
|
|
9741
|
-
* it is optional.
|
|
10013
|
+
* Look up the preferred (last defined) keybinding for a command.
|
|
10014
|
+
* @returns The preferred keybinding or null if the command is not bound.
|
|
9742
10015
|
*/
|
|
9743
|
-
|
|
10016
|
+
lookupKeybinding(commandId: string, context?: IContextKeyService): ResolvedKeybinding | undefined;
|
|
10017
|
+
getDefaultKeybindingsContent(): string;
|
|
10018
|
+
getDefaultKeybindings(): readonly ResolvedKeybindingItem[];
|
|
10019
|
+
getKeybindings(): readonly ResolvedKeybindingItem[];
|
|
10020
|
+
customKeybindingsCount(): number;
|
|
9744
10021
|
/**
|
|
9745
|
-
*
|
|
10022
|
+
* Will the given key event produce a character that's rendered on screen, e.g. in a
|
|
10023
|
+
* text box. *Note* that the results of this function can be incorrect.
|
|
9746
10024
|
*/
|
|
9747
|
-
|
|
10025
|
+
mightProducePrintableCharacter(event: IKeyboardEvent): boolean;
|
|
10026
|
+
registerSchemaContribution(contribution: KeybindingsSchemaContribution): void;
|
|
10027
|
+
toggleLogging(): boolean;
|
|
10028
|
+
_dumpDebugInfo(): string;
|
|
10029
|
+
_dumpDebugInfoJSON(): string;
|
|
9748
10030
|
}
|
|
9749
|
-
|
|
10031
|
+
|
|
10032
|
+
declare const ILanguageFeaturesService: ServiceIdentifier<ILanguageFeaturesService>;
|
|
10033
|
+
interface ILanguageFeaturesService {
|
|
10034
|
+
readonly _serviceBrand: undefined;
|
|
10035
|
+
readonly referenceProvider: LanguageFeatureRegistry<ReferenceProvider>;
|
|
10036
|
+
readonly definitionProvider: LanguageFeatureRegistry<DefinitionProvider>;
|
|
10037
|
+
readonly typeDefinitionProvider: LanguageFeatureRegistry<TypeDefinitionProvider>;
|
|
10038
|
+
readonly declarationProvider: LanguageFeatureRegistry<DeclarationProvider>;
|
|
10039
|
+
readonly implementationProvider: LanguageFeatureRegistry<ImplementationProvider>;
|
|
10040
|
+
readonly codeActionProvider: LanguageFeatureRegistry<CodeActionProvider>;
|
|
10041
|
+
readonly documentPasteEditProvider: LanguageFeatureRegistry<DocumentPasteEditProvider>;
|
|
10042
|
+
readonly renameProvider: LanguageFeatureRegistry<RenameProvider>;
|
|
10043
|
+
readonly documentFormattingEditProvider: LanguageFeatureRegistry<DocumentFormattingEditProvider>;
|
|
10044
|
+
readonly documentRangeFormattingEditProvider: LanguageFeatureRegistry<DocumentRangeFormattingEditProvider>;
|
|
10045
|
+
readonly onTypeFormattingEditProvider: LanguageFeatureRegistry<OnTypeFormattingEditProvider>;
|
|
10046
|
+
readonly documentSymbolProvider: LanguageFeatureRegistry<DocumentSymbolProvider>;
|
|
10047
|
+
readonly inlayHintsProvider: LanguageFeatureRegistry<InlayHintsProvider>;
|
|
10048
|
+
readonly colorProvider: LanguageFeatureRegistry<DocumentColorProvider>;
|
|
10049
|
+
readonly codeLensProvider: LanguageFeatureRegistry<CodeLensProvider>;
|
|
10050
|
+
readonly signatureHelpProvider: LanguageFeatureRegistry<SignatureHelpProvider>;
|
|
10051
|
+
readonly hoverProvider: LanguageFeatureRegistry<HoverProvider>;
|
|
10052
|
+
readonly documentHighlightProvider: LanguageFeatureRegistry<DocumentHighlightProvider>;
|
|
10053
|
+
readonly documentRangeSemanticTokensProvider: LanguageFeatureRegistry<DocumentRangeSemanticTokensProvider>;
|
|
10054
|
+
readonly documentSemanticTokensProvider: LanguageFeatureRegistry<DocumentSemanticTokensProvider>;
|
|
10055
|
+
readonly selectionRangeProvider: LanguageFeatureRegistry<SelectionRangeProvider>;
|
|
10056
|
+
readonly foldingRangeProvider: LanguageFeatureRegistry<FoldingRangeProvider>;
|
|
10057
|
+
readonly linkProvider: LanguageFeatureRegistry<LinkProvider>;
|
|
10058
|
+
readonly inlineCompletionsProvider: LanguageFeatureRegistry<InlineCompletionsProvider>;
|
|
10059
|
+
readonly completionProvider: LanguageFeatureRegistry<CompletionItemProvider>;
|
|
10060
|
+
readonly linkedEditingRangeProvider: LanguageFeatureRegistry<LinkedEditingRangeProvider>;
|
|
10061
|
+
readonly inlineValuesProvider: LanguageFeatureRegistry<InlineValuesProvider>;
|
|
10062
|
+
readonly evaluatableExpressionProvider: LanguageFeatureRegistry<EvaluatableExpressionProvider>;
|
|
10063
|
+
readonly documentOnDropEditProvider: LanguageFeatureRegistry<DocumentOnDropEditProvider>;
|
|
10064
|
+
setNotebookTypeResolver(resolver: NotebookInfoResolver | undefined): void;
|
|
9750
10065
|
}
|
|
10066
|
+
|
|
10067
|
+
type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
|
|
9751
10068
|
/**
|
|
9752
|
-
*
|
|
10069
|
+
* We don't want to eagerly instantiate services because embedders get a one time chance
|
|
10070
|
+
* to override services when they create the first editor.
|
|
9753
10071
|
*/
|
|
9754
|
-
|
|
9755
|
-
|
|
9756
|
-
|
|
9757
|
-
*/
|
|
9758
|
-
readonly isFile: boolean;
|
|
9759
|
-
/**
|
|
9760
|
-
* The resource is a directory.
|
|
9761
|
-
*/
|
|
9762
|
-
readonly isDirectory: boolean;
|
|
9763
|
-
/**
|
|
9764
|
-
* The resource is a symbolic link. Note: even when the
|
|
9765
|
-
* file is a symbolic link, you can test for `FileType.File`
|
|
9766
|
-
* and `FileType.Directory` to know the type of the target
|
|
9767
|
-
* the link points to.
|
|
9768
|
-
*/
|
|
9769
|
-
readonly isSymbolicLink: boolean;
|
|
9770
|
-
/**
|
|
9771
|
-
* The children of the file stat or undefined if none.
|
|
9772
|
-
*/
|
|
9773
|
-
children: IFileStat[] | undefined;
|
|
10072
|
+
declare module StandaloneServices {
|
|
10073
|
+
function get<T>(serviceId: ServiceIdentifier<T>): T;
|
|
10074
|
+
function initialize(overrides: IEditorOverrideServices): IInstantiationService;
|
|
9774
10075
|
}
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
readonly
|
|
9778
|
-
|
|
9779
|
-
|
|
9780
|
-
readonly readonly: boolean;
|
|
9781
|
-
readonly children: IFileStatWithMetadata[] | undefined;
|
|
10076
|
+
|
|
10077
|
+
declare class ResourceEdit {
|
|
10078
|
+
readonly metadata?: WorkspaceEditMetadata | undefined;
|
|
10079
|
+
protected constructor(metadata?: WorkspaceEditMetadata | undefined);
|
|
10080
|
+
static convert(edit: WorkspaceEdit): ResourceEdit[];
|
|
9782
10081
|
}
|
|
9783
|
-
interface
|
|
9784
|
-
|
|
9785
|
-
|
|
10082
|
+
interface IBulkEditOptions {
|
|
10083
|
+
editor?: ICodeEditor;
|
|
10084
|
+
progress?: IProgress<IProgressStep>;
|
|
10085
|
+
token?: CancellationToken;
|
|
10086
|
+
showPreview?: boolean;
|
|
10087
|
+
label?: string;
|
|
10088
|
+
code?: string;
|
|
10089
|
+
quotableLabel?: string;
|
|
10090
|
+
undoRedoSource?: UndoRedoSource;
|
|
10091
|
+
undoRedoGroupId?: number;
|
|
10092
|
+
confirmBeforeUndo?: boolean;
|
|
10093
|
+
respectAutoSaveConfig?: boolean;
|
|
9786
10094
|
}
|
|
9787
|
-
interface
|
|
10095
|
+
interface IBulkEditResult {
|
|
10096
|
+
ariaSummary: string;
|
|
9788
10097
|
}
|
|
9789
|
-
|
|
9790
|
-
|
|
9791
|
-
|
|
9792
|
-
|
|
9793
|
-
|
|
10098
|
+
declare type IBulkEditPreviewHandler = (edits: ResourceEdit[], options?: IBulkEditOptions) => Promise<ResourceEdit[]>;
|
|
10099
|
+
declare const IBulkEditService: ServiceIdentifier<IBulkEditService>;
|
|
10100
|
+
interface IBulkEditService {
|
|
10101
|
+
readonly _serviceBrand: undefined;
|
|
10102
|
+
hasPreviewHandler(): boolean;
|
|
10103
|
+
setPreviewHandler(handler: IBulkEditPreviewHandler): IDisposable;
|
|
10104
|
+
apply(edit: ResourceEdit[], options?: IBulkEditOptions): Promise<IBulkEditResult>;
|
|
10105
|
+
}
|
|
10106
|
+
|
|
10107
|
+
interface UnicodeHighlighterOptions {
|
|
10108
|
+
nonBasicASCII: boolean;
|
|
10109
|
+
ambiguousCharacters: boolean;
|
|
10110
|
+
invisibleCharacters: boolean;
|
|
10111
|
+
includeComments: boolean;
|
|
10112
|
+
includeStrings: boolean;
|
|
10113
|
+
allowedCodePoints: number[];
|
|
10114
|
+
allowedLocales: string[];
|
|
9794
10115
|
}
|
|
9795
|
-
|
|
9796
|
-
|
|
9797
|
-
|
|
9798
|
-
|
|
9799
|
-
|
|
10116
|
+
|
|
10117
|
+
declare const IEditorWorkerService: ServiceIdentifier<IEditorWorkerService>;
|
|
10118
|
+
interface IEditorWorkerService {
|
|
10119
|
+
readonly _serviceBrand: undefined;
|
|
10120
|
+
canComputeUnicodeHighlights(uri: URI): boolean;
|
|
10121
|
+
computedUnicodeHighlights(uri: URI, options: UnicodeHighlighterOptions, range?: IRange): Promise<IUnicodeHighlightsResult>;
|
|
10122
|
+
computeDiff(original: URI, modified: URI, ignoreTrimWhitespace: boolean, maxComputationTime: number): Promise<IDiffComputationResult | null>;
|
|
10123
|
+
canComputeDirtyDiff(original: URI, modified: URI): boolean;
|
|
10124
|
+
computeDirtyDiff(original: URI, modified: URI, ignoreTrimWhitespace: boolean): Promise<IChange[] | null>;
|
|
10125
|
+
computeMoreMinimalEdits(resource: URI, edits: TextEdit[] | null | undefined): Promise<TextEdit[] | undefined>;
|
|
10126
|
+
canComputeWordRanges(resource: URI): boolean;
|
|
10127
|
+
computeWordRanges(resource: URI, range: IRange): Promise<{
|
|
10128
|
+
[word: string]: IRange[];
|
|
10129
|
+
} | null>;
|
|
10130
|
+
canNavigateValueSet(resource: URI): boolean;
|
|
10131
|
+
navigateValueSet(resource: URI, range: IRange, up: boolean): Promise<IInplaceReplaceSupportResult | null>;
|
|
9800
10132
|
}
|
|
9801
|
-
interface
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
|
|
9805
|
-
|
|
9806
|
-
|
|
9807
|
-
*/
|
|
9808
|
-
readonly etag?: string;
|
|
10133
|
+
interface IUnicodeHighlightsResult {
|
|
10134
|
+
ranges: IRange[];
|
|
10135
|
+
hasMore: boolean;
|
|
10136
|
+
nonBasicAsciiCharacterCount: number;
|
|
10137
|
+
invisibleCharacterCount: number;
|
|
10138
|
+
ambiguousCharacterCount: number;
|
|
9809
10139
|
}
|
|
9810
|
-
|
|
10140
|
+
|
|
10141
|
+
declare class SemanticTokensProviderStyling {
|
|
10142
|
+
private readonly _legend;
|
|
10143
|
+
private readonly _themeService;
|
|
10144
|
+
private readonly _languageService;
|
|
10145
|
+
private readonly _logService;
|
|
10146
|
+
private readonly _hashTable;
|
|
10147
|
+
private _hasWarnedOverlappingTokens;
|
|
10148
|
+
private _hasWarnedInvalidLengthTokens;
|
|
10149
|
+
private _hasWarnedInvalidEditStart;
|
|
10150
|
+
constructor(_legend: SemanticTokensLegend, _themeService: IThemeService, _languageService: ILanguageService, _logService: ILogService);
|
|
10151
|
+
getMetadata(tokenTypeIndex: number, tokenModifierSet: number, languageId: string): number;
|
|
10152
|
+
warnOverlappingSemanticTokens(lineNumber: number, startColumn: number): void;
|
|
10153
|
+
warnInvalidLengthSemanticTokens(lineNumber: number, startColumn: number): void;
|
|
10154
|
+
warnInvalidEditStart(previousResultId: string | undefined, resultId: string | undefined, editIndex: number, editStart: number, maxExpectedStart: number): void;
|
|
9811
10155
|
}
|
|
9812
|
-
|
|
9813
|
-
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9827
|
-
|
|
9828
|
-
|
|
10156
|
+
|
|
10157
|
+
declare type DocumentTokensProvider = DocumentSemanticTokensProvider | DocumentRangeSemanticTokensProvider;
|
|
10158
|
+
declare const IModelService: ServiceIdentifier<IModelService>;
|
|
10159
|
+
interface IModelService {
|
|
10160
|
+
readonly _serviceBrand: undefined;
|
|
10161
|
+
createModel(value: string | ITextBufferFactory, languageSelection: ILanguageSelection | null, resource?: URI, isForSimpleWidget?: boolean): ITextModel;
|
|
10162
|
+
updateModel(model: ITextModel, value: string | ITextBufferFactory): void;
|
|
10163
|
+
setMode(model: ITextModel, languageSelection: ILanguageSelection): void;
|
|
10164
|
+
destroyModel(resource: URI): void;
|
|
10165
|
+
getModels(): ITextModel[];
|
|
10166
|
+
getCreationOptions(language: string, resource: URI, isForSimpleWidget: boolean): ITextModelCreationOptions;
|
|
10167
|
+
getModel(resource: URI): ITextModel | null;
|
|
10168
|
+
getSemanticTokensProviderStyling(provider: DocumentTokensProvider): SemanticTokensProviderStyling;
|
|
10169
|
+
onModelAdded: Event<ITextModel>;
|
|
10170
|
+
onModelRemoved: Event<ITextModel>;
|
|
10171
|
+
onModelLanguageChanged: Event<{
|
|
10172
|
+
model: ITextModel;
|
|
10173
|
+
oldLanguageId: string;
|
|
10174
|
+
}>;
|
|
9829
10175
|
}
|
|
9830
|
-
|
|
10176
|
+
|
|
10177
|
+
declare const IClipboardService: ServiceIdentifier<IClipboardService>;
|
|
10178
|
+
interface IClipboardService {
|
|
10179
|
+
readonly _serviceBrand: undefined;
|
|
9831
10180
|
/**
|
|
9832
|
-
*
|
|
10181
|
+
* Writes text to the system clipboard.
|
|
9833
10182
|
*/
|
|
9834
|
-
|
|
10183
|
+
writeText(text: string, type?: string): Promise<void>;
|
|
9835
10184
|
/**
|
|
9836
|
-
*
|
|
10185
|
+
* Reads the content of the clipboard in plain text
|
|
9837
10186
|
*/
|
|
9838
|
-
|
|
10187
|
+
readText(type?: string): Promise<string>;
|
|
9839
10188
|
/**
|
|
9840
|
-
*
|
|
10189
|
+
* Reads text from the system find pasteboard.
|
|
9841
10190
|
*/
|
|
9842
|
-
|
|
9843
|
-
}
|
|
9844
|
-
interface IResolveFileOptions {
|
|
10191
|
+
readFindText(): Promise<string>;
|
|
9845
10192
|
/**
|
|
9846
|
-
*
|
|
9847
|
-
* are found.
|
|
10193
|
+
* Writes text to the system find pasteboard.
|
|
9848
10194
|
*/
|
|
9849
|
-
|
|
10195
|
+
writeFindText(text: string): Promise<void>;
|
|
9850
10196
|
/**
|
|
9851
|
-
*
|
|
10197
|
+
* Writes resources to the system clipboard.
|
|
9852
10198
|
*/
|
|
9853
|
-
|
|
10199
|
+
writeResources(resources: URI[]): Promise<void>;
|
|
9854
10200
|
/**
|
|
9855
|
-
*
|
|
9856
|
-
* on performance and thus should only be used when these values are required.
|
|
10201
|
+
* Reads resources from the system clipboard.
|
|
9857
10202
|
*/
|
|
9858
|
-
|
|
9859
|
-
}
|
|
9860
|
-
interface IResolveMetadataFileOptions extends IResolveFileOptions {
|
|
9861
|
-
readonly resolveMetadata: true;
|
|
9862
|
-
}
|
|
9863
|
-
interface ICreateFileOptions {
|
|
10203
|
+
readResources(): Promise<URI[]>;
|
|
9864
10204
|
/**
|
|
9865
|
-
*
|
|
9866
|
-
* an error will be thrown (FILE_MODIFIED_SINCE).
|
|
10205
|
+
* Find out if resources are copied to the clipboard.
|
|
9867
10206
|
*/
|
|
9868
|
-
|
|
10207
|
+
hasResources(): Promise<boolean>;
|
|
9869
10208
|
}
|
|
9870
10209
|
|
|
9871
10210
|
declare type OpenInternalOptions = {
|
|
@@ -10520,171 +10859,34 @@ interface IQuickInputService {
|
|
|
10520
10859
|
/**
|
|
10521
10860
|
* Provides raw access to the quick input controller.
|
|
10522
10861
|
*/
|
|
10523
|
-
createInputBox(): IInputBox;
|
|
10524
|
-
/**
|
|
10525
|
-
* Moves focus into quick input.
|
|
10526
|
-
*/
|
|
10527
|
-
focus(): void;
|
|
10528
|
-
/**
|
|
10529
|
-
* Toggle the checked state of the selected item.
|
|
10530
|
-
*/
|
|
10531
|
-
toggle(): void;
|
|
10532
|
-
/**
|
|
10533
|
-
* Navigate inside the opened quick input list.
|
|
10534
|
-
*/
|
|
10535
|
-
navigate(next: boolean, quickNavigate?: IQuickNavigateConfiguration): void;
|
|
10536
|
-
/**
|
|
10537
|
-
* Navigate back in a multi-step quick input.
|
|
10538
|
-
*/
|
|
10539
|
-
back(): Promise<void>;
|
|
10540
|
-
/**
|
|
10541
|
-
* Accept the selected item.
|
|
10542
|
-
*
|
|
10543
|
-
* @param keyMods allows to override the state of key
|
|
10544
|
-
* modifiers that should be present when invoking.
|
|
10545
|
-
*/
|
|
10546
|
-
accept(keyMods?: IKeyMods): Promise<void>;
|
|
10547
|
-
/**
|
|
10548
|
-
* Cancels quick input and closes it.
|
|
10549
|
-
*/
|
|
10550
|
-
cancel(): Promise<void>;
|
|
10551
|
-
}
|
|
10552
|
-
|
|
10553
|
-
interface IExtUri {
|
|
10554
|
-
/**
|
|
10555
|
-
* Compares two uris.
|
|
10556
|
-
*
|
|
10557
|
-
* @param uri1 Uri
|
|
10558
|
-
* @param uri2 Uri
|
|
10559
|
-
* @param ignoreFragment Ignore the fragment (defaults to `false`)
|
|
10560
|
-
*/
|
|
10561
|
-
compare(uri1: URI, uri2: URI, ignoreFragment?: boolean): number;
|
|
10562
|
-
/**
|
|
10563
|
-
* Tests whether two uris are equal
|
|
10564
|
-
*
|
|
10565
|
-
* @param uri1 Uri
|
|
10566
|
-
* @param uri2 Uri
|
|
10567
|
-
* @param ignoreFragment Ignore the fragment (defaults to `false`)
|
|
10568
|
-
*/
|
|
10569
|
-
isEqual(uri1: URI | undefined, uri2: URI | undefined, ignoreFragment?: boolean): boolean;
|
|
10570
|
-
/**
|
|
10571
|
-
* Tests whether a `candidate` URI is a parent or equal of a given `base` URI.
|
|
10572
|
-
*
|
|
10573
|
-
* @param base A uri which is "longer" or at least same length as `parentCandidate`
|
|
10574
|
-
* @param parentCandidate A uri which is "shorter" or up to same length as `base`
|
|
10575
|
-
* @param ignoreFragment Ignore the fragment (defaults to `false`)
|
|
10576
|
-
*/
|
|
10577
|
-
isEqualOrParent(base: URI, parentCandidate: URI, ignoreFragment?: boolean): boolean;
|
|
10578
|
-
/**
|
|
10579
|
-
* Creates a key from a resource URI to be used to resource comparison and for resource maps.
|
|
10580
|
-
* @see {@link ResourceMap}
|
|
10581
|
-
* @param uri Uri
|
|
10582
|
-
* @param ignoreFragment Ignore the fragment (defaults to `false`)
|
|
10583
|
-
*/
|
|
10584
|
-
getComparisonKey(uri: URI, ignoreFragment?: boolean): string;
|
|
10585
|
-
/**
|
|
10586
|
-
* Whether the casing of the path-component of the uri should be ignored.
|
|
10587
|
-
*/
|
|
10588
|
-
ignorePathCasing(uri: URI): boolean;
|
|
10589
|
-
basenameOrAuthority(resource: URI): string;
|
|
10590
|
-
/**
|
|
10591
|
-
* Returns the basename of the path component of an uri.
|
|
10592
|
-
* @param resource
|
|
10593
|
-
*/
|
|
10594
|
-
basename(resource: URI): string;
|
|
10595
|
-
/**
|
|
10596
|
-
* Returns the extension of the path component of an uri.
|
|
10597
|
-
* @param resource
|
|
10598
|
-
*/
|
|
10599
|
-
extname(resource: URI): string;
|
|
10600
|
-
/**
|
|
10601
|
-
* Return a URI representing the directory of a URI path.
|
|
10602
|
-
*
|
|
10603
|
-
* @param resource The input URI.
|
|
10604
|
-
* @returns The URI representing the directory of the input URI.
|
|
10605
|
-
*/
|
|
10606
|
-
dirname(resource: URI): URI;
|
|
10607
|
-
/**
|
|
10608
|
-
* Join a URI path with path fragments and normalizes the resulting path.
|
|
10609
|
-
*
|
|
10610
|
-
* @param resource The input URI.
|
|
10611
|
-
* @param pathFragment The path fragment to add to the URI path.
|
|
10612
|
-
* @returns The resulting URI.
|
|
10613
|
-
*/
|
|
10614
|
-
joinPath(resource: URI, ...pathFragment: string[]): URI;
|
|
10615
|
-
/**
|
|
10616
|
-
* Normalizes the path part of a URI: Resolves `.` and `..` elements with directory names.
|
|
10617
|
-
*
|
|
10618
|
-
* @param resource The URI to normalize the path.
|
|
10619
|
-
* @returns The URI with the normalized path.
|
|
10620
|
-
*/
|
|
10621
|
-
normalizePath(resource: URI): URI;
|
|
10622
|
-
/**
|
|
10623
|
-
*
|
|
10624
|
-
* @param from
|
|
10625
|
-
* @param to
|
|
10626
|
-
*/
|
|
10627
|
-
relativePath(from: URI, to: URI): string | undefined;
|
|
10628
|
-
/**
|
|
10629
|
-
* Resolves an absolute or relative path against a base URI.
|
|
10630
|
-
* The path can be relative or absolute posix or a Windows path
|
|
10631
|
-
*/
|
|
10632
|
-
resolvePath(base: URI, path: string): URI;
|
|
10633
|
-
/**
|
|
10634
|
-
* Returns true if the URI path is absolute.
|
|
10635
|
-
*/
|
|
10636
|
-
isAbsolutePath(resource: URI): boolean;
|
|
10637
|
-
/**
|
|
10638
|
-
* Tests whether the two authorities are the same
|
|
10639
|
-
*/
|
|
10640
|
-
isEqualAuthority(a1: string, a2: string): boolean;
|
|
10862
|
+
createInputBox(): IInputBox;
|
|
10641
10863
|
/**
|
|
10642
|
-
*
|
|
10864
|
+
* Moves focus into quick input.
|
|
10643
10865
|
*/
|
|
10644
|
-
|
|
10866
|
+
focus(): void;
|
|
10645
10867
|
/**
|
|
10646
|
-
*
|
|
10647
|
-
* Important: Doesn't remove the first slash, it would make the URI invalid
|
|
10868
|
+
* Toggle the checked state of the selected item.
|
|
10648
10869
|
*/
|
|
10649
|
-
|
|
10870
|
+
toggle(): void;
|
|
10650
10871
|
/**
|
|
10651
|
-
*
|
|
10652
|
-
* For example, c:\ would be unchanged, but c:\users would become c:\users\
|
|
10872
|
+
* Navigate inside the opened quick input list.
|
|
10653
10873
|
*/
|
|
10654
|
-
|
|
10655
|
-
}
|
|
10656
|
-
|
|
10657
|
-
declare const IUriIdentityService: ServiceIdentifier<IUriIdentityService>;
|
|
10658
|
-
interface IUriIdentityService {
|
|
10659
|
-
readonly _serviceBrand: undefined;
|
|
10874
|
+
navigate(next: boolean, quickNavigate?: IQuickNavigateConfiguration): void;
|
|
10660
10875
|
/**
|
|
10661
|
-
*
|
|
10876
|
+
* Navigate back in a multi-step quick input.
|
|
10662
10877
|
*/
|
|
10663
|
-
|
|
10878
|
+
back(): Promise<void>;
|
|
10664
10879
|
/**
|
|
10665
|
-
*
|
|
10666
|
-
* resource. That's because of casing or missing normalization, e.g the following uris
|
|
10667
|
-
* are different but refer to the same document (because windows paths are not case-sensitive)
|
|
10668
|
-
*
|
|
10669
|
-
* ```txt
|
|
10670
|
-
* file:///c:/foo/bar.txt
|
|
10671
|
-
* file:///c:/FOO/BAR.txt
|
|
10672
|
-
* ```
|
|
10673
|
-
*
|
|
10674
|
-
* This function should be invoked when feeding uris into the system that represent the truth,
|
|
10675
|
-
* e.g document uris or marker-to-document associations etc. This function should NOT be called
|
|
10676
|
-
* to pretty print a label nor to sanitize a uri.
|
|
10677
|
-
*
|
|
10678
|
-
* Samples:
|
|
10880
|
+
* Accept the selected item.
|
|
10679
10881
|
*
|
|
10680
|
-
*
|
|
10681
|
-
*
|
|
10682
|
-
* | `file:///foo/bar/../bar` | `file:///foo/bar` | n/a |
|
|
10683
|
-
* | `file:///foo/bar/../bar#frag` | `file:///foo/bar#frag` | keep fragment |
|
|
10684
|
-
* | `file:///foo/BAR` | `file:///foo/bar` | assume ignore case |
|
|
10685
|
-
* | `file:///foo/bar/../BAR?q=2` | `file:///foo/BAR?q=2` | query makes it a different document |
|
|
10882
|
+
* @param keyMods allows to override the state of key
|
|
10883
|
+
* modifiers that should be present when invoking.
|
|
10686
10884
|
*/
|
|
10687
|
-
|
|
10885
|
+
accept(keyMods?: IKeyMods): Promise<void>;
|
|
10886
|
+
/**
|
|
10887
|
+
* Cancels quick input and closes it.
|
|
10888
|
+
*/
|
|
10889
|
+
cancel(): Promise<void>;
|
|
10688
10890
|
}
|
|
10689
10891
|
|
|
10690
10892
|
interface IEditorCloseHandler {
|
|
@@ -12267,31 +12469,6 @@ interface IComposite {
|
|
|
12267
12469
|
interface ICompositeControl {
|
|
12268
12470
|
}
|
|
12269
12471
|
|
|
12270
|
-
/**
|
|
12271
|
-
* Flags to indicate whether to use the default profile or not.
|
|
12272
|
-
*/
|
|
12273
|
-
declare type UseDefaultProfileFlags = {
|
|
12274
|
-
settings?: boolean;
|
|
12275
|
-
keybindings?: boolean;
|
|
12276
|
-
tasks?: boolean;
|
|
12277
|
-
snippets?: boolean;
|
|
12278
|
-
extensions?: boolean;
|
|
12279
|
-
uiState?: boolean;
|
|
12280
|
-
};
|
|
12281
|
-
interface IUserDataProfile {
|
|
12282
|
-
readonly id: string;
|
|
12283
|
-
readonly isDefault: boolean;
|
|
12284
|
-
readonly name: string;
|
|
12285
|
-
readonly location: URI;
|
|
12286
|
-
readonly globalStorageHome: URI;
|
|
12287
|
-
readonly settingsResource: URI;
|
|
12288
|
-
readonly keybindingsResource: URI;
|
|
12289
|
-
readonly tasksResource: URI;
|
|
12290
|
-
readonly snippetsHome: URI;
|
|
12291
|
-
readonly extensionsResource: URI | undefined;
|
|
12292
|
-
readonly useDefaultFlags?: UseDefaultProfileFlags;
|
|
12293
|
-
}
|
|
12294
|
-
|
|
12295
12472
|
interface IBaseOpenWindowsOptions {
|
|
12296
12473
|
/**
|
|
12297
12474
|
* Whether to reuse the window or open a new one.
|
|
@@ -13625,183 +13802,6 @@ interface ILanguageStatusService {
|
|
|
13625
13802
|
getLanguageStatus(model: ITextModel): ILanguageStatus[];
|
|
13626
13803
|
}
|
|
13627
13804
|
|
|
13628
|
-
declare enum WillSaveStateReason {
|
|
13629
|
-
/**
|
|
13630
|
-
* No specific reason to save state.
|
|
13631
|
-
*/
|
|
13632
|
-
NONE = 0,
|
|
13633
|
-
/**
|
|
13634
|
-
* A hint that the workbench is about to shutdown.
|
|
13635
|
-
*/
|
|
13636
|
-
SHUTDOWN = 1
|
|
13637
|
-
}
|
|
13638
|
-
interface IWillSaveStateEvent {
|
|
13639
|
-
readonly reason: WillSaveStateReason;
|
|
13640
|
-
}
|
|
13641
|
-
declare const IStorageService: ServiceIdentifier<IStorageService>;
|
|
13642
|
-
interface IStorageService {
|
|
13643
|
-
readonly _serviceBrand: undefined;
|
|
13644
|
-
/**
|
|
13645
|
-
* Emitted whenever data is updated or deleted.
|
|
13646
|
-
*/
|
|
13647
|
-
readonly onDidChangeValue: Event<IStorageValueChangeEvent>;
|
|
13648
|
-
/**
|
|
13649
|
-
* Emitted whenever target of a storage entry changes.
|
|
13650
|
-
*/
|
|
13651
|
-
readonly onDidChangeTarget: Event<IStorageTargetChangeEvent>;
|
|
13652
|
-
/**
|
|
13653
|
-
* Emitted when the storage is about to persist. This is the right time
|
|
13654
|
-
* to persist data to ensure it is stored before the application shuts
|
|
13655
|
-
* down.
|
|
13656
|
-
*
|
|
13657
|
-
* The will save state event allows to optionally ask for the reason of
|
|
13658
|
-
* saving the state, e.g. to find out if the state is saved due to a
|
|
13659
|
-
* shutdown.
|
|
13660
|
-
*
|
|
13661
|
-
* Note: this event may be fired many times, not only on shutdown to prevent
|
|
13662
|
-
* loss of state in situations where the shutdown is not sufficient to
|
|
13663
|
-
* persist the data properly.
|
|
13664
|
-
*/
|
|
13665
|
-
readonly onWillSaveState: Event<IWillSaveStateEvent>;
|
|
13666
|
-
/**
|
|
13667
|
-
* Retrieve an element stored with the given key from storage. Use
|
|
13668
|
-
* the provided `defaultValue` if the element is `null` or `undefined`.
|
|
13669
|
-
*
|
|
13670
|
-
* @param scope allows to define the scope of the storage operation
|
|
13671
|
-
* to either the current workspace only, all workspaces or all profiles.
|
|
13672
|
-
*/
|
|
13673
|
-
get(key: string, scope: StorageScope, fallbackValue: string): string;
|
|
13674
|
-
get(key: string, scope: StorageScope, fallbackValue?: string): string | undefined;
|
|
13675
|
-
/**
|
|
13676
|
-
* Retrieve an element stored with the given key from storage. Use
|
|
13677
|
-
* the provided `defaultValue` if the element is `null` or `undefined`.
|
|
13678
|
-
* The element will be converted to a `boolean`.
|
|
13679
|
-
*
|
|
13680
|
-
* @param scope allows to define the scope of the storage operation
|
|
13681
|
-
* to either the current workspace only, all workspaces or all profiles.
|
|
13682
|
-
*/
|
|
13683
|
-
getBoolean(key: string, scope: StorageScope, fallbackValue: boolean): boolean;
|
|
13684
|
-
getBoolean(key: string, scope: StorageScope, fallbackValue?: boolean): boolean | undefined;
|
|
13685
|
-
/**
|
|
13686
|
-
* Retrieve an element stored with the given key from storage. Use
|
|
13687
|
-
* the provided `defaultValue` if the element is `null` or `undefined`.
|
|
13688
|
-
* The element will be converted to a `number` using `parseInt` with a
|
|
13689
|
-
* base of `10`.
|
|
13690
|
-
*
|
|
13691
|
-
* @param scope allows to define the scope of the storage operation
|
|
13692
|
-
* to either the current workspace only, all workspaces or all profiles.
|
|
13693
|
-
*/
|
|
13694
|
-
getNumber(key: string, scope: StorageScope, fallbackValue: number): number;
|
|
13695
|
-
getNumber(key: string, scope: StorageScope, fallbackValue?: number): number | undefined;
|
|
13696
|
-
/**
|
|
13697
|
-
* Store a value under the given key to storage. The value will be
|
|
13698
|
-
* converted to a `string`. Storing either `undefined` or `null` will
|
|
13699
|
-
* remove the entry under the key.
|
|
13700
|
-
*
|
|
13701
|
-
* @param scope allows to define the scope of the storage operation
|
|
13702
|
-
* to either the current workspace only, all workspaces or all profiles.
|
|
13703
|
-
*
|
|
13704
|
-
* @param target allows to define the target of the storage operation
|
|
13705
|
-
* to either the current machine or user.
|
|
13706
|
-
*/
|
|
13707
|
-
store(key: string, value: string | boolean | number | undefined | null, scope: StorageScope, target: StorageTarget): void;
|
|
13708
|
-
/**
|
|
13709
|
-
* Delete an element stored under the provided key from storage.
|
|
13710
|
-
*
|
|
13711
|
-
* The scope argument allows to define the scope of the storage
|
|
13712
|
-
* operation to either the current workspace only, all workspaces
|
|
13713
|
-
* or all profiles.
|
|
13714
|
-
*/
|
|
13715
|
-
remove(key: string, scope: StorageScope): void;
|
|
13716
|
-
/**
|
|
13717
|
-
* Returns all the keys used in the storage for the provided `scope`
|
|
13718
|
-
* and `target`.
|
|
13719
|
-
*
|
|
13720
|
-
* Note: this will NOT return all keys stored in the storage layer.
|
|
13721
|
-
* Some keys may not have an associated `StorageTarget` and thus
|
|
13722
|
-
* will be excluded from the results.
|
|
13723
|
-
*
|
|
13724
|
-
* @param scope allows to define the scope for the keys
|
|
13725
|
-
* to either the current workspace only, all workspaces or all profiles.
|
|
13726
|
-
*
|
|
13727
|
-
* @param target allows to define the target for the keys
|
|
13728
|
-
* to either the current machine or user.
|
|
13729
|
-
*/
|
|
13730
|
-
keys(scope: StorageScope, target: StorageTarget): string[];
|
|
13731
|
-
/**
|
|
13732
|
-
* Log the contents of the storage to the console.
|
|
13733
|
-
*/
|
|
13734
|
-
log(): void;
|
|
13735
|
-
/**
|
|
13736
|
-
* Switch storage to another workspace or profile. Optionally preserve the
|
|
13737
|
-
* current data to the new storage.
|
|
13738
|
-
*/
|
|
13739
|
-
switch(to: IAnyWorkspaceIdentifier | IUserDataProfile, preserveData: boolean): Promise<void>;
|
|
13740
|
-
/**
|
|
13741
|
-
* Whether the storage for the given scope was created during this session or
|
|
13742
|
-
* existed before.
|
|
13743
|
-
*/
|
|
13744
|
-
isNew(scope: StorageScope): boolean;
|
|
13745
|
-
/**
|
|
13746
|
-
* Allows to flush state, e.g. in cases where a shutdown is
|
|
13747
|
-
* imminent. This will send out the `onWillSaveState` to ask
|
|
13748
|
-
* everyone for latest state.
|
|
13749
|
-
*
|
|
13750
|
-
* @returns a `Promise` that can be awaited on when all updates
|
|
13751
|
-
* to the underlying storage have been flushed.
|
|
13752
|
-
*/
|
|
13753
|
-
flush(reason?: WillSaveStateReason): Promise<void>;
|
|
13754
|
-
}
|
|
13755
|
-
declare const enum StorageScope {
|
|
13756
|
-
/**
|
|
13757
|
-
* The stored data will be scoped to all workspaces across all profiles.
|
|
13758
|
-
*/
|
|
13759
|
-
APPLICATION = -1,
|
|
13760
|
-
/**
|
|
13761
|
-
* The stored data will be scoped to all workspaces of the same profile.
|
|
13762
|
-
*/
|
|
13763
|
-
PROFILE = 0,
|
|
13764
|
-
/**
|
|
13765
|
-
* The stored data will be scoped to the current workspace.
|
|
13766
|
-
*/
|
|
13767
|
-
WORKSPACE = 1
|
|
13768
|
-
}
|
|
13769
|
-
declare const enum StorageTarget {
|
|
13770
|
-
/**
|
|
13771
|
-
* The stored data is user specific and applies across machines.
|
|
13772
|
-
*/
|
|
13773
|
-
USER = 0,
|
|
13774
|
-
/**
|
|
13775
|
-
* The stored data is machine specific.
|
|
13776
|
-
*/
|
|
13777
|
-
MACHINE = 1
|
|
13778
|
-
}
|
|
13779
|
-
interface IStorageValueChangeEvent {
|
|
13780
|
-
/**
|
|
13781
|
-
* The scope for the storage entry that changed
|
|
13782
|
-
* or was removed.
|
|
13783
|
-
*/
|
|
13784
|
-
readonly scope: StorageScope;
|
|
13785
|
-
/**
|
|
13786
|
-
* The `key` of the storage entry that was changed
|
|
13787
|
-
* or was removed.
|
|
13788
|
-
*/
|
|
13789
|
-
readonly key: string;
|
|
13790
|
-
/**
|
|
13791
|
-
* The `target` can be `undefined` if a key is being
|
|
13792
|
-
* removed.
|
|
13793
|
-
*/
|
|
13794
|
-
readonly target: StorageTarget | undefined;
|
|
13795
|
-
}
|
|
13796
|
-
interface IStorageTargetChangeEvent {
|
|
13797
|
-
/**
|
|
13798
|
-
* The scope for the target that changed. Listeners
|
|
13799
|
-
* should use `keys(scope, target)` to get an updated
|
|
13800
|
-
* list of keys for the given `scope` and `target`.
|
|
13801
|
-
*/
|
|
13802
|
-
readonly scope: StorageScope;
|
|
13803
|
-
}
|
|
13804
|
-
|
|
13805
13805
|
declare type MementoObject = {
|
|
13806
13806
|
[key: string]: any;
|
|
13807
13807
|
};
|
|
@@ -15950,4 +15950,4 @@ declare namespace Services {
|
|
|
15950
15950
|
function install(_services: Services): vscode.Disposable;
|
|
15951
15951
|
}
|
|
15952
15952
|
|
|
15953
|
-
export { ContextKeyExprType, IBulkEditService, IClipboardService, ICodeEditorService, IColorTheme, ICommandService, IConfigurationChangeEvent, IConfigurationService, IDialogService, IEditorGroupsService, IEditorService, IEditorWorkerService, IFileService, IHostService, IInstantiationService, ILanguageConfigurationService, ILanguageFeaturesService, ILanguageService, ILanguageStatusService, IMarkerService, IModelService, INotificationService, IOpenerService, IPaneCompositePartService, IPathService, IProductService, IQuickInputService, ISnippetsService, ITelemetryService, ITextFileService, ITextModelContentProvider, ITextModelService, IThemeService, IUriIdentityService, IWorkbenchEnvironmentService, IWorkingCopyFileService, IWorkspaceContextService, NotificationsFilter, Services, Severity$1 as Severity, StandaloneServices, Window, Workspace };
|
|
15953
|
+
export { ContextKeyExprType, IBulkEditService, IClipboardService, ICodeEditorService, IColorTheme, ICommandService, IConfigurationChangeEvent, IConfigurationService, IDialogService, IEditorGroupsService, IEditorService, IEditorWorkerService, IFileService, IHostService, IInstantiationService, ILanguageConfigurationService, ILanguageFeaturesService, ILanguageService, ILanguageStatusService, IMarkerService, IModelService, INotificationService, IOpenerService, IPaneCompositePartService, IPathService, IProductService, IQuickInputService, ISnippetsService, IStorageService, ITelemetryService, ITextFileService, ITextModelContentProvider, ITextModelService, IThemeService, IUriIdentityService, IWorkbenchEnvironmentService, IWorkingCopyFileService, IWorkspaceContextService, NotificationsFilter, Services, Severity$1 as Severity, StandaloneServices, StorageScope, StorageTarget, Window, Workspace };
|