How to use the vscode-uri.from function in vscode-uri

To help you get started, we’ve selected a few vscode-uri 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 eclipse-theia / theia / src / application / common / uri.ts View on Github external
withFragment(fragment: string): URI {
        const newCodeUri = Uri.from({
            ...this.codeUri.toJSON(),
            fragment
        })
        return new URI(newCodeUri);
    }
github eclipse-theia / theia / packages / core / src / common / uri.ts View on Github external
withQuery(query: string): URI {
        const newCodeUri = Uri.from({
            ...this.codeUri.toJSON(),
            scheme: this.codeUri.scheme,
            query
        });
        return new URI(newCodeUri);
    }
github eclipse-theia / theia / src / application / common / uri.ts View on Github external
withScheme(scheme: string): URI {
        const newCodeUri = Uri.from({
            ...this.codeUri.toJSON(),
            scheme
        })
        return new URI(newCodeUri);
    }
github eclipse-theia / theia / packages / core / src / common / uri.ts View on Github external
withAuthority(authority: string): URI {
        const newCodeUri = Uri.from({
            ...this.codeUri.toJSON(),
            scheme: this.codeUri.scheme,
            authority
        });
        return new URI(newCodeUri);
    }
github eclipse-theia / theia / src / application / common / uri.ts View on Github external
withPath(path: string | Path): URI {
        const newCodeUri = Uri.from({
            ...this.codeUri.toJSON(),
            path: path.toString()
        })
        return new URI(newCodeUri);
    }
github microsoft / vscode / extensions / css / server / src / embeddedContentUri.ts View on Github external
export function getEmbeddedContentUri(parentDocumentUri: string, embeddedLanguageId: string): Uri {
	return Uri.from({ scheme: EMBEDDED_CONTENT_SCHEME, authority: embeddedLanguageId, path: '/' + encodeURIComponent(parentDocumentUri) + '.' + embeddedLanguageId });
};
github eclipse-theia / theia / packages / core / src / common / uri.ts View on Github external
withPath(path: string | Path): URI {
        const newCodeUri = Uri.from({
            ...this.codeUri.toJSON(),
            scheme: this.codeUri.scheme,
            path: path.toString()
        });
        return new URI(newCodeUri);
    }
github eclipse-theia / theia / src / application / common / uri.ts View on Github external
constructor(uri?: string | Uri) {
        if (uri === undefined) {
            this.codeUri = Uri.from({})
        } else if (uri instanceof Uri) {
            this.codeUri = uri
        } else {
            this.codeUri = Uri.parse(uri)
        }
    }
github eclipse-theia / theia / packages / core / src / common / uri.ts View on Github external
withFragment(fragment: string): URI {
        const newCodeUri = Uri.from({
            ...this.codeUri.toJSON(),
            scheme: this.codeUri.scheme,
            fragment
        });
        return new URI(newCodeUri);
    }
github eclipse-theia / theia / src / application / common / uri.ts View on Github external
withQuery(query: string): URI {
        const newCodeUri = Uri.from({
            ...this.codeUri.toJSON(),
            query
        })
        return new URI(newCodeUri);
    }