parent
80ae80dc54
commit
6c5f06f461
@ -3,6 +3,10 @@
|
||||
# easy-i18n Changelog
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- NullPointerException on key completion
|
||||
|
||||
## [1.6.0]
|
||||
### Added
|
||||
- The search function now supports full-text-search
|
||||
- Automatically reload translation data on file system change
|
||||
|
@ -38,10 +38,6 @@ public class KeyCompletionProvider extends CompletionProvider<CompletionParamete
|
||||
|
||||
String path = result.getPrefixMatcher().getPrefix();
|
||||
|
||||
if(pathPrefix == null) {
|
||||
pathPrefix = "";
|
||||
}
|
||||
|
||||
if(path.startsWith(pathPrefix)) {
|
||||
path = path.substring(pathPrefix.length());
|
||||
|
||||
@ -77,6 +73,8 @@ public class KeyCompletionProvider extends CompletionProvider<CompletionParamete
|
||||
|
||||
} else {
|
||||
Translation translation = store.getData().getTranslation(key);
|
||||
|
||||
if(translation != null) {
|
||||
String content = translation.get(previewLocale);
|
||||
|
||||
result.addElement(LookupElementBuilder.create(pathPrefix + key)
|
||||
@ -87,4 +85,5 @@ public class KeyCompletionProvider extends CompletionProvider<CompletionParamete
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user