diff --git a/client/src/init/StartUp.ts b/client/src/init/StartUp.ts index ca65c9b3..ccb9b5a8 100644 --- a/client/src/init/StartUp.ts +++ b/client/src/init/StartUp.ts @@ -17,8 +17,6 @@ import { Val } from '../validation/Val'; import { ValDownloadReminder } from '../validation/ValDownloadReminder'; import { ExtensionInfo } from '../ExtensionInfo'; -enum TipResponse { Ok, Later, Next } - const LATER = 'LATER'; const NEVER = 'NEVER'; const ACCEPTED = 'ACCEPTED'; @@ -34,74 +32,16 @@ export class StartUp { atStartUp(): void { this.showOverviewPage(); this.showWhatsNew(); - this.showTips(); this.suggestFolderIsOpen(); this.suggestAutoSave(); new ValDownloadReminder(this.context, this.val).suggestValDownloadConfigurationIfAbsent(); } - NEXT_TIP_TO_SHOW = 'nextTipToShow'; WHATS_NEW_SHOWN_FOR_VERSION = 'whatsNewShownForVersion'; ACCEPTED_TO_WRITE_A_REVIEW = 'acceptedToWriteAReview'; NEVER_AUTO_SAVE = 'neverAutoSave'; - async showTips(): Promise { - var tipsPath = this.context.asAbsolutePath('tips.txt'); - var tips: string[] = (await afs.readFile(tipsPath, 'utf-8')).split("\n"); - - var nextTipToShow = this.context.globalState.get(this.NEXT_TIP_TO_SHOW, 0); - - let shouldContinue = true; - for (let index = nextTipToShow; index < tips.length && shouldContinue; index++) { - const tip = tips[index]; - - // skip tips that were removed subsequently as obsolete - if (tip.trim() === "") { - nextTipToShow++; - continue; - } - - var response = await this.showTip(tip); - switch (response) { - case TipResponse.Ok: - shouldContinue = false; - nextTipToShow++; - break; - case TipResponse.Later: - shouldContinue = false; - break; - case TipResponse.Next: - nextTipToShow++; - break; - } - } - - if (nextTipToShow === tips.length) { - this.askForReview(); - } - - this.context.globalState.update(this.NEXT_TIP_TO_SHOW, nextTipToShow); - - return true; - } - - async showTip(tip: string): Promise { - let optionOk: MessageItem = { title: "OK, got it." }; - let optionLater: MessageItem = { title: "Remind me later." }; - let optionNext: MessageItem = { title: "Show next tip..." }; - let options: MessageItem[] = [optionOk, optionLater, optionNext]; - - let choice = await window.showInformationMessage(tip, ...options); - - switch (choice) { - case optionOk: return TipResponse.Ok; - case optionLater: return TipResponse.Later; - case optionNext: return TipResponse.Next; - default: return TipResponse.Later; - } - } - suggestFolderIsOpen(): void { // The PDDL extension works best if you open VS Code in a specific folder. Use File > Open Folder ... } @@ -174,7 +114,7 @@ export class StartUp { } async askForReview(): Promise { - // what was the user response last time? + // what was the user response last time? var accepted = this.context.globalState.get(this.ACCEPTED_TO_WRITE_A_REVIEW, LATER); if (accepted === LATER) { @@ -209,4 +149,4 @@ export class StartUp { this.overviewPage.showWelcomePage(false); } } -} \ No newline at end of file +} diff --git a/client/tips.txt b/client/tips.txt deleted file mode 100644 index 636c99d8..00000000 --- a/client/tips.txt +++ /dev/null @@ -1,12 +0,0 @@ - - - - -Did you know that `Ctrl + /` comments out the current line? Press it again to un-comment it. -Did you know you can press `F2` to rename a predicate/function/type globally across domain and related problem files? Open all applicable files in the editor, select the symbol you want to rename, press F2... -Did you know you can right click on file/folder in the Explorer side bar and select `Open in Command Prompt`? The terminal window will open and the current directory will be what you clicked on! You can then directly call any command line tools (planner, parser, validator, ...) in that folder. -Did you know you can export the plan visualization as a self-contained, full screen HTML page? It shows more detail. Press `Ctrl + Shift + P` and type `PDDL: Generate plan report`. HTML page will open in your default browser (Chrome). -Did you know that you can press `F12` to jump to a predicate, function or type declaration? -Did you know that you can get more screen space for your code by pressing `Ctrl + B` and `Ctrl + J` to show/hide the left side-bar and bottom output panel respectively? -Did you know you can make the font bigger/smaller by pressing `Ctrl +` or `Ctrl -`? -Did you know you can indent/un-indent text in the editor by pressing `Ctrl + [` or `Ctrl + ]`? \ No newline at end of file