[External] : Re: Classfile API proposal to integrate basic print functionality directly to ClassModel and MethodModel
Michael van Acken
michael.van.acken at gmail.com
Wed Jul 27 14:00:53 UTC 2022
Am Mi., 27. Juli 2022 um 12:04 Uhr schrieb Adam Sotona <
adam.sotona at oracle.com>:
> Unfortunately, “Prettyprinting” can be reduced to indentation and new
> lines only for XML and JSON, however YAML offers much more dynamic
> formatting.
>
I have to admit that I never used YAML syntax in any form. Looking at the
Wikipedia page, it seems like YAML's optional "inline-style" corresponds
to the "single-line formatting" style of the prettyprinter approach, and its
indented multi-line blocks to multi-line formatting. In this case, the
width
information passed up the tree would represent the "inline-style" width.
I would not rule out that it can be made to work. I agree with you that it
would entail more than just moving strings around, because printing
of lists and maps would have two distinct output modes. But it may
be possible to move the decision which mode to use out of the data
model.
-- mva
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/classfile-api-dev/attachments/20220727/55ff8cba/attachment.htm>
More information about the classfile-api-dev
mailing list