better naming for troubleshooting page (#99)

This commit is contained in:
Yan Zhang 2018-07-19 19:25:55 +08:00 коммит произвёл GitHub
Родитель 48876f2178
Коммит 353ed5df14
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -1,4 +1,4 @@
# FAQs
# Troubleshooting
## Requirements
Please make sure Maven is either in the `PATH`, or that `maven.executable.path` is pointed to its installed location. Also make sure `JAVA_HOME` is specified either in environment variables or settings.
@ -13,6 +13,7 @@ If you do not want to add it into `PATH`, you can specify maven executable path
```
#### Possible error messages
Error message can be collected either **directly from the integrated terminal**, or **from `Maven for Java` output panel**.
* Maven executable file not found/set.
```
Command failed: mvn --version 'mvn' is not recognized as an internal or external command, operable program or batch file.

Просмотреть файл

@ -127,13 +127,13 @@ async function checkMavenAvailablility(): Promise<void> {
}
}
if (Object.keys(errors).length > 0) {
const OPTION_SHOW_FAQS: string = "Show FAQs";
const OPTION_LEARN_MORE: string = "Learn more";
const OPTION_OPEN_SETTINGS: string = "Open Settings";
const errorMessage: string = `Unable to execute Maven commands for workspace folder [${Object.keys(errors).join(", ")}], please check your settings.`;
const choiceForDetails: string = await vscode.window.showErrorMessage(errorMessage, OPTION_OPEN_SETTINGS, OPTION_SHOW_FAQS);
if (choiceForDetails === OPTION_SHOW_FAQS) {
const choiceForDetails: string = await vscode.window.showErrorMessage(errorMessage, OPTION_OPEN_SETTINGS, OPTION_LEARN_MORE);
if (choiceForDetails === OPTION_LEARN_MORE) {
// open FAQs
const readmeFilePath: string = Utils.getPathToExtensionRoot("FAQs.md");
const readmeFilePath: string = Utils.getPathToExtensionRoot("Troubleshooting.md");
vscode.commands.executeCommand("markdown.showPreview", vscode.Uri.file(readmeFilePath));
} else if (choiceForDetails === OPTION_OPEN_SETTINGS) {
vscode.commands.executeCommand("workbench.action.openSettings");