You know the ABAP console of ADT that allows to use out->write in the main method of classes that implement interface if_oo_adt_classrun in order to write the content of ABAP data objects to a text console.
You might also know the interface if_demo_output implemented by class cl_demo_output that also offers a method write that does mostly the same.
What you might don’t know is the fact that the implementations of the ABAP console in ADT and of cl_demo_output are two sides of the same coin. When the ABAP console was introduced some years ago, its internal implementation was copied from cl_demo_output and cl_demo_output_stream (the latter produces an output-friendly XML). But since ADT used an early stage of cl_demo_output, it missed its continuous improvements that took place in the meantime. An example is the implicit retrieval of the data object’s name if no name is passed explicitly.

