diff --git a/src/main/java/org/humanistika/oxygen/tei/completer/GUI/newSuggestionForm.java b/src/main/java/org/humanistika/oxygen/tei/completer/GUI/newSuggestionForm.java index 92a06e0..ac5b61e 100644 --- a/src/main/java/org/humanistika/oxygen/tei/completer/GUI/newSuggestionForm.java +++ b/src/main/java/org/humanistika/oxygen/tei/completer/GUI/newSuggestionForm.java @@ -263,10 +263,11 @@ private void fetchjButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN- for (final AutoComplete autoComplete : teiCompleter.getConfiguration().getAutoCompletes()) { //check if attributeExpr addresses a subset of autoCompleteXPaths.attributeXPath + // only request auto completer suggestions if it matches final TeiCompleter.AutoCompleteXPaths autoCompleteXPaths = teiCompleter.getXPaths(autoComplete); - if (!isSubset(attributeExpr, autoCompleteXPaths.getAttributeXPath())) continue; - - suggestions.addAll(teiCompleter.requestAutoComplete(autoComplete, selection, dependent)); + if (isSubset(attributeExpr, autoCompleteXPaths.getAttributeXPath())) { + suggestions.addAll(teiCompleter.requestAutoComplete(autoComplete, selection, dependent)); + } } //get the model to populate the table @@ -424,10 +425,12 @@ protected Object doInBackground() throws Exception { for (final AutoComplete autoComplete : teiCompleter.getConfiguration().getAutoCompletes()) { //check if attributeExpr addresses a subset of autoCompleteXPaths.attributeXPath + // only request auto complete suggestions if it matches final TeiCompleter.AutoCompleteXPaths autoCompleteXPaths = teiCompleter.getXPaths(autoComplete); - if (!isSubset(attributeExpr, autoCompleteXPaths.getAttributeXPath())) continue; + if (isSubset(attributeExpr, autoCompleteXPaths.getAttributeXPath())) { + suggestions.addAll(teiCompleter.requestAutoComplete(autoComplete, selection, dependent)); - suggestions.addAll(teiCompleter.requestAutoComplete(autoComplete, selection, dependent)); + } } this.suggestions.addAll(suggestions);