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


TypeScript markers.IMarkerService類代碼示例

本文整理匯總了TypeScript中vs/platform/markers/common/markers.IMarkerService的典型用法代碼示例。如果您正苦於以下問題:TypeScript IMarkerService類的具體用法?TypeScript IMarkerService怎麽用?TypeScript IMarkerService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


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

示例1: deliverMarkersPerOwnerAndResourceResolved

	private deliverMarkersPerOwnerAndResourceResolved(owner: string, resource: string, markers: Map<string, IMarkerData>, reported: Map<string, number>): void {
		if (markers.size !== reported.get(resource)) {
			let toSet: IMarkerData[] = [];
			markers.forEach(value => toSet.push(value));
			this.markerService.changeOne(owner, URI.parse(resource), toSet);
			reported.set(resource, markers.size);
		}
	}
開發者ID:developers23,項目名稱:vscode,代碼行數:8,代碼來源:problemCollectors.ts

示例2: getMarkers

	/**
	 * Returns all marker sorted by startLineNumber
	 */
	private getMarkers(): IMarker[] {
		if (this.markers !== null) {
			return this.markers;
		}
		var model = this.editor.getModel();
		if (!model) {
			return;
		}
		this.markers = this.markerService.read({ resource: model.getAssociatedResource() })
			.sort((e1, e2) => { return e1.startLineNumber - e2.startLineNumber; });

		return this.markers;
	}
開發者ID:13572293130,項目名稱:vscode,代碼行數:16,代碼來源:quickFixModel.ts

示例3: _cleanMarkers

	private _cleanMarkers(owner: string, toClean: Map<string, URI>): void {
		let uris: URI[] = [];
		let applyTo = this.applyToByOwner.get(owner);
		toClean.forEach((uri, uriAsString) => {
			if (
				applyTo === ApplyToKind.allDocuments ||
				(applyTo === ApplyToKind.openDocuments && this.openModels[uriAsString]) ||
				(applyTo === ApplyToKind.closedDocuments && !this.openModels[uriAsString])
			) {
				uris.push(uri);
			}
		});
		this.markerService.remove(owner, uris);
	}
開發者ID:developers23,項目名稱:vscode,代碼行數:14,代碼來源:problemCollectors.ts

示例4: onModelChanged

	private onModelChanged(): void {
		this.cancelDialog();
		this.localDispose();
		this.lastMarker = null;
		this.lightBulpPosition = null;
		this.markers = null;
		this.updateScheduler = null;

		if (!QuickFixRegistry.has(this.editor.getModel()) || this.editor.getConfiguration().readOnly) {
			this.setDecoration(null);
			return;
		}

		this.markerService.onMarkerChanged(this.onMarkerChanged, this, this.toLocalDispose);

		this.toLocalDispose.push(this.editor.addListener2(EventType.CursorPositionChanged, (e: ICursorPositionChangedEvent) => {
			this.onCursorPositionChanged();
		}));
	}
開發者ID:13572293130,項目名稱:vscode,代碼行數:19,代碼來源:quickFixModel.ts

示例5: recordResourcesToClean

	protected recordResourcesToClean(owner: string): void {
		let resourceSetToClean = this.getResourceSetToClean(owner);
		this.markerService.read({ owner: owner }).forEach(marker => resourceSetToClean.set(marker.resource.toString(), marker.resource));
	}
開發者ID:developers23,項目名稱:vscode,代碼行數:4,代碼來源:problemCollectors.ts


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