Skip to content

Commit 19b6940

Browse files
committed
fix(provider): improve error message for missing language support
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.
1 parent c6761e8 commit 19b6940

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pluginGroup = com.phodal.autodev
77
pluginName = AutoDev
88
pluginRepositoryUrl = https://github.com/unit-mesh/auto-dev
99
# SemVer format -> https://semver.org
10-
pluginVersion = 1.5.4-SNAPSHOT
10+
pluginVersion = 1.5.4
1111

1212
# Supported IDEs: idea, pycharm
1313
baseIDE=idea

src/main/kotlin/cc/unitmesh/devti/intentions/action/task/TestCodeGenTask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class TestCodeGenTask(val request: TestCodeGenRequest) :
6161
if (testContext == null) {
6262
if (writeTestService == null) {
6363
AutoDevStatusService.notifyApplication(AutoDevStatus.Error)
64-
logger.error("Could not find WriteTestService for: ${request.file}")
64+
logger.error("Could not find WriteTestService for: ${request.file}, language: $lang")
6565
return
6666
}
6767

src/main/kotlin/cc/unitmesh/devti/provider/WriteTestService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ abstract class WriteTestService : LazyExtensionInstance<WriteTestService>() {
111111
}
112112

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

0 commit comments

Comments
 (0)