More tweaks to dynamic releases attributes reconcile and CA

This commit is contained in:
Kris De Volder
2017-07-28 12:01:13 -07:00
parent ca93d93d15
commit 724ae4aed4
9 changed files with 310 additions and 118 deletions

View File

@@ -19,6 +19,7 @@ import java.util.stream.Collectors;
import org.springframework.ide.vscode.commons.languageserver.reconcile.IProblemCollector;
import org.springframework.ide.vscode.commons.util.MimeTypes;
import org.springframework.ide.vscode.commons.util.PartialCollection;
import org.springframework.ide.vscode.commons.util.Renderable;
import org.springframework.ide.vscode.commons.util.Renderables;
import org.springframework.ide.vscode.commons.util.ValueParseException;
@@ -174,7 +175,7 @@ public class PipelineYmlSchema implements YamlSchema {
return "The '"+parseString+"' Resource Type does not exist. Existing types: "+validValues;
},
(DynamicSchemaContext dc) -> {
return models.getResourceTypeNameHints(dc);
return PartialCollection.compute(() -> models.getResourceTypeNameHints(dc));
}
);
@@ -190,8 +191,8 @@ public class PipelineYmlSchema implements YamlSchema {
t_maybe_resource_name.setHintProvider((DynamicSchemaContext dc) -> {
//Putting the Callable into a local variable is strange, but the compiler doesn't like it if
// we return it directly. Too much complexity for Java type-inference?
Callable<Collection<YValueHint>> callable = () -> YTypeFactory.hints(models.getResourceNames(dc));
return callable;
PartialCollection<YValueHint> hints = PartialCollection.compute(() -> YTypeFactory.hints(models.getResourceNames(dc)));
return hints;
});
t_maybe_resource_name.parseWith(ValueParsers.NE_STRING);