diff --git a/CHANGELOG.md b/CHANGELOG.md index f886c899913b90ded4e0454de4c3be35b19464b4..cbd60aba6753644561c4c1894c1506aaa295be67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ # Solon Changelog +## [0.0.3-M1] +### Added +- [Feature] support yml key hint +- [Feature] Optimization of yaml support + ## [0.0.2-M1] ### Added - [Feature] support yml key hint diff --git a/gradle.properties b/gradle.properties index fd7e6f461aa47cceac4e02d1984a8a0c67dc7d88..4f36225daf190ce1ca0f6bd4eecfbeb23a736ed3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ pluginName = Solon pluginRepositoryUrl = https://gitee.com/noear/solon-idea-plugin # SemVer format -> https://semver.org -pluginVersion = 0.0.2-M1 +pluginVersion = 0.0.3-M1 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 213 diff --git a/src/main/java/org/noear/solon/idea/plugin/suggestion/service/SuggestionServiceImpl.java b/src/main/java/org/noear/solon/idea/plugin/suggestion/service/SuggestionServiceImpl.java index 68455308abe8a8b963f9fbd1abee13c4b80a80b7..22ed7a7ebd972013d618571b138c9f0246a38b1c 100644 --- a/src/main/java/org/noear/solon/idea/plugin/suggestion/service/SuggestionServiceImpl.java +++ b/src/main/java/org/noear/solon/idea/plugin/suggestion/service/SuggestionServiceImpl.java @@ -212,8 +212,10 @@ public class SuggestionServiceImpl implements SuggestionService { Document document = editor.getDocument(); String text = item.getLookupString(); boolean lastDot=queryWithDotDelimitedPrefixes.length() == queryWithDotDelimitedPrefixes.lastIndexOf(".") + 1; + boolean queryNotEmpty = queryWithDotDelimitedPrefixes.length() > 1; + int queryLength = queryNotEmpty ? (queryWithDotDelimitedPrefixes.length() - 1) : queryWithDotDelimitedPrefixes.length(); String query = lastDot? - queryWithDotDelimitedPrefixes.substring(0, queryWithDotDelimitedPrefixes.length() - 1) : queryWithDotDelimitedPrefixes; + queryWithDotDelimitedPrefixes.substring(0, queryLength) : queryWithDotDelimitedPrefixes; String supplementText = text.substring(lastDot?query.length():query.length()-1); supplementText=supplementText.indexOf(".")==0?supplementText.substring(1):supplementText; String[] count = supplementText.split(DELIMITER);