PT #135782951: (Part 1) Completions for deprecated properties

This commit is contained in:
BoykoAlex
2019-01-09 19:13:59 -05:00
parent 82eb40b633
commit 6a9e40dbbb
9 changed files with 122 additions and 176 deletions

View File

@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2016-2018 Pivotal, Inc.
* Copyright (c) 2016, 2019 Pivotal, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -668,6 +668,18 @@ public class Editor {
return it;
}
public CompletionItem assertCompletionDetailsWithDeprecation(String expectLabel, String expectDetail, String expectDocSnippet, Boolean deprecated) throws Exception {
CompletionItem it = harness.resolveCompletionItem(assertCompletionWithLabel(expectLabel));
if (expectDetail!=null) {
assertEquals(expectDetail, it.getDetail());
}
if (expectDocSnippet!=null) {
assertContains(expectDocSnippet, getDocString(it));
}
assertEquals(deprecated, it.getDeprecated());
return it;
}
protected CompletionItem assertCompletionWithLabel(Predicate<String> expectLabel) throws Exception {
List<CompletionItem> completions = getCompletions();
Optional<CompletionItem> completion = completions.stream()