How to use the lsif-protocol.EdgeLabels.textDocument_foldingRange function in lsif-protocol

To help you get started, we’ve selected a few lsif-protocol examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / lsif-node / sqlite / src / blobStore.ts View on Github external
case VertexLabels.diagnosticResult:
					this.handleDiagnostics(element);
					break;
				case VertexLabels.event:
					this.handleEvent(element);
					break;
			}
		} else if (element.type === ElementTypes.edge) {
			switch(element.label) {
				case EdgeLabels.next:
					this.handleNextEdge(element);
					break;
				case EdgeLabels.moniker:
					this.handleMonikerEdge(element);
					break;
				case EdgeLabels.textDocument_foldingRange:
					this.handleFoldingRangeEdge(element);
					break;
				case EdgeLabels.textDocument_documentSymbol:
					this.handleDocumentSymbolEdge(element);
					break;
				case EdgeLabels.textDocument_diagnostic:
					this.handleDiagnosticsEdge(element);
					break;
				case EdgeLabels.textDocument_hover:
					this.handleHoverEdge(element);
					break;
				case EdgeLabels.textDocument_declaration:
					this.handleDeclarationEdge(element);
					break;
				case EdgeLabels.textDocument_definition:
					this.handleDefinitionEdge(element);
github microsoft / vscode-lsif-extension / server / src / json.ts View on Github external
if (itemTarget !== void 0) {
					if (values === void 0) {
						values = [ itemTarget ];
						this.out.item.set(from.id, values);
					} else {
						values.push(itemTarget);
					}
				}
				break;
			case EdgeLabels.refersTo:
				this.out.refersTo.set(from.id, to as ResultSet);
				break;
			case EdgeLabels.textDocument_documentSymbol:
				this.out.documentSymbol.set(from.id, to as DocumentSymbolResult);
				break;
			case EdgeLabels.textDocument_foldingRange:
				this.out.foldingRange.set(from.id, to as FoldingRangeResult);
				break;
			case EdgeLabels.textDocument_documentLink:
				this.out.documentLink.set(from.id, to as DocumentLinkResult);
				break;
			case EdgeLabels.textDocument_diagnostic:
				this.out.diagnostic.set(from.id, to as DiagnosticResult);
				break;
			case EdgeLabels.textDocument_definition:
				this.out.definition.set(from.id, to as DefinitionResult);
				break;
			case EdgeLabels.textDocument_typeDefinition:
				this.out.typeDefinition.set(from.id, to as TypeDefinitionResult);
				break;
			case EdgeLabels.textDocument_hover:
				this.out.hover.set(from.id, to as HoverResult);
github microsoft / lsif-node / tsc / src / emitters / graphSON.ts View on Github external
export const create: Create = (writer: Writer, idGenerator: () => Id): Emitter => {
	let vertices: Map;
	const labelMap: Map = new Map([
		[EdgeLabels.item, 'item'],
		[EdgeLabels.contains, 'contains'],
		[EdgeLabels.next, 'next'],
		[EdgeLabels.textDocument_documentSymbol, 'textDocument.documentSymbol'],
		[EdgeLabels.textDocument_foldingRange, 'textDocument.foldingRange'],
		[EdgeLabels.textDocument_diagnostic, 'textDocument.diagnostic'],
		[EdgeLabels.textDocument_documentLink, 'textDocument.documentLink'],
		[EdgeLabels.textDocument_definition, 'textDocument.definition'],
		[EdgeLabels.textDocument_typeDefinition, 'textDocument.typeDefinition'],
		[EdgeLabels.textDocument_hover, 'textDocument.hover'],
		[EdgeLabels.textDocument_references, 'textDocument.references'],
		[EdgeLabels.textDocument_implementation, 'textDocument.implementation'],
	]);
	return {
		start: () => {
			vertices = new Map();
		},
		emit: (element: Vertex | Edge) => {
			if (element.type === ElementTypes.vertex) {
				let gs: GraphSonVertex;
				let values: GraphSonProperty[];
github microsoft / lsif-node / tsc / src / emitters / graphSON.ts View on Github external
export const create: Create = (idGenerator: () => Id): Emitter => {
	let vertices: Map;
	const labelMap: Map = new Map([
		[EdgeLabels.item, 'item'],
		[EdgeLabels.contains, 'contains'],
		[EdgeLabels.refersTo, 'refersTo'],
		[EdgeLabels.textDocument_documentSymbol, 'textDocument.documentSymbol'],
		[EdgeLabels.textDocument_foldingRange, 'textDocument.foldingRange'],
		[EdgeLabels.textDocument_diagnostic, 'textDocument.diagnostic'],
		[EdgeLabels.textDocument_documentLink, 'textDocument.documentLink'],
		[EdgeLabels.textDocument_definition, 'textDocument.definition'],
		[EdgeLabels.textDocument_typeDefinition, 'textDocument.typeDefinition'],
		[EdgeLabels.textDocument_hover, 'textDocument.hover'],
		[EdgeLabels.textDocument_references, 'textDocument.references'],
		[EdgeLabels.textDocument_implementation, 'textDocument.implementation'],
	]);
	return {
		start: () => {
			vertices = new Map();
		},
		emit: (element: Vertex | Edge) => {
			if (element.type === ElementTypes.vertex) {
				let gs: GraphSonVertex;
				let values: GraphSonProperty[];