mirror of
https://github.com/microsoft/vscode.git
synced 2026-09-19 18:14:50 +01:00
ensure properties are initialized before usage (#247312)
This commit is contained in:
@@ -88,7 +88,6 @@ const ignored = new Set([
|
||||
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.ts',
|
||||
'vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.ts',
|
||||
'vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts',
|
||||
'vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView.ts',
|
||||
'vs/editor/contrib/placeholderText/browser/placeholderTextContribution.ts',
|
||||
'vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.ts',
|
||||
'vs/workbench/contrib/files/browser/views/openEditorsView.ts',
|
||||
@@ -106,7 +105,6 @@ const ignored = new Set([
|
||||
'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.ts',
|
||||
'vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.ts',
|
||||
'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts',
|
||||
'vs/platform/terminal/common/capabilities/commandDetectionCapability.ts',
|
||||
'vs/workbench/services/authentication/browser/authenticationExtensionsService.ts',
|
||||
'vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController.ts',
|
||||
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts',
|
||||
@@ -124,7 +122,6 @@ const ignored = new Set([
|
||||
'vs/workbench/contrib/inlineCompletions/browser/inlineCompletionLanguageStatusBarContribution.ts',
|
||||
'vs/workbench/contrib/welcomeDialog/browser/welcomeWidget.ts',
|
||||
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordInsertView.ts',
|
||||
'vs/platform/terminal/node/ptyService.ts',
|
||||
'vs/workbench/api/common/extHostLanguageFeatures.ts',
|
||||
'vs/workbench/api/common/extHostSearch.ts',
|
||||
]);
|
||||
|
||||
@@ -57,7 +57,6 @@ const ignored = new Set([
|
||||
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsView.ts',
|
||||
'vs/editor/contrib/inlineCompletions/browser/view/inlineCompletionsView.ts',
|
||||
'vs/editor/contrib/inlineCompletions/browser/controller/inlineCompletionsController.ts',
|
||||
'vs/editor/contrib/inlineCompletions/browser/inlineCompletionsAccessibleView.ts',
|
||||
'vs/editor/contrib/placeholderText/browser/placeholderTextContribution.ts',
|
||||
'vs/editor/contrib/unicodeHighlighter/browser/unicodeHighlighter.ts',
|
||||
'vs/workbench/contrib/files/browser/views/openEditorsView.ts',
|
||||
@@ -75,7 +74,6 @@ const ignored = new Set([
|
||||
'vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.ts',
|
||||
'vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.ts',
|
||||
'vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.ts',
|
||||
'vs/platform/terminal/common/capabilities/commandDetectionCapability.ts',
|
||||
'vs/workbench/services/authentication/browser/authenticationExtensionsService.ts',
|
||||
'vs/workbench/services/textMate/browser/backgroundTokenization/textMateWorkerTokenizerController.ts',
|
||||
'vs/workbench/services/textMate/browser/textMateTokenizationFeatureImpl.ts',
|
||||
@@ -93,7 +91,6 @@ const ignored = new Set([
|
||||
'vs/workbench/contrib/inlineCompletions/browser/inlineCompletionLanguageStatusBarContribution.ts',
|
||||
'vs/workbench/contrib/welcomeDialog/browser/welcomeWidget.ts',
|
||||
'vs/editor/contrib/inlineCompletions/browser/view/inlineEdits/inlineEditsViews/inlineEditsWordInsertView.ts',
|
||||
'vs/platform/terminal/node/ptyService.ts',
|
||||
'vs/workbench/api/common/extHostLanguageFeatures.ts',
|
||||
'vs/workbench/api/common/extHostSearch.ts',
|
||||
]);
|
||||
|
||||
@@ -42,16 +42,17 @@ export class InlineCompletionsAccessibleView implements IAccessibleViewImplement
|
||||
class InlineCompletionsAccessibleViewContentProvider extends Disposable implements IAccessibleViewContentProvider {
|
||||
private readonly _onDidChangeContent: Emitter<void> = this._register(new Emitter<void>());
|
||||
public readonly onDidChangeContent: Event<void> = this._onDidChangeContent.event;
|
||||
public readonly options: { language: string | undefined; type: AccessibleViewType.View };
|
||||
constructor(
|
||||
private readonly _editor: ICodeEditor,
|
||||
private readonly _model: InlineCompletionsModel,
|
||||
) {
|
||||
super();
|
||||
this.options = { language: this._editor.getModel()?.getLanguageId() ?? undefined, type: AccessibleViewType.View };
|
||||
}
|
||||
|
||||
public readonly id = AccessibleViewProviderId.InlineCompletions;
|
||||
public readonly verbositySettingKey = 'accessibility.verbosity.inlineCompletions';
|
||||
public readonly options = { language: this._editor.getModel()?.getLanguageId() ?? undefined, type: AccessibleViewType.View };
|
||||
|
||||
public provideContent(): string {
|
||||
const state = this._model.state.get();
|
||||
|
||||
@@ -28,7 +28,7 @@ export class CommandDetectionCapability extends Disposable implements ICommandDe
|
||||
protected _commands: TerminalCommand[] = [];
|
||||
private _cwd: string | undefined;
|
||||
private _promptTerminator: string | undefined;
|
||||
private _currentCommand: PartialTerminalCommand = new PartialTerminalCommand(this._terminal);
|
||||
private _currentCommand: PartialTerminalCommand;
|
||||
private _commandMarkers: IMarker[] = [];
|
||||
private _dimensions: ITerminalDimensions;
|
||||
private __isCommandStorageDisabled: boolean = false;
|
||||
@@ -85,7 +85,7 @@ export class CommandDetectionCapability extends Disposable implements ICommandDe
|
||||
@ILogService private readonly _logService: ILogService
|
||||
) {
|
||||
super();
|
||||
|
||||
this._currentCommand = new PartialTerminalCommand(this._terminal);
|
||||
this._promptInputModel = this._register(new PromptInputModel(this._terminal, this.onCommandStarted, this.onCommandStartChanged, this.onCommandExecuted, this._logService));
|
||||
|
||||
// Pull command line from the buffer if it was not set explicitly
|
||||
|
||||
@@ -78,7 +78,7 @@ export class PtyService extends Disposable implements IPtyService {
|
||||
|
||||
// #region Pty service contribution RPC calls
|
||||
|
||||
private readonly _autoRepliesContribution = new AutoRepliesPtyServiceContribution(this._logService);
|
||||
private readonly _autoRepliesContribution: AutoRepliesPtyServiceContribution;
|
||||
@traceRpc
|
||||
async installAutoReply(match: string, reply: string) {
|
||||
await this._autoRepliesContribution.installAutoReply(match, reply);
|
||||
@@ -90,9 +90,7 @@ export class PtyService extends Disposable implements IPtyService {
|
||||
|
||||
// #endregion
|
||||
|
||||
private readonly _contributions: IPtyServiceContribution[] = [
|
||||
this._autoRepliesContribution
|
||||
];
|
||||
private readonly _contributions: IPtyServiceContribution[];
|
||||
|
||||
private _lastPtyId: number = 0;
|
||||
|
||||
@@ -148,6 +146,11 @@ export class PtyService extends Disposable implements IPtyService {
|
||||
|
||||
this._detachInstanceRequestStore = this._register(new RequestStore(undefined, this._logService));
|
||||
this._detachInstanceRequestStore.onCreateRequest(this._onDidRequestDetach.fire, this._onDidRequestDetach);
|
||||
|
||||
this._autoRepliesContribution = new AutoRepliesPtyServiceContribution(this._logService);
|
||||
|
||||
this._contributions = [this._autoRepliesContribution];
|
||||
|
||||
}
|
||||
|
||||
@traceRpc
|
||||
|
||||
Reference in New Issue
Block a user