Remove unnessary param from getContextNode method
This commit is contained in:
@@ -192,7 +192,7 @@ public abstract class ApplicationYamlAssistContext extends AbstractYamlAssistCon
|
||||
List<TypedProperty> properties = getProperties(query, enumCaseMode, beanMode);
|
||||
if (CollectionUtil.hasElements(properties)) {
|
||||
ArrayList<ICompletionProposal> proposals = new ArrayList<ICompletionProposal>(properties.size());
|
||||
SNode contextNode = getContextNode(doc);
|
||||
SNode contextNode = getContextNode();
|
||||
Set<String> definedProps = getDefinedProperties(contextNode);
|
||||
for (TypedProperty p : properties) {
|
||||
String name = p.getName();
|
||||
@@ -443,7 +443,7 @@ public abstract class ApplicationYamlAssistContext extends AbstractYamlAssistCon
|
||||
YamlPath propertyPath = YamlPath.fromProperty(match.data.getId());
|
||||
YamlPath relativePath = propertyPath.dropFirst(contextPath.size());
|
||||
YamlPathSegment nextSegment = relativePath.getSegment(0);
|
||||
SNode contextNode = getContextNode(file);
|
||||
SNode contextNode = getContextNode();
|
||||
//To determine if this completion is 'in place' or needs to be inserted
|
||||
// elsewhere in the tree, we check whether a node already exists in our
|
||||
// context. If it doesn't we can create it as any child of the context
|
||||
|
||||
@@ -3298,6 +3298,22 @@ public class ApplicationYamlEditorTest extends AbstractPropsEditorTest {
|
||||
" classpath:stuff/wordlist.txt<*>\n"
|
||||
);
|
||||
}
|
||||
|
||||
@Test public void testCompletionsInContextWithDuplicateKey() throws Exception {
|
||||
//See: https://www.pivotaltracker.com/story/show/135708013
|
||||
defaultTestData();
|
||||
|
||||
assertCompletions(
|
||||
"spring:\n" +
|
||||
" application:\n" +
|
||||
" name: my-app\n" +
|
||||
"spring:\n" +
|
||||
" activemq:\n" +
|
||||
" broker-u<*>"
|
||||
, // ==>
|
||||
"fill it in later"
|
||||
);
|
||||
}
|
||||
|
||||
@Test public void testClassReferenceCompletion() throws Exception {
|
||||
CachingValueProvider.TIMEOUT = Duration.ofSeconds(20);
|
||||
|
||||
Reference in New Issue
Block a user