Skip to content

Commit cecbcad

Browse files
committed
No properties suggestions when there is a profile in the property name
Fixes redhat-developer/vscode-quarkus#1186 Signed-off-by: azerr <[email protected]>
1 parent b85adb5 commit cecbcad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

microprofile.ls/org.eclipse.lsp4mp.ls/src/main/java/org/eclipse/lsp4mp/services/properties/PropertiesFileCompletions.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,12 @@ private static void collectPropertyKeySuggestions(int offset, Node node, Propert
249249
String name = property.getName();
250250
CompletionItem item = new CompletionItem(getKeyLabel(name, defaultValue));
251251
item.setKind(CompletionItemKind.Property);
252-
252+
if (!propertyName.equals(item.getLabel())) {
253+
// Completion label can be different from property name (ex: with profile property %dev.quarkus...
254+
// a filter text must be defined with the property name to enable completion on client side.
255+
item.setFilterText(propertyName);
256+
}
257+
253258
Collection<ValueHint> enums = PropertiesFileUtils.getEnums(property, projectInfo);
254259

255260
StringBuilder insertText = new StringBuilder();

0 commit comments

Comments
 (0)