當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Emitter.fire方法代碼示例

本文整理匯總了TypeScript中vs/base/common/event.Emitter.fire方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Emitter.fire方法的具體用法?TypeScript Emitter.fire怎麽用?TypeScript Emitter.fire使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在vs/base/common/event.Emitter的用法示例。


在下文中一共展示了Emitter.fire方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: _onUserIdle

	private _onUserIdle(): void {
		if (this._status !== UserStatus.Idle) {
			this._status = UserStatus.Idle;
			this._onStatusChange.fire(this._status);
		}
	}
開發者ID:TanukiSharp,項目名稱:vscode,代碼行數:6,代碼來源:idleMonitor.ts

示例2: setSelectedExpression

	public setSelectedExpression(expression: IExpression) {
		this.selectedExpression = expression;
		this.expressionSelectedContextKey.set(!!expression);
		this._onDidSelectExpression.fire(expression);
	}
開發者ID:AllureFer,項目名稱:vscode,代碼行數:5,代碼來源:debugViewModel.ts

示例3: change

	public change(newState: INewFindReplaceState, moveCursor: boolean, updateHistory: boolean = true): void {
		let changeEvent: FindReplaceStateChangedEvent = {
			moveCursor: moveCursor,
			updateHistory: updateHistory,
			searchString: false,
			replaceString: false,
			isRevealed: false,
			isReplaceRevealed: false,
			isRegex: false,
			wholeWord: false,
			matchCase: false,
			searchScope: false,
			matchesPosition: false,
			matchesCount: false,
			currentMatch: false
		};
		let somethingChanged = false;

		const oldEffectiveIsRegex = this.isRegex;
		const oldEffectiveWholeWords = this.wholeWord;
		const oldEffectiveMatchCase = this.matchCase;

		if (typeof newState.searchString !== 'undefined') {
			if (this._searchString !== newState.searchString) {
				this._searchString = newState.searchString;
				changeEvent.searchString = true;
				somethingChanged = true;
			}
		}
		if (typeof newState.replaceString !== 'undefined') {
			if (this._replaceString !== newState.replaceString) {
				this._replaceString = newState.replaceString;
				changeEvent.replaceString = true;
				somethingChanged = true;
			}
		}
		if (typeof newState.isRevealed !== 'undefined') {
			if (this._isRevealed !== newState.isRevealed) {
				this._isRevealed = newState.isRevealed;
				changeEvent.isRevealed = true;
				somethingChanged = true;
			}
		}
		if (typeof newState.isReplaceRevealed !== 'undefined') {
			if (this._isReplaceRevealed !== newState.isReplaceRevealed) {
				this._isReplaceRevealed = newState.isReplaceRevealed;
				changeEvent.isReplaceRevealed = true;
				somethingChanged = true;
			}
		}
		if (typeof newState.isRegex !== 'undefined') {
			this._isRegex = newState.isRegex;
		}
		if (typeof newState.wholeWord !== 'undefined') {
			this._wholeWord = newState.wholeWord;
		}
		if (typeof newState.matchCase !== 'undefined') {
			this._matchCase = newState.matchCase;
		}
		if (typeof newState.searchScope !== 'undefined') {
			if (!Range.equalsRange(this._searchScope, newState.searchScope)) {
				this._searchScope = newState.searchScope;
				changeEvent.searchScope = true;
				somethingChanged = true;
			}
		}

		// Overrides get set when they explicitly come in and get reset anytime something else changes
		this._isRegexOverride = (typeof newState.isRegexOverride !== 'undefined' ? newState.isRegexOverride : FindOptionOverride.NotSet);
		this._wholeWordOverride = (typeof newState.wholeWordOverride !== 'undefined' ? newState.wholeWordOverride : FindOptionOverride.NotSet);
		this._matchCaseOverride = (typeof newState.matchCaseOverride !== 'undefined' ? newState.matchCaseOverride : FindOptionOverride.NotSet);

		if (oldEffectiveIsRegex !== this.isRegex) {
			somethingChanged = true;
			changeEvent.isRegex = true;
		}
		if (oldEffectiveWholeWords !== this.wholeWord) {
			somethingChanged = true;
			changeEvent.wholeWord = true;
		}
		if (oldEffectiveMatchCase !== this.matchCase) {
			somethingChanged = true;
			changeEvent.matchCase = true;
		}

		if (somethingChanged) {
			this._onFindReplaceStateChange.fire(changeEvent);
		}
	}
開發者ID:KTXSoftware,項目名稱:KodeStudio,代碼行數:89,代碼來源:findState.ts

示例4:

		viewFocusTracker.addFocusListener(() => this._onFocus.fire(view));
開發者ID:Contagious-Marketing,項目名稱:vscode,代碼行數:1,代碼來源:splitview.ts

示例5:

		this.toDispose.push(this.model.addListener('highlight', () => this._onHighlightChange.fire()));
開發者ID:SeanKilleen,項目名稱:vscode,代碼行數:1,代碼來源:treeImpl.ts

示例6: setSelectedFunctionBreakpoint

	public setSelectedFunctionBreakpoint(functionBreakpoint: debug.IFunctionBreakpoint): void {
		this.selectedFunctionBreakpoint = functionBreakpoint;
		this._onDidSelectFunctionBreakpoint.fire(functionBreakpoint);
	}
開發者ID:,項目名稱:,代碼行數:4,代碼來源:

示例7:

		this._xterm.on('lineFeed', () => this._onCheckShell.fire());
開發者ID:armanio123,項目名稱:vscode,代碼行數:1,代碼來源:windowsShellHelper.ts

示例8:

		this.toDispose.push(dom.addStandardDisposableListener(this.select, 'change', (e) => {
			this.select.title = e.target.value;
			this._onDidSelect.fire(e.target.value);
		}));
開發者ID:sandy081,項目名稱:vscode,代碼行數:4,代碼來源:selectBox.ts

示例9: handleMetadataChanged

	private handleMetadataChanged(meta: string): void {
		this.metadata = meta;
		this._onMetadataChanged.fire();
	}
開發者ID:jumpinjackie,項目名稱:sqlopsstudio,代碼行數:4,代碼來源:binaryEditor.ts

示例10: addCodeEditor

	public addCodeEditor(editor: ICommonCodeEditor): void {
		this._codeEditors[editor.getId()] = editor;
		this._onCodeEditorAdd.fire(editor);
	}
開發者ID:StateFarmIns,項目名稱:vscode,代碼行數:4,代碼來源:abstractCodeEditorService.ts


注:本文中的vs/base/common/event.Emitter.fire方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。