mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
tslint5 adoption - fix semicolon rule
This commit is contained in:
parent
56111c9cc6
commit
b94569fe0d
|
@ -227,7 +227,7 @@ export class ExtensionLinter {
|
|||
}
|
||||
|
||||
this.diagnosticsCollection.set(document.uri, diagnostics);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
private locateToken(text: string, begin: number, end: number, token: MarkdownItType.Token, content: string) {
|
||||
|
|
|
@ -68,4 +68,4 @@ export function getCSSMode(documentRegions: LanguageModelCache<HTMLDocumentRegio
|
|||
cssStylesheets.dispose();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
|
@ -22,7 +22,7 @@ export interface HTMLDocumentRegions {
|
|||
|
||||
export var CSS_STYLE_RULE = '__';
|
||||
|
||||
interface EmbeddedRegion { languageId: string; start: number; end: number; attributeValue?: boolean; };
|
||||
interface EmbeddedRegion { languageId: string; start: number; end: number; attributeValue?: boolean; }
|
||||
|
||||
|
||||
export function getDocumentRegions(languageService: LanguageService, document: TextDocument): HTMLDocumentRegions {
|
||||
|
|
|
@ -73,7 +73,7 @@ export function format(languageModes: LanguageModes, document: TextDocument, for
|
|||
embeddedEdits.push(edit);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if (embeddedEdits.length === 0) {
|
||||
pushAll(result, htmlEdits);
|
||||
|
|
|
@ -69,7 +69,7 @@ export function getHTMLMode(htmlLanguageService: HTMLLanguageService): LanguageM
|
|||
htmlDocuments.dispose();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
function merge(src: any, dst: any): any {
|
||||
for (var key in src) {
|
||||
|
|
|
@ -164,7 +164,7 @@ export function getJavascriptMode(documentRegions: LanguageModelCache<HTMLDocume
|
|||
ret.signatures.push(signature);
|
||||
});
|
||||
return ret;
|
||||
};
|
||||
}
|
||||
return null;
|
||||
},
|
||||
findDocumentHighlight(document: TextDocument, position: Position): DocumentHighlight[] {
|
||||
|
@ -177,7 +177,7 @@ export function getJavascriptMode(documentRegions: LanguageModelCache<HTMLDocume
|
|||
kind: <DocumentHighlightKind>(entry.isWriteAccess ? DocumentHighlightKind.Write : DocumentHighlightKind.Text)
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
return null;
|
||||
},
|
||||
findDocumentSymbols(document: TextDocument): SymbolInformation[] {
|
||||
|
@ -286,7 +286,7 @@ export function getJavascriptMode(documentRegions: LanguageModelCache<HTMLDocume
|
|||
jsDocuments.dispose();
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
function convertRange(document: TextDocument, span: { start: number, length: number }): Range {
|
||||
let startPosition = document.positionAt(span.start);
|
||||
|
|
|
@ -136,7 +136,7 @@ export class BowerJSONContribution implements IJSONContribution {
|
|||
}
|
||||
return null;
|
||||
});
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ export class PackageJSONContribution implements IJSONContribution {
|
|||
}
|
||||
return null;
|
||||
});
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -260,8 +260,8 @@ function getSettings(): Settings {
|
|||
folderPath = folderPath + '/';
|
||||
}
|
||||
collectSchemaSettings(folderSchemas, folderUri.fsPath, folderPath + '*');
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
return settings;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ export class DocumentMergeConflict implements interfaces.IDocumentMergeConflict
|
|||
|
||||
this.applyEdit(type, editor, edit);
|
||||
return Promise.resolve(true);
|
||||
};
|
||||
}
|
||||
|
||||
return editor.edit((edit) => this.applyEdit(type, editor, edit));
|
||||
}
|
||||
|
|
|
@ -154,7 +154,7 @@ export function activate(context: ExtensionContext): void {
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
}
|
||||
const openListener = workspace.onDidOpenTextDocument(didOpenTextDocument);
|
||||
for (let textDocument of workspace.textDocuments) {
|
||||
if (didOpenTextDocument(textDocument)) {
|
||||
|
|
|
@ -375,6 +375,7 @@ export default class TypeScriptServiceClient implements ITypeScriptServiceClient
|
|||
this.isRestarting = false;
|
||||
});
|
||||
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
new Reader<Proto.Response>(
|
||||
childProcess.stdout,
|
||||
(msg) => { this.dispatchMessage(msg); },
|
||||
|
|
|
@ -163,7 +163,7 @@ function extractKeyCode(e: KeyboardEvent): KeyCode {
|
|||
return KeyCodeUtils.fromString(char);
|
||||
}
|
||||
return KEY_CODE_MAP[e.keyCode] || KeyCode.Unknown;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IKeyboardEvent {
|
||||
readonly browserEvent: KeyboardEvent;
|
||||
|
|
|
@ -50,10 +50,10 @@ export interface IProblemReporter {
|
|||
}
|
||||
|
||||
export class NullProblemReporter implements IProblemReporter {
|
||||
info(message: string): void { };
|
||||
warn(message: string): void { };
|
||||
error(message: string): void { };
|
||||
fatal(message: string): void { };
|
||||
info(message: string): void { }
|
||||
warn(message: string): void { }
|
||||
error(message: string): void { }
|
||||
fatal(message: string): void { }
|
||||
status: ValidationStatus = new ValidationStatus();
|
||||
}
|
||||
|
||||
|
|
|
@ -450,7 +450,7 @@ function _asFormatted(uri: URI, skipEncoding: boolean): string {
|
|||
}
|
||||
parts.push(encoder(path.substring(lastIdx, idx)), _slash);
|
||||
lastIdx = idx + 1;
|
||||
};
|
||||
}
|
||||
}
|
||||
if (query) {
|
||||
parts.push('?', encoder(query));
|
||||
|
|
|
@ -15,4 +15,4 @@ export function fromEventEmitter<T>(emitter: EventEmitter, eventName: string, ma
|
|||
const result = new Emitter<T>({ onFirstListenerAdd, onLastListenerRemove });
|
||||
|
||||
return result.event;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ export class TestService implements ITestService {
|
|||
}
|
||||
progress(batch);
|
||||
process.nextTick(send);
|
||||
};
|
||||
}
|
||||
process.nextTick(send);
|
||||
});
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ export class TestChannel implements ITestChannel {
|
|||
export class TestServiceClient implements ITestService {
|
||||
|
||||
private _onMarco: Event<IMarcoPoloEvent>;
|
||||
get onMarco(): Event<IMarcoPoloEvent> { return this._onMarco; };
|
||||
get onMarco(): Event<IMarcoPoloEvent> { return this._onMarco; }
|
||||
|
||||
constructor(private channel: ITestChannel) {
|
||||
this._onMarco = eventFromCall<IMarcoPoloEvent>(channel, 'event:marco');
|
||||
|
|
|
@ -210,7 +210,7 @@ suite('Quick Open Scorer', () => {
|
|||
});
|
||||
|
||||
test('scoreItem - avoid match scattering (bug #36119)', function () {
|
||||
const resource = URI.file('projects/ui/cula/ats/target.mk');;
|
||||
const resource = URI.file('projects/ui/cula/ats/target.mk');
|
||||
|
||||
const pathRes = scoreItem(resource, 'tcltarget.mk', true, ResourceAccessor, cache);
|
||||
assert.ok(pathRes.score);
|
||||
|
|
|
@ -1741,7 +1741,7 @@ suite('TreeModel - bugs', () => {
|
|||
}).done(() => {
|
||||
|
||||
// teardown
|
||||
while (listeners.length > 0) { listeners.pop()(); };
|
||||
while (listeners.length > 0) { listeners.pop()(); }
|
||||
listeners = null;
|
||||
model.dispose();
|
||||
model = null;
|
||||
|
|
|
@ -184,7 +184,7 @@ suite('Types', () => {
|
|||
function isFoo(f) { }
|
||||
assert.throws(() => types.validateConstraints([new foo()], [isFoo]));
|
||||
|
||||
function isFoo2(f) { return true; };
|
||||
function isFoo2(f) { return true; }
|
||||
types.validateConstraints([new foo()], [isFoo2]);
|
||||
|
||||
assert.throws(() => types.validateConstraints([1, true], [types.isNumber, types.isString]));
|
||||
|
|
|
@ -393,6 +393,7 @@ export class CodeApplication {
|
|||
|
||||
// Ensure Windows foreground love module
|
||||
try {
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
<any>require.__$__nodeRequire('windows-foreground-love');
|
||||
} catch (e) {
|
||||
if (!this.environmentService.isBuilt) {
|
||||
|
|
|
@ -458,7 +458,7 @@ export class CodeWindow implements ICodeWindow {
|
|||
this._win.removeAllListeners('swipe');
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private registerNavigationListenerOn(command: 'swipe' | 'app-command', back: 'left' | 'browser-backward', forward: 'right' | 'browser-forward', acrossEditors: boolean) {
|
||||
this._win.on(command as 'swipe' /* | 'app-command' */, (e: Electron.Event, cmd: string) => {
|
||||
|
@ -833,7 +833,7 @@ export class CodeWindow implements ICodeWindow {
|
|||
|
||||
if (notify) {
|
||||
this.send('vscode:showInfoMessage', nls.localize('hiddenMenuBar', "You can still access the menu bar by pressing the **Alt** key."));
|
||||
};
|
||||
}
|
||||
break;
|
||||
|
||||
case ('hidden'):
|
||||
|
@ -847,7 +847,7 @@ export class CodeWindow implements ICodeWindow {
|
|||
this._win.setAutoHideMenuBar(false);
|
||||
});
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public onWindowTitleDoubleClick(): void {
|
||||
|
|
|
@ -28,7 +28,7 @@ function gestureChangeEventMerger(lastEvent: IThrottledGestureEvent, currentEven
|
|||
r.translationX += lastEvent.translationX;
|
||||
}
|
||||
return r;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Basically IE10 and IE11
|
||||
|
|
|
@ -114,7 +114,7 @@ export namespace EditorScroll_ {
|
|||
value?: number;
|
||||
revealCursor?: boolean;
|
||||
select?: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export function parse(args: RawArguments): ParsedArguments {
|
||||
let direction: Direction;
|
||||
|
@ -224,7 +224,7 @@ export namespace RevealLine_ {
|
|||
export interface RawArguments {
|
||||
lineNumber?: number;
|
||||
at?: string;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Values for reveal line 'at' argument
|
||||
|
|
|
@ -670,7 +670,7 @@ export namespace CursorMove {
|
|||
select?: boolean;
|
||||
by?: string;
|
||||
value?: number;
|
||||
};
|
||||
}
|
||||
|
||||
export function parse(args: RawArguments): ParsedArguments {
|
||||
if (!args.to) {
|
||||
|
@ -753,7 +753,7 @@ export namespace CursorMove {
|
|||
unit: Unit;
|
||||
select: boolean;
|
||||
value: number;
|
||||
};
|
||||
}
|
||||
|
||||
export const enum Direction {
|
||||
Left,
|
||||
|
@ -772,7 +772,7 @@ export namespace CursorMove {
|
|||
ViewPortBottom,
|
||||
|
||||
ViewPortIfOutside,
|
||||
};
|
||||
}
|
||||
|
||||
export const enum Unit {
|
||||
None,
|
||||
|
@ -780,6 +780,6 @@ export namespace CursorMove {
|
|||
WrappedLine,
|
||||
Character,
|
||||
HalfLine,
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -42,4 +42,4 @@ export namespace EditorContextKeys {
|
|||
export const hasDocumentFormattingProvider = new RawContextKey<boolean>('editorHasDocumentFormattingProvider', undefined);
|
||||
export const hasDocumentSelectionFormattingProvider = new RawContextKey<boolean>('editorHasDocumentSelectionFormattingProvider', undefined);
|
||||
export const hasSignatureHelpProvider = new RawContextKey<boolean>('editorHasSignatureHelpProvider', undefined);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -191,7 +191,7 @@ export class RangesCollector {
|
|||
}
|
||||
|
||||
|
||||
interface PreviousRegion { indent: number; line: number; marker: boolean; };
|
||||
interface PreviousRegion { indent: number; line: number; marker: boolean; }
|
||||
|
||||
export function computeRanges(model: ITextModel, offSide: boolean, markers?: FoldingMarkers, foldingRegionsLimit = MAX_FOLDING_REGIONS_FOR_INDENT_LIMIT): IndentRanges {
|
||||
const tabSize = model.getOptions().tabSize;
|
||||
|
|
|
@ -425,7 +425,7 @@ function adjustMarkerBeforeColumn(markerOffset: number, markerStickToPreviousCha
|
|||
return true;
|
||||
}
|
||||
return markerStickToPreviousCharacter;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a lot more complicated than strictly necessary to maintain the same behaviour
|
||||
|
|
|
@ -12,7 +12,7 @@ export const enum IndentConsts {
|
|||
DECREASE_MASK = 0b00000010,
|
||||
INDENT_NEXTLINE_MASK = 0b00000100,
|
||||
UNINDENT_MASK = 0b00001000,
|
||||
};
|
||||
}
|
||||
|
||||
export class IndentRulesSupport {
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ export class TextResourceConfigurationService extends Disposable implements ITex
|
|||
this._register(this.configurationService.onDidChangeConfiguration(e => this._onDidChangeConfiguration.fire(e)));
|
||||
}
|
||||
|
||||
getConfiguration<T>(resource: URI, section?: string): T
|
||||
getConfiguration<T>(resource: URI, at?: IPosition, section?: string): T
|
||||
getConfiguration<T>(resource: URI, section?: string): T;
|
||||
getConfiguration<T>(resource: URI, at?: IPosition, section?: string): T;
|
||||
getConfiguration<T>(resource: URI, arg2?: any, arg3?: any): T {
|
||||
const position: IPosition = Position.isIPosition(arg2) ? arg2 : null;
|
||||
const section: string = position ? (typeof arg3 === 'string' ? arg3 : void 0) : (typeof arg2 === 'string' ? arg2 : void 0);
|
||||
|
|
|
@ -565,4 +565,4 @@ for (let i = 1; i <= 9; i++) {
|
|||
}
|
||||
})
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ export class FoldingModel {
|
|||
|
||||
private _updateEventEmitter = new Emitter<FoldingModelChangeEvent>();
|
||||
|
||||
public get regions(): FoldingRegion[] { return this._regions; };
|
||||
public get onDidChange(): Event<FoldingModelChangeEvent> { return this._updateEventEmitter.event; };
|
||||
public get regions(): FoldingRegion[] { return this._regions; }
|
||||
public get onDidChange(): Event<FoldingModelChangeEvent> { return this._updateEventEmitter.event; }
|
||||
public get textModel() { return this._textModel; }
|
||||
|
||||
constructor(textModel: IModel, decorationProvider: IDecorationProvider) {
|
||||
|
@ -198,7 +198,7 @@ export class FoldingModel {
|
|||
let index = this._ranges.findRange(lineNumber);
|
||||
if (index >= 0) {
|
||||
return this._regions[index];
|
||||
};
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ export class HiddenRangeModel {
|
|||
private _foldingModelListener: IDisposable;
|
||||
private _updateEventEmitter = new Emitter<IRange[]>();
|
||||
|
||||
public get onDidChange(): Event<IRange[]> { return this._updateEventEmitter.event; };
|
||||
public get onDidChange(): Event<IRange[]> { return this._updateEventEmitter.event; }
|
||||
public get hiddenRanges() { return this._hiddenRanges; }
|
||||
|
||||
public constructor(model: FoldingModel) {
|
||||
|
@ -50,7 +50,7 @@ export class HiddenRangeModel {
|
|||
updateHiddenAreas = true;
|
||||
newHiddenAreas.push(new Range(range.startLineNumber + 1, 1, range.endLineNumber, 1));
|
||||
}
|
||||
};
|
||||
}
|
||||
if (updateHiddenAreas || i < this._hiddenRanges.length) {
|
||||
this.applyHiddenRanges(newHiddenAreas);
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ suite('SnippetController', () => {
|
|||
'\t',
|
||||
'}'
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
withMockCodeEditor(lines, {}, (editor, cursor) => {
|
||||
editor.getModel().updateOptions({
|
||||
|
|
|
@ -458,10 +458,10 @@ export class SimpleConfigurationService implements IConfigurationService {
|
|||
return this._configuration;
|
||||
}
|
||||
|
||||
getConfiguration<T>(): T
|
||||
getConfiguration<T>(section: string): T
|
||||
getConfiguration<T>(overrides: IConfigurationOverrides): T
|
||||
getConfiguration<T>(section: string, overrides: IConfigurationOverrides): T
|
||||
getConfiguration<T>(): T;
|
||||
getConfiguration<T>(section: string): T;
|
||||
getConfiguration<T>(overrides: IConfigurationOverrides): T;
|
||||
getConfiguration<T>(section: string, overrides: IConfigurationOverrides): T;
|
||||
getConfiguration(arg1?: any, arg2?: any): any {
|
||||
const section = typeof arg1 === 'string' ? arg1 : void 0;
|
||||
const overrides = isConfigurationOverrides(arg1) ? arg1 : isConfigurationOverrides(arg2) ? arg2 : {};
|
||||
|
|
|
@ -29,7 +29,7 @@ export class MockCodeEditor extends CommonCodeEditor {
|
|||
|
||||
public focus(): void { }
|
||||
public isFocused(): boolean { return this._isFocused; }
|
||||
public hasWidgetFocus(): boolean { return true; };
|
||||
public hasWidgetFocus(): boolean { return true; }
|
||||
|
||||
protected _enableEmptySelectionClipboard(): boolean { return false; }
|
||||
protected _scheduleAtNextAnimationFrame(callback: () => void): IDisposable { throw new Error('Notimplemented'); }
|
||||
|
|
|
@ -153,7 +153,7 @@ export function addToValueTree(settingsTreeRoot: any, key: string, value: any, c
|
|||
return;
|
||||
}
|
||||
curr = obj;
|
||||
};
|
||||
}
|
||||
|
||||
if (typeof curr === 'object') {
|
||||
curr[last] = value; // workaround https://github.com/Microsoft/vscode/issues/13606
|
||||
|
|
|
@ -529,8 +529,8 @@ export class ConfigurationChangeEvent extends AbstractConfigurationChangeEvent i
|
|||
return this._changedConfigurationByResource;
|
||||
}
|
||||
|
||||
change(event: ConfigurationChangeEvent): ConfigurationChangeEvent
|
||||
change(keys: string[], resource?: URI): ConfigurationChangeEvent
|
||||
change(event: ConfigurationChangeEvent): ConfigurationChangeEvent;
|
||||
change(keys: string[], resource?: URI): ConfigurationChangeEvent;
|
||||
change(arg1: any, arg2?: any): ConfigurationChangeEvent {
|
||||
if (arg1 instanceof ConfigurationChangeEvent) {
|
||||
this._changedConfiguration = this._changedConfiguration.merge(arg1._changedConfiguration);
|
||||
|
|
|
@ -232,7 +232,7 @@ class ConfigurationRegistry implements IConfigurationRegistry {
|
|||
if (subNodes) {
|
||||
subNodes.forEach(register);
|
||||
}
|
||||
};
|
||||
}
|
||||
register(configuration);
|
||||
}
|
||||
|
||||
|
|
|
@ -56,10 +56,10 @@ export class ConfigurationService extends Disposable implements IConfigurationSe
|
|||
return this.configuration.toData();
|
||||
}
|
||||
|
||||
getConfiguration<T>(): T
|
||||
getConfiguration<T>(section: string): T
|
||||
getConfiguration<T>(overrides: IConfigurationOverrides): T
|
||||
getConfiguration<T>(section: string, overrides: IConfigurationOverrides): T
|
||||
getConfiguration<T>(): T;
|
||||
getConfiguration<T>(section: string): T;
|
||||
getConfiguration<T>(overrides: IConfigurationOverrides): T;
|
||||
getConfiguration<T>(section: string, overrides: IConfigurationOverrides): T;
|
||||
getConfiguration(arg1?: any, arg2?: any): any {
|
||||
const section = typeof arg1 === 'string' ? arg1 : void 0;
|
||||
const overrides = isConfigurationOverrides(arg1) ? arg1 : isConfigurationOverrides(arg2) ? arg2 : {};
|
||||
|
@ -70,10 +70,10 @@ export class ConfigurationService extends Disposable implements IConfigurationSe
|
|||
return this.configuration.getValue(key, overrides, null);
|
||||
}
|
||||
|
||||
updateValue(key: string, value: any): TPromise<void>
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides): TPromise<void>
|
||||
updateValue(key: string, value: any, target: ConfigurationTarget): TPromise<void>
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides, target: ConfigurationTarget): TPromise<void>
|
||||
updateValue(key: string, value: any): TPromise<void>;
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides): TPromise<void>;
|
||||
updateValue(key: string, value: any, target: ConfigurationTarget): TPromise<void>;
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides, target: ConfigurationTarget): TPromise<void>;
|
||||
updateValue(key: string, value: any, arg3?: any, arg4?: any): TPromise<void> {
|
||||
return TPromise.wrapError(new Error('not supported'));
|
||||
}
|
||||
|
|
|
@ -39,11 +39,11 @@ export class TestInstantiationService extends InstantiationService {
|
|||
return <T>this._create(service, { mock: true });
|
||||
}
|
||||
|
||||
public stub<T>(service?: ServiceIdentifier<T>, ctor?: any): T
|
||||
public stub<T>(service?: ServiceIdentifier<T>, obj?: any): T
|
||||
public stub<T>(service?: ServiceIdentifier<T>, ctor?: any, property?: string, value?: any): sinon.SinonStub
|
||||
public stub<T>(service?: ServiceIdentifier<T>, obj?: any, property?: string, value?: any): sinon.SinonStub
|
||||
public stub<T>(service?: ServiceIdentifier<T>, property?: string, value?: any): sinon.SinonStub
|
||||
public stub<T>(service?: ServiceIdentifier<T>, ctor?: any): T;
|
||||
public stub<T>(service?: ServiceIdentifier<T>, obj?: any): T;
|
||||
public stub<T>(service?: ServiceIdentifier<T>, ctor?: any, property?: string, value?: any): sinon.SinonStub;
|
||||
public stub<T>(service?: ServiceIdentifier<T>, obj?: any, property?: string, value?: any): sinon.SinonStub;
|
||||
public stub<T>(service?: ServiceIdentifier<T>, property?: string, value?: any): sinon.SinonStub;
|
||||
public stub<T>(serviceIdentifier?: ServiceIdentifier<T>, arg2?: any, arg3?: string, arg4?: any): sinon.SinonStub {
|
||||
let service = typeof arg2 !== 'string' ? arg2 : void 0;
|
||||
let serviceMock: IServiceMock<any> = { id: serviceIdentifier, service: service };
|
||||
|
@ -70,9 +70,9 @@ export class TestInstantiationService extends InstantiationService {
|
|||
return stubObject;
|
||||
}
|
||||
|
||||
public stubPromise<T>(service?: ServiceIdentifier<T>, fnProperty?: string, value?: any): T | sinon.SinonStub
|
||||
public stubPromise<T>(service?: ServiceIdentifier<T>, ctor?: any, fnProperty?: string, value?: any): sinon.SinonStub
|
||||
public stubPromise<T>(service?: ServiceIdentifier<T>, obj?: any, fnProperty?: string, value?: any): sinon.SinonStub
|
||||
public stubPromise<T>(service?: ServiceIdentifier<T>, fnProperty?: string, value?: any): T | sinon.SinonStub;
|
||||
public stubPromise<T>(service?: ServiceIdentifier<T>, ctor?: any, fnProperty?: string, value?: any): sinon.SinonStub;
|
||||
public stubPromise<T>(service?: ServiceIdentifier<T>, obj?: any, fnProperty?: string, value?: any): sinon.SinonStub;
|
||||
public stubPromise<T>(arg1?: any, arg2?: any, arg3?: any, arg4?: any): sinon.SinonStub {
|
||||
arg3 = typeof arg2 === 'string' ? TPromise.as(arg3) : arg3;
|
||||
arg4 = typeof arg2 !== 'string' && typeof arg3 === 'string' ? TPromise.as(arg4) : arg4;
|
||||
|
@ -85,8 +85,8 @@ export class TestInstantiationService extends InstantiationService {
|
|||
return spy;
|
||||
}
|
||||
|
||||
private _create<T>(serviceMock: IServiceMock<T>, options: SinonOptions, reset?: boolean): any
|
||||
private _create<T>(ctor: any, options: SinonOptions): any
|
||||
private _create<T>(serviceMock: IServiceMock<T>, options: SinonOptions, reset?: boolean): any;
|
||||
private _create<T>(ctor: any, options: SinonOptions): any;
|
||||
private _create<T>(arg1: any, options: SinonOptions, reset: boolean = false): any {
|
||||
if (this.isServiceMock(arg1)) {
|
||||
let service = this._getOrCreateService(arg1, options, reset);
|
||||
|
|
|
@ -133,7 +133,7 @@ export interface IQuickOpenStyleOverrides extends IListStyleOverrides, IInputBox
|
|||
widgetShadow?: ColorIdentifier;
|
||||
pickerGroupForeground?: ColorIdentifier;
|
||||
pickerGroupBorder?: ColorIdentifier;
|
||||
};
|
||||
}
|
||||
|
||||
export function attachQuickOpenStyler(widget: IThemable, themeService: IThemeService, style?: IQuickOpenStyleOverrides): IDisposable {
|
||||
return attachStyler(themeService, {
|
||||
|
|
|
@ -63,7 +63,7 @@ export class UpdateChannelClient implements IUpdateService {
|
|||
get onStateChange(): Event<State> { return this._onStateChange.event; }
|
||||
|
||||
private _state: State = State.Uninitialized;
|
||||
get state(): State { return this._state; };
|
||||
get state(): State { return this._state; }
|
||||
|
||||
constructor(private channel: IUpdateChannel) {
|
||||
// always set this._state as the state changes
|
||||
|
|
|
@ -101,7 +101,7 @@ export class WindowsChannel implements IWindowsChannel {
|
|||
}
|
||||
|
||||
return this.service.createAndEnterWorkspace(arg[0], folders, arg[2]);
|
||||
};
|
||||
}
|
||||
case 'saveAndEnterWorkspace': return this.service.saveAndEnterWorkspace(arg[0], arg[1]);
|
||||
case 'toggleFullScreen': return this.service.toggleFullScreen(arg);
|
||||
case 'setRepresentedFilename': return this.service.setRepresentedFilename(arg[0], arg[1]);
|
||||
|
|
|
@ -34,7 +34,7 @@ export class WorkspacesChannel implements IWorkspacesChannel {
|
|||
}
|
||||
|
||||
return this.service.createWorkspace(folders);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return void 0;
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace delta {
|
|||
}
|
||||
});
|
||||
return { removed, added };
|
||||
};
|
||||
}
|
||||
|
||||
export function ofMaps<K, V>(before: Map<K, V>, after: Map<K, V>): { removed: V[], added: V[] } {
|
||||
const removed: V[] = [];
|
||||
|
@ -80,7 +80,7 @@ namespace delta {
|
|||
}
|
||||
});
|
||||
return { removed, added };
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
class EditorSnapshot {
|
||||
|
|
|
@ -574,7 +574,7 @@ export namespace IdObject {
|
|||
}
|
||||
|
||||
export type IWorkspaceSymbol = IdObject & modes.SymbolInformation;
|
||||
export interface IWorkspaceSymbols extends IdObject { symbols: IWorkspaceSymbol[]; };
|
||||
export interface IWorkspaceSymbols extends IdObject { symbols: IWorkspaceSymbol[]; }
|
||||
|
||||
export interface ExtHostLanguageFeaturesShape {
|
||||
$provideDocumentSymbols(handle: number, resource: URI): TPromise<modes.SymbolInformation[]>;
|
||||
|
|
|
@ -13,7 +13,7 @@ export class ExtHostCredentials implements ExtHostCredentialsShape {
|
|||
|
||||
constructor(mainContext: IMainContext) {
|
||||
this._proxy = mainContext.get(MainContext.MainThreadCredentials);
|
||||
};
|
||||
}
|
||||
|
||||
readSecret(service: string, account: string): Thenable<string | undefined> {
|
||||
return this._proxy.$readSecret(service, account);
|
||||
|
|
|
@ -431,7 +431,7 @@ export class ExtHostTask implements ExtHostTaskShape {
|
|||
this._extHostWorkspace = extHostWorkspace;
|
||||
this._handleCounter = 0;
|
||||
this._handlers = new Map<number, HandlerData>();
|
||||
};
|
||||
}
|
||||
|
||||
public registerTaskProvider(extension: IExtensionDescription, provider: vscode.TaskProvider): vscode.Disposable {
|
||||
if (!provider) {
|
||||
|
|
|
@ -410,7 +410,7 @@ export namespace Suggest {
|
|||
|
||||
return result;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export namespace ParameterInformation {
|
||||
export function from(info: types.ParameterInformation): modes.ParameterInformation {
|
||||
|
|
|
@ -181,7 +181,7 @@ export class ActivitybarPart extends Part {
|
|||
}
|
||||
|
||||
public getPinned(): string[] {
|
||||
return this.viewletService.getViewlets().map(v => v.id).filter(id => this.compositeBar.isPinned(id));;
|
||||
return this.viewletService.getViewlets().map(v => v.id).filter(id => this.compositeBar.isPinned(id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -304,7 +304,7 @@ export interface IModel extends ITreeElement {
|
|||
onDidChangeCallStack: Event<void>;
|
||||
onDidChangeWatchExpressions: Event<IExpression>;
|
||||
onDidChangeReplElements: Event<void>;
|
||||
};
|
||||
}
|
||||
|
||||
// Debug enums
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ const DEBUG_WATCH_EXPRESSIONS_KEY = 'debug.watchexpressions';
|
|||
interface StartSessionResult {
|
||||
status: 'ok' | 'initialConfiguration' | 'saveConfiguration';
|
||||
content?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export class DebugService implements debug.IDebugService {
|
||||
public _serviceBrand: any;
|
||||
|
|
|
@ -11,7 +11,7 @@ import { ITerminalService, ITerminalInstance, ITerminalConfiguration } from 'vs/
|
|||
import { ITerminalService as IExternalTerminalService } from 'vs/workbench/parts/execution/common/execution';
|
||||
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
|
||||
|
||||
const enum ShellType { cmd, powershell, bash };
|
||||
const enum ShellType { cmd, powershell, bash }
|
||||
|
||||
export class TerminalSupport {
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ export class Adapter {
|
|||
}
|
||||
|
||||
return TPromise.as(content);
|
||||
};
|
||||
}
|
||||
|
||||
public getSchemaAttributes(): IJSONSchema[] {
|
||||
if (!this.rawAdapter.configurationAttributes) {
|
||||
|
|
|
@ -140,7 +140,7 @@ function withVisibleExplorer(accessor: ServicesAccessor): TPromise<ExplorerViewl
|
|||
}
|
||||
|
||||
return viewletService.openViewlet(VIEWLET_ID, false) as TPromise<ExplorerViewlet>;
|
||||
};
|
||||
}
|
||||
|
||||
export function withFocusedFilesExplorerViewItem(accessor: ServicesAccessor): TPromise<{ explorer: ExplorerViewlet, tree: ITree, item: FileStat }> {
|
||||
return withFocusedFilesExplorer(accessor).then(res => {
|
||||
|
@ -155,7 +155,7 @@ export function withFocusedFilesExplorerViewItem(accessor: ServicesAccessor): TP
|
|||
|
||||
return { explorer, tree, item: tree.getFocus() };
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export function withFocusedFilesExplorer(accessor: ServicesAccessor): TPromise<{ explorer: ExplorerViewlet, tree: ITree }> {
|
||||
return withVisibleExplorer(accessor).then(explorer => {
|
||||
|
@ -172,7 +172,7 @@ export function withFocusedFilesExplorer(accessor: ServicesAccessor): TPromise<{
|
|||
|
||||
return { explorer, tree };
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function withFocusedOpenEditorsViewItem(accessor: ServicesAccessor): TPromise<{ explorer: ExplorerViewlet, tree: ITree, item: OpenEditor }> {
|
||||
return withVisibleExplorer(accessor).then(explorer => {
|
||||
|
@ -190,7 +190,7 @@ function withFocusedOpenEditorsViewItem(accessor: ServicesAccessor): TPromise<{
|
|||
|
||||
return { explorer, tree, item: focus };
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function withFocusedExplorerItem(accessor: ServicesAccessor): TPromise<FileStat | OpenEditor> {
|
||||
return withFocusedFilesExplorerViewItem(accessor).then(res => {
|
||||
|
@ -206,7 +206,7 @@ function withFocusedExplorerItem(accessor: ServicesAccessor): TPromise<FileStat
|
|||
return void 0;
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export const renameFocusedFilesExplorerViewItemCommand = (accessor: ServicesAccessor) => {
|
||||
runActionOnFocusedFilesExplorerViewItem(accessor, 'renameFile');
|
||||
|
|
|
@ -25,7 +25,7 @@ export class WebviewFindWidget extends SimpleFindWidget {
|
|||
if (this.webview !== null && val) {
|
||||
this.webview.find(val, { findNext: true, forward: !previous });
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public hide() {
|
||||
super.hide();
|
||||
|
|
|
@ -432,7 +432,7 @@ class DefaultSettingsHeaderRenderer extends Disposable {
|
|||
export class SettingsGroupTitleRenderer extends Disposable implements HiddenAreasProvider {
|
||||
|
||||
private _onHiddenAreasChanged: Emitter<void> = new Emitter<void>();
|
||||
get onHiddenAreasChanged(): Event<void> { return this._onHiddenAreasChanged.event; };
|
||||
get onHiddenAreasChanged(): Event<void> { return this._onHiddenAreasChanged.event; }
|
||||
|
||||
private settingsGroups: ISettingsGroup[];
|
||||
private hiddenGroups: ISettingsGroup[] = [];
|
||||
|
|
|
@ -105,9 +105,9 @@ export class ReplaceService implements IReplaceService {
|
|||
) {
|
||||
}
|
||||
|
||||
public replace(match: Match): TPromise<any>
|
||||
public replace(files: FileMatch[], progress?: IProgressRunner): TPromise<any>
|
||||
public replace(match: FileMatchOrMatch, progress?: IProgressRunner, resource?: URI): TPromise<any>
|
||||
public replace(match: Match): TPromise<any>;
|
||||
public replace(files: FileMatch[], progress?: IProgressRunner): TPromise<any>;
|
||||
public replace(match: FileMatchOrMatch, progress?: IProgressRunner, resource?: URI): TPromise<any>;
|
||||
public replace(arg: any, progress: IProgressRunner = null, resource: URI = null): TPromise<any> {
|
||||
|
||||
let bulkEdit: BulkEdit = createBulkEdit(this.textModelResolverService, null, this.fileService);
|
||||
|
|
|
@ -518,10 +518,10 @@ export abstract class AbstractSearchAndReplaceAction extends Action {
|
|||
let navigator: INavigator<any> = this.getNavigatorAt(element, viewer);
|
||||
if (element instanceof FolderMatch) {
|
||||
// If file match is removed then next element is the next file match
|
||||
while (!!navigator.next() && !(navigator.current() instanceof FolderMatch)) { };
|
||||
while (!!navigator.next() && !(navigator.current() instanceof FolderMatch)) { }
|
||||
} else if (element instanceof FileMatch) {
|
||||
// If file match is removed then next element is the next file match
|
||||
while (!!navigator.next() && !(navigator.current() instanceof FileMatch)) { };
|
||||
while (!!navigator.next() && !(navigator.current() instanceof FileMatch)) { }
|
||||
} else {
|
||||
navigator.next();
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ class TaskDefinitionRegistryImpl implements ITaskDefinitionRegistry {
|
|||
this.taskTypes[type.taskType] = type;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
} catch (error) {
|
||||
}
|
||||
resolve(undefined);
|
||||
|
|
|
@ -806,14 +806,14 @@ class TaskService extends EventEmitter implements ITaskService {
|
|||
if (Task.matches(task, alias)) {
|
||||
return task;
|
||||
}
|
||||
};
|
||||
}
|
||||
return undefined;
|
||||
});
|
||||
}
|
||||
|
||||
public tasks(): TPromise<Task[]> {
|
||||
return this.getGroupedTasks().then(result => result.all());
|
||||
};
|
||||
}
|
||||
|
||||
public createSorter(): TaskSorter {
|
||||
return new TaskSorter(this.contextService.getWorkspace() ? this.contextService.getWorkspace().folders : []);
|
||||
|
@ -1124,7 +1124,7 @@ class TaskService extends EventEmitter implements ITaskService {
|
|||
}
|
||||
promise = this.writeConfiguration(workspaceFolder, 'tasks.tasks', fileConfig.tasks);
|
||||
}
|
||||
};
|
||||
}
|
||||
if (!promise) {
|
||||
return TPromise.as(undefined);
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem {
|
|||
let activeTerminal = this.activeTasks[Task.getMapKey(task)];
|
||||
if (!activeTerminal) {
|
||||
return TPromise.as<TaskTerminateResponse>({ success: false, task: undefined });
|
||||
};
|
||||
}
|
||||
return new TPromise<TaskTerminateResponse>((resolve, reject) => {
|
||||
let terminal = activeTerminal.terminal;
|
||||
const onExit = terminal.onExit(() => {
|
||||
|
@ -397,7 +397,7 @@ export class TerminalTaskSystem extends EventEmitter implements ITaskSystem {
|
|||
let waitOnExit: boolean | string = false;
|
||||
if (task.command.presentation.reveal !== RevealKind.Never || !task.isBackground) {
|
||||
waitOnExit = nls.localize('reuseTerminal', 'Terminal will be reused by tasks, press any key to close it.');
|
||||
};
|
||||
}
|
||||
let shellLaunchConfig: IShellLaunchConfig = undefined;
|
||||
let isShellCommand = task.command.runtime === RuntimeType.Shell;
|
||||
if (isShellCommand) {
|
||||
|
|
|
@ -1649,7 +1649,7 @@ export interface IProblemReporter extends IProblemReporterBase {
|
|||
}
|
||||
|
||||
class NullProblemReporter extends NullProblemReporterBase implements IProblemReporter {
|
||||
clearOutput(): void { };
|
||||
clearOutput(): void { }
|
||||
}
|
||||
|
||||
class UUIDMap {
|
||||
|
|
|
@ -30,7 +30,7 @@ export class TerminalFindWidget extends SimpleFindWidget {
|
|||
instance.findNext(val);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public hide() {
|
||||
super.hide();
|
||||
|
|
|
@ -298,4 +298,4 @@ export class TerminalLinkHandler {
|
|||
export interface LineColumnInfo {
|
||||
lineNumber?: string;
|
||||
columnNumber?: string;
|
||||
};
|
||||
}
|
|
@ -27,7 +27,7 @@ import { IWindowService } from 'vs/platform/windows/common/windows';
|
|||
|
||||
export class TerminalService extends AbstractTerminalService implements ITerminalService {
|
||||
private _configHelper: TerminalConfigHelper;
|
||||
public get configHelper(): ITerminalConfigHelper { return this._configHelper; };
|
||||
public get configHelper(): ITerminalConfigHelper { return this._configHelper; }
|
||||
|
||||
constructor(
|
||||
@IContextKeyService _contextKeyService: IContextKeyService,
|
||||
|
|
|
@ -358,7 +358,7 @@ class WelcomePage {
|
|||
this.updateInstalledExtensions(container, installedExtensions);
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ configurationExtPoint.setHandler(extensions => {
|
|||
|
||||
configuration.id = id;
|
||||
configurations.push(configuration);
|
||||
};
|
||||
}
|
||||
|
||||
for (let extension of extensions) {
|
||||
const value = <IConfigurationNode | IConfigurationNode[]>extension.value;
|
||||
|
|
|
@ -308,7 +308,7 @@ export class ConfigurationEditingService {
|
|||
return nls.localize('errorInvalidConfigurationFolder', "Unable to write into folder settings. Please open **Folder Settings** file under **{0}** folder to correct errors/warnings in it and try again.", workspaceFolderName);
|
||||
}
|
||||
return '';
|
||||
};
|
||||
}
|
||||
case ConfigurationEditingErrorCode.ERROR_CONFIGURATION_FILE_DIRTY: {
|
||||
if (operation.workspaceStandAloneConfigurationKey === TASKS_CONFIGURATION_KEY) {
|
||||
return nls.localize('errorTasksConfigurationFileDirty', "Unable to write into tasks file because the file is dirty. Please save the **Tasks Configuration** file and try again.");
|
||||
|
@ -326,7 +326,7 @@ export class ConfigurationEditingService {
|
|||
return nls.localize('errorConfigurationFileDirtyFolder', "Unable to write into folder settings because the file is dirty. Please save the **Folder Settings** file under **{0}** folder and try again.", workspaceFolderName);
|
||||
}
|
||||
return '';
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -222,10 +222,10 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat
|
|||
return this._configuration.toData();
|
||||
}
|
||||
|
||||
getConfiguration<T>(): T
|
||||
getConfiguration<T>(section: string): T
|
||||
getConfiguration<T>(overrides: IConfigurationOverrides): T
|
||||
getConfiguration<T>(section: string, overrides: IConfigurationOverrides): T
|
||||
getConfiguration<T>(): T;
|
||||
getConfiguration<T>(section: string): T;
|
||||
getConfiguration<T>(overrides: IConfigurationOverrides): T;
|
||||
getConfiguration<T>(section: string, overrides: IConfigurationOverrides): T;
|
||||
getConfiguration(arg1?: any, arg2?: any): any {
|
||||
const section = typeof arg1 === 'string' ? arg1 : void 0;
|
||||
const overrides = isConfigurationOverrides(arg1) ? arg1 : isConfigurationOverrides(arg2) ? arg2 : void 0;
|
||||
|
@ -236,11 +236,11 @@ export class WorkspaceService extends Disposable implements IWorkspaceConfigurat
|
|||
return this._configuration.getValue(key, overrides);
|
||||
}
|
||||
|
||||
updateValue(key: string, value: any): TPromise<void>
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides): TPromise<void>
|
||||
updateValue(key: string, value: any, target: ConfigurationTarget): TPromise<void>
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides, target: ConfigurationTarget): TPromise<void>
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides, target: ConfigurationTarget, donotNotifyError: boolean): TPromise<void>
|
||||
updateValue(key: string, value: any): TPromise<void>;
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides): TPromise<void>;
|
||||
updateValue(key: string, value: any, target: ConfigurationTarget): TPromise<void>;
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides, target: ConfigurationTarget): TPromise<void>;
|
||||
updateValue(key: string, value: any, overrides: IConfigurationOverrides, target: ConfigurationTarget, donotNotifyError: boolean): TPromise<void>;
|
||||
updateValue(key: string, value: any, arg3?: any, arg4?: any, donotNotifyError?: any): TPromise<void> {
|
||||
assert.ok(this.configurationEditingService, 'Workbench is not initialized yet');
|
||||
const overrides = isConfigurationOverrides(arg3) ? arg3 : void 0;
|
||||
|
|
|
@ -126,10 +126,10 @@ export class JSONEditingService implements IJSONEditingService {
|
|||
// User issues
|
||||
case JSONEditingErrorCode.ERROR_INVALID_FILE: {
|
||||
return nls.localize('errorInvalidFile', "Unable to write into the file. Please open the file to correct errors/warnings in the file and try again.");
|
||||
};
|
||||
}
|
||||
case JSONEditingErrorCode.ERROR_FILE_DIRTY: {
|
||||
return nls.localize('errorFileDirty', "Unable to write into the file because the file is dirty. Please save the file and try again.");
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -201,7 +201,7 @@ class ExtensionManifestNLSReplacer extends ExtensionManifestHandler {
|
|||
if (literal.hasOwnProperty(key)) {
|
||||
processEntry(literal, key);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ enum Path {
|
|||
UNIX,
|
||||
WINDOWS,
|
||||
UNC
|
||||
};
|
||||
}
|
||||
|
||||
suite('Watcher', () => {
|
||||
|
||||
|
|
|
@ -493,7 +493,7 @@ export class FileWalker {
|
|||
if (self.isLimitHit) {
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
matchDirectory(rootEntries);
|
||||
}
|
||||
|
|
|
@ -412,5 +412,5 @@ export class WorkspaceStats {
|
|||
this.reportRemotes(uris);
|
||||
this.reportAzure(uris);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
|
|||
}, err => {
|
||||
if (err && err.code === 'ENOENT') {
|
||||
return TPromise.as<string>(null); // ignore, user config file doesn't exist yet
|
||||
};
|
||||
}
|
||||
return TPromise.wrapError<string>(err);
|
||||
});
|
||||
}
|
||||
|
@ -346,7 +346,7 @@ export class WorkbenchThemeService implements IWorkbenchThemeService {
|
|||
this.storageService.store(PERSISTED_THEME_STORAGE_KEY, newTheme.toStorageData());
|
||||
|
||||
return this.writeColorThemeConfiguration(settingsTarget);
|
||||
};
|
||||
}
|
||||
|
||||
private writeColorThemeConfiguration(settingsTarget: ConfigurationTarget): TPromise<IColorTheme> {
|
||||
if (!types.isUndefinedOrNull(settingsTarget)) {
|
||||
|
@ -588,7 +588,7 @@ function tokenGroupSettings(description: string) {
|
|||
colorThemeSchema.tokenColorizationSettingSchema
|
||||
]
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
configurationRegistry.registerConfiguration({
|
||||
id: 'editor',
|
||||
|
|
|
@ -25,8 +25,8 @@ export class ViewletService implements IViewletService {
|
|||
private extensionViewletsLoaded: TPromise<void>;
|
||||
private extensionViewletsLoadedPromiseComplete: ValueCallback;
|
||||
|
||||
public get onDidViewletOpen(): Event<IViewlet> { return this.sidebarPart.onDidViewletOpen; };
|
||||
public get onDidViewletClose(): Event<IViewlet> { return this.sidebarPart.onDidViewletClose; };
|
||||
public get onDidViewletOpen(): Event<IViewlet> { return this.sidebarPart.onDidViewletOpen; }
|
||||
public get onDidViewletClose(): Event<IViewlet> { return this.sidebarPart.onDidViewletClose; }
|
||||
|
||||
constructor(
|
||||
sidebarPart: SidebarPart,
|
||||
|
|
|
@ -25,7 +25,7 @@ suite('ExtHostConfiguration', function () {
|
|||
this.lastArgs = [target, key, value];
|
||||
return TPromise.as(void 0);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function createExtHostConfiguration(contents: any = Object.create(null), shape?: MainThreadConfigurationShape) {
|
||||
if (!shape) {
|
||||
|
|
|
@ -24,7 +24,7 @@ suite('ExtHostDiagnostics', () => {
|
|||
$clear(owner: string): TPromise<any> {
|
||||
return TPromise.as(null);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
test('disposeCheck', function () {
|
||||
|
||||
|
@ -35,6 +35,7 @@ suite('ExtHostDiagnostics', () => {
|
|||
assert.throws(() => collection.name);
|
||||
assert.throws(() => collection.clear());
|
||||
assert.throws(() => collection.delete(URI.parse('aa:bb')));
|
||||
// tslint:disable-next-line:semicolon
|
||||
assert.throws(() => collection.forEach(() => { ; }));
|
||||
assert.throws(() => collection.get(URI.parse('aa:bb')));
|
||||
assert.throws(() => collection.has(URI.parse('aa:bb')));
|
||||
|
|
|
@ -31,7 +31,7 @@ suite('ExtHostConfiguration', function () {
|
|||
$refresh(viewId: string, itemHandles: number[]): void {
|
||||
this.onRefresh.fire(itemHandles);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
let testObject: ExtHostTreeViews;
|
||||
let target: RecordingShape;
|
||||
|
|
|
@ -36,7 +36,7 @@ suite('MainThreadDocumentsAndEditors', () => {
|
|||
modelService = new ModelServiceImpl(null, configService);
|
||||
codeEditorService = new MockCodeEditorService();
|
||||
textFileService = new class extends mock<ITextFileService>() {
|
||||
isDirty() { return false; };
|
||||
isDirty() { return false; }
|
||||
models = <any>{
|
||||
onModelSaved: Event.None,
|
||||
onModelReverted: Event.None,
|
||||
|
|
|
@ -36,7 +36,7 @@ suite('MainThreadEditors', () => {
|
|||
modelService = new ModelServiceImpl(null, configService);
|
||||
const codeEditorService = new MockCodeEditorService();
|
||||
const textFileService = new class extends mock<ITextFileService>() {
|
||||
isDirty() { return false; };
|
||||
isDirty() { return false; }
|
||||
models = <any>{
|
||||
onModelSaved: Event.None,
|
||||
onModelReverted: Event.None,
|
||||
|
|
|
@ -178,7 +178,7 @@ class TestTelemetryService implements ITelemetryService {
|
|||
machineId: 'someValue.machineId'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
class TestExperimentService implements IExperimentService {
|
||||
|
||||
|
|
|
@ -166,4 +166,4 @@ class TestTelemetryService implements ITelemetryService {
|
|||
machineId: 'someValue.machineId'
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -880,7 +880,7 @@ export class TestBackupFileService implements IBackupFileService {
|
|||
public discardAllWorkspaceBackups(): TPromise<void> {
|
||||
return TPromise.as(void 0);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export class TestWindowService implements IWindowService {
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import { SpectronApplication } from '../../spectron/application';
|
|||
export enum ActivityBarPosition {
|
||||
LEFT = 0,
|
||||
RIGHT = 1
|
||||
};
|
||||
}
|
||||
|
||||
export class ActivityBar {
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { SpectronApplication } from '../../spectron/application';
|
|||
export enum ActivityBarPosition {
|
||||
LEFT = 0,
|
||||
RIGHT = 1
|
||||
};
|
||||
}
|
||||
|
||||
const SEARCH_INPUT = '.settings-search-input input';
|
||||
const EDITOR = '.editable-preferences-editor-container .monaco-editor textarea';
|
||||
|
|
|
@ -8,7 +8,7 @@ import { SpectronApplication } from '../../spectron/application';
|
|||
export enum ProblemSeverity {
|
||||
WARNING = 0,
|
||||
ERROR = 1
|
||||
};
|
||||
}
|
||||
|
||||
export class Problems {
|
||||
|
||||
|
|
|
@ -332,6 +332,6 @@ export class SpectronApplication {
|
|||
return 'Meta';
|
||||
default:
|
||||
return key.length === 1 ? key : key.charAt(0).toUpperCase() + key.slice(1);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue