调试/查看 GWT 生成的 java 代码的源代码 [英] Debug/view source of GWT generated java code

查看:24
本文介绍了调试/查看 GWT 生成的 java 代码的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有哪些选项可以查看从我的自定义 GWT 生成器 (com.google.gwt.core.ext.Generator) 生成的代码.

What are my options for being able to view the generated code from my custom GWT generator (com.google.gwt.core.ext.Generator).

我一直在完成创建自己的源代码编写器,将 system.out 等中的源代码打印出来,我已经设法做到了,但这一切似乎都很困难,而且不太容易使用.

I have been compleplating creating my own source writer that prints out the source in system.out etc, which I have managed to do but it all seems very hard and not very easy to use.

有时我只是故意破坏生成的代码,以便将损坏的文件打印在临时文件夹中,效果很好.

Sometimes I just break the generated code on purpose so that the broken file is printed out in the temp folder, works quite well.

一定有更好的方法......我确定我遗漏了一些东西.

There must be a better way...I'm sure I'm missing something.

推荐答案

要在运行 GWT-Compiler 时将生成的 Java 源代码(即不是生成的 JavaScript)写入目录,只需添加gwtc 编译器选项-gen",带有目标目录.

To write the generated Java source (i.e. not the generated JavaScript) into a directory when you run the GWT-Compiler, simply add the gwtc compiler option "-gen", with a target directory.

这篇关于调试/查看 GWT 生成的 java 代码的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆