Skip to content

Commit

Permalink
fix(provider): improve error message for missing language support
Browse files Browse the repository at this point in the history
Improve the error message when the WriteTestService is not found for a specific language. Now it includes the language name and a suggestion to check if the plugin is installed.

Also, update the plugin version to 1.5.4 in gradle.properties.

In TestCodeGenTask.kt, update the error message to include the language name when the WriteTestService is not found for a specific file.
  • Loading branch information
phodal committed Jan 19, 2024
1 parent c6761e8 commit 19b6940
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Expand Up @@ -7,7 +7,7 @@ pluginGroup = com.phodal.autodev
pluginName = AutoDev
pluginRepositoryUrl = https://github.com/unit-mesh/auto-dev
# SemVer format -> https://semver.org
pluginVersion = 1.5.4-SNAPSHOT
pluginVersion = 1.5.4

# Supported IDEs: idea, pycharm
baseIDE=idea
Expand Down
Expand Up @@ -61,7 +61,7 @@ class TestCodeGenTask(val request: TestCodeGenRequest) :
if (testContext == null) {
if (writeTestService == null) {
AutoDevStatusService.notifyApplication(AutoDevStatus.Error)
logger.error("Could not find WriteTestService for: ${request.file}")
logger.error("Could not find WriteTestService for: ${request.file}, language: $lang")
return
}

Expand Down
Expand Up @@ -111,7 +111,7 @@ abstract class WriteTestService : LazyExtensionInstance<WriteTestService>() {
}

if (writeTestService == null) {
log.warn("Could not find WriteTestService for: ${psiElement.language}")
log.warn("Could not find language support for: ${psiElement.language}, make you have the plugin installed.")
return null
}

Expand Down

0 comments on commit 19b6940

Please sign in to comment.