From cdc7f467a1b3f044983c002de47325fba8e8b5fa Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 11 Jan 2017 22:27:27 -0700 Subject: [PATCH 1/6] make it so that the output will link to the file and line of the todo --- src/types/TodoType.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/types/TodoType.ts b/src/types/TodoType.ts index a83374d..14922c2 100644 --- a/src/types/TodoType.ts +++ b/src/types/TodoType.ts @@ -26,11 +26,16 @@ export class TodoType { } getDisplayString(): string { - let path = `${this.getFile().getName()}:${this.getLineNumber()}`; + let url = this.getFile().data.uri.toString(); + let middle = "#" + if (url.split(":")[0].toString() == "untitled") { + middle = "; Line Number: " + } + let path = url + middle + this.getLineNumber().toString(); return `From ${path}\n----------------------------------\n${this.getContent()}`; } toString(): string { return this.getFile().toString() + "\n" + this.getContent.toString(); } -} \ No newline at end of file +} From 87e47546ba85e0c03403fc9a2f38f189bf84c267 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 11 Jan 2017 22:28:58 -0700 Subject: [PATCH 2/6] added comments to account for untitled files --- src/types/TodoType.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/types/TodoType.ts b/src/types/TodoType.ts index 14922c2..9b1d144 100644 --- a/src/types/TodoType.ts +++ b/src/types/TodoType.ts @@ -28,6 +28,7 @@ export class TodoType { getDisplayString(): string { let url = this.getFile().data.uri.toString(); let middle = "#" + // account for untitled files if (url.split(":")[0].toString() == "untitled") { middle = "; Line Number: " } From 1236cef116ac42bc618ca73a5256251e53e5bc64 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 11 Jan 2017 22:38:56 -0700 Subject: [PATCH 3/6] undo comment commit to pass build test --- src/types/TodoType.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/types/TodoType.ts b/src/types/TodoType.ts index 9b1d144..530ac1b 100644 --- a/src/types/TodoType.ts +++ b/src/types/TodoType.ts @@ -27,10 +27,9 @@ export class TodoType { getDisplayString(): string { let url = this.getFile().data.uri.toString(); - let middle = "#" - // account for untitled files + let middle = "#"; if (url.split(":")[0].toString() == "untitled") { - middle = "; Line Number: " + middle = "; Line Number: "; } let path = url + middle + this.getLineNumber().toString(); return `From ${path}\n----------------------------------\n${this.getContent()}`; From 52bf0d2e3a46abd06e8c351598d974fc7d8b3e13 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 11 Jan 2017 22:50:29 -0700 Subject: [PATCH 4/6] fixed permissions for the build --- src/types/TodoType.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/types/TodoType.ts b/src/types/TodoType.ts index 530ac1b..27b4086 100644 --- a/src/types/TodoType.ts +++ b/src/types/TodoType.ts @@ -26,8 +26,10 @@ export class TodoType { } getDisplayString(): string { - let url = this.getFile().data.uri.toString(); + let url = this.getFile().getFile().uri.toString(); + // to take it to the properline let middle = "#"; + // what if the file is not saved? if (url.split(":")[0].toString() == "untitled") { middle = "; Line Number: "; } @@ -39,3 +41,4 @@ export class TodoType { return this.getFile().toString() + "\n" + this.getContent.toString(); } } +// Todo: lol From 87aac50b0f88e1d914a339619d5d97dd08b9696a Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 11 Jan 2017 22:52:24 -0700 Subject: [PATCH 5/6] took out a typo --- src/types/TodoType.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/types/TodoType.ts b/src/types/TodoType.ts index 27b4086..ed70bbb 100644 --- a/src/types/TodoType.ts +++ b/src/types/TodoType.ts @@ -41,4 +41,3 @@ export class TodoType { return this.getFile().toString() + "\n" + this.getContent.toString(); } } -// Todo: lol From d46edfd70b0e8630d160bd4abd977f8f533e5937 Mon Sep 17 00:00:00 2001 From: Suyog Soti Date: Wed, 11 Jan 2017 23:18:07 -0700 Subject: [PATCH 6/6] cleaned up typescript --- src/types/TodoType.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/TodoType.ts b/src/types/TodoType.ts index ed70bbb..d7323bb 100644 --- a/src/types/TodoType.ts +++ b/src/types/TodoType.ts @@ -33,11 +33,11 @@ export class TodoType { if (url.split(":")[0].toString() == "untitled") { middle = "; Line Number: "; } - let path = url + middle + this.getLineNumber().toString(); + let path = url + middle + this.getLineNumber(); return `From ${path}\n----------------------------------\n${this.getContent()}`; } toString(): string { - return this.getFile().toString() + "\n" + this.getContent.toString(); + return this.getFile() + "\n" + this.getContent; } }