本文整理汇总了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);
}
}
示例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;
}
示例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);
}
示例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();
}));
}
示例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));
}