Make .properties reconciler aware of document marker

See: https://github.com/spring-projects/sts4/issues/533

Signed-off-by: Kris De Volder <kdevolder@pivotal.io>
This commit is contained in:
Kris De Volder
2020-09-17 11:25:09 -07:00
parent cfeda9c3e7
commit ed102991d7
6 changed files with 116 additions and 24 deletions

View File

@@ -11,6 +11,7 @@
package org.springframework.ide.vscode.java.properties.parser;
import java.util.List;
import java.util.function.Predicate;
import java.util.stream.Collectors;
/**
@@ -34,7 +35,11 @@ public final class PropertiesAst {
public List<Node> getAllNodes() {
return nodes;
}
public List<Node> getNodes(Predicate<Node> test) {
return nodes.stream().filter(test).collect(Collectors.toList());
}
/**
* Retrieves AST nodes of specific type
* @param clazz Type of AST nodes