Automatically introduce sample code in gwt
I have implemented some components using Gwt, and I want to display these components and their Java code on the front-end page, providing an example of component usage. What I want to showcase is Java code. Is there a good way to automatically import Java code into the corresponding area on the page. Just like https://shoelace.style Here is an example of using a component. The code display area can show the code used by the component. Differently, what I want to showcase is Java code. I want to dynamically change the code displayed on the page when the Java code of the component example changes, that is, the code is not unchanged, but changes as the Java code changes. I don’t want to manually wrap the code into strings and then import them into the page using Java code. Is there any other way to automatically help me complete this task.