(folder?: WorkspaceFolder)
| 206 | } |
| 207 | |
| 208 | export function isDartWorkspaceFolder(folder?: WorkspaceFolder): boolean { |
| 209 | if (folder?.uri.scheme !== "file") |
| 210 | return false; |
| 211 | |
| 212 | // Currently we don't have good logic to know what's a Dart folder. |
| 213 | // We could require a pubspec, but it's valid to just write scripts without them. |
| 214 | // For now, nothing calls this that will do bad things if the folder isn't a Dart |
| 215 | // project so we can review amend this in future if required. |
| 216 | return true; |
| 217 | } |
| 218 | |
| 219 | export function toRange(document: TextDocument, offset: number, length: number): Range { |
| 220 | return new Range(document.positionAt(offset), document.positionAt(offset + length)); |
no outgoing calls
no test coverage detected