mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-27 07:10:30 -04:00
Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)
* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 * fix pipelines * fix strict-null-checks * add missing files
This commit is contained in:
@@ -34,7 +34,6 @@ import { onUnexpectedError } from 'vs/base/common/errors';
|
||||
import { RawContextKey, IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
|
||||
const CONTEXT_FOLDING_ENABLED = new RawContextKey<boolean>('foldingEnabled', false);
|
||||
export const ID = 'editor.contrib.folding';
|
||||
|
||||
export interface RangeProvider {
|
||||
readonly id: string;
|
||||
@@ -50,11 +49,12 @@ interface FoldingStateMemento {
|
||||
|
||||
export class FoldingController extends Disposable implements IEditorContribution {
|
||||
|
||||
static MAX_FOLDING_REGIONS = 5000;
|
||||
public static ID = 'editor.contrib.folding';
|
||||
|
||||
static readonly MAX_FOLDING_REGIONS = 5000;
|
||||
|
||||
public static get(editor: ICodeEditor): FoldingController {
|
||||
return editor.getContribution<FoldingController>(ID);
|
||||
return editor.getContribution<FoldingController>(FoldingController.ID);
|
||||
}
|
||||
|
||||
private readonly editor: ICodeEditor;
|
||||
@@ -134,10 +134,6 @@ export class FoldingController extends Disposable implements IEditorContribution
|
||||
this.onModelChanged();
|
||||
}
|
||||
|
||||
public getId(): string {
|
||||
return ID;
|
||||
}
|
||||
|
||||
/**
|
||||
* Store view state.
|
||||
*/
|
||||
@@ -667,7 +663,7 @@ class ToggleFoldAction extends FoldingAction<void> {
|
||||
precondition: CONTEXT_FOLDING_ENABLED,
|
||||
kbOpts: {
|
||||
kbExpr: EditorContextKeys.editorTextFocus,
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_K),
|
||||
primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KEY_K, KeyMod.CtrlCmd | KeyCode.KEY_L),
|
||||
weight: KeybindingWeight.EditorContrib
|
||||
}
|
||||
});
|
||||
@@ -856,7 +852,7 @@ class FoldLevelAction extends FoldingAction<void> {
|
||||
}
|
||||
}
|
||||
|
||||
registerEditorContribution(FoldingController);
|
||||
registerEditorContribution(FoldingController.ID, FoldingController);
|
||||
registerEditorAction(UnfoldAction);
|
||||
registerEditorAction(UnFoldRecursivelyAction);
|
||||
registerEditorAction(FoldAction);
|
||||
|
||||
Reference in New Issue
Block a user