Hover info provider for tasks wired-up properly
Note: still need to add the markdown blobs for most properties however. So you still won't see much info in the hovers.
This commit is contained in:
@@ -112,7 +112,17 @@ public class ConcourseLanguageServer extends SimpleLanguageServer {
|
||||
throw new IllegalStateException("Not implemented");
|
||||
|
||||
});
|
||||
documents.onHover(forPipelines.hoverEngine::getHover); //TODO: dispatch based on language id
|
||||
documents.onHover(params -> {
|
||||
TextDocument doc = documents.get(params);
|
||||
if (doc!=null) {
|
||||
if (LanguageIds.CONCOURSE_PIPELINE.equals(doc.getLanguageId())) {
|
||||
return forPipelines.hoverEngine.getHover(params);
|
||||
} else if (LanguageIds.CONCOURSE_TASK.equals(doc.getLanguageId())) {
|
||||
return forTasks.hoverEngine.getHover(params);
|
||||
}
|
||||
}
|
||||
return SimpleTextDocumentService.NO_HOVER;
|
||||
});
|
||||
documents.onDefinition(definitionFinder);
|
||||
}
|
||||
|
||||
|
||||
@@ -246,7 +246,8 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
}
|
||||
}
|
||||
|
||||
YType t_platform = f.yenum("Platform", "windows", "linux", "darwin");
|
||||
YAtomicType t_platform = f.yenum("Platform", "windows", "linux", "darwin");
|
||||
t_platform.parseWith(ValueParsers.NE_STRING); //no errors because in theory platform are just strings.
|
||||
|
||||
YType t_name_and_path = f.ybean("NameAndPath" ,
|
||||
f.yprop("name", t_ne_string).isRequired(true),
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
*Required.* The platform the task should run on. By convention, `windows`,
|
||||
`linux`, or `darwin` are specified. This determines the pool of workers
|
||||
that the task can run against. The base deployment provides Linux workers.
|
||||
Reference in New Issue
Block a user