MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / getTargetURL

Function getTargetURL

packages/debugger/src/locator/locator.ts:47–58  ·  view source on GitHub ↗
(target: TargetIDE | TargetURLFunction, data: SourceCodeData)

Source from the content-addressed store, hash-verified

45}
46
47function getTargetURL(target: TargetIDE | TargetURLFunction, data: SourceCodeData): string | void {
48
49 if (typeof target === 'function') return target(data)
50
51 let {projectPath, file, line, column} = data
52 switch (target) {
53 case 'vscode': return `vscode://file/${projectPath}/${file}:${line}:${column}`
54 case 'vscode-insiders': return `vscode-insiders://file/${projectPath}/${file}:${line}:${column}`
55 case 'atom': return `atom://core/open/file?filename=${projectPath}/${file}&line=${line}&column=${column}`
56 case 'webstorm': return `webstorm://open?file=${projectPath}/${file}&line=${line}&column=${column}`
57 }
58}
59
60export const getProjectPath = (): string | undefined => (window as any)[WINDOW_PROJECTPATH_PROPERTY]
61

Callers 1

openSourceCodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…