mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Fix microsoft/monaco-editor#567. We should filter section when it is provided
This commit is contained in:
parent
6f5f757479
commit
9b69b61eaf
|
@ -40,6 +40,7 @@ import { IRange } from 'vs/editor/common/core/range';
|
|||
import { ITextModel } from 'vs/editor/common/model';
|
||||
import { INotificationService, INotification, INotificationHandle, NoOpNotification } from 'vs/platform/notification/common/notification';
|
||||
import { IConfirmation, IConfirmationResult, IConfirmationService } from 'vs/platform/dialogs/common/dialogs';
|
||||
import { IPosition, Position as Pos } from 'vs/editor/common/core/position';
|
||||
|
||||
export class SimpleEditor implements IEditor {
|
||||
|
||||
|
@ -525,10 +526,13 @@ export class SimpleResourceConfigurationService implements ITextResourceConfigur
|
|||
});
|
||||
}
|
||||
|
||||
public getValue<T>(): T {
|
||||
return this.configurationService.getValue<T>();
|
||||
getValue<T>(resource: URI, section?: string): T;
|
||||
getValue<T>(resource: URI, position?: IPosition, section?: string): T;
|
||||
getValue<T>(resource: any, arg2?: any, arg3?: any) {
|
||||
const position: IPosition = Pos.isIPosition(arg2) ? arg2 : null;
|
||||
const section: string = position ? (typeof arg3 === 'string' ? arg3 : void 0) : (typeof arg2 === 'string' ? arg2 : void 0);
|
||||
return this.configurationService.getValue<T>(section);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class SimpleMenuService implements IMenuService {
|
||||
|
|
Loading…
Reference in a new issue