我可以让 eclipse gwt devmode 始终重新编译我的所有模块吗

发布于 2024-12-07 09:19:07 字数 466 浏览 0 评论 0原文

我有两个模块,模块和包含模块。

如果我启动主模块,它将显示一个带有 iFrame 的界面,其中包含包含的模块以及周围的一些附加控件。我还可以单独启动包含的模块。 我通过使用两个单独的 .gwt.xml 文件和两个单独的入口点解决了这个问题,然后将结果放置在同一个 war 文件夹中。

如果我在 Eclipse 中使用 GWT Compile,我可以将两个入口点添加到列表中,它将编译这两个模块,并且一切都会正常工作。

但是,如果我单击 Eclipse 中的“运行”按钮让我的应用程序在开发模式下运行,那么它只会重新编译我在浏览器中访问的入口点。如果我访问 Main 入口点,则会弹出一个窗口,提示“gwt 模块可能需要重新编译”,并且 devmode 不会自动重新编译我的 Include 入口点。

有什么办法可以让 eclipse 中的 devmode 始终重新编译我的所有模块吗?

I have two modules, the Main module and the Included module.

If I start the Main module it will show an interface with an iFrame which contains the Included module with some additional controls around it. I can also start the Included module separately.
I have solved this by having two separate .gwt.xml files and two separate entrypoints and the result is then placed in the same war folder.

If I use GWT Compile in eclipse I can add both my entrypoints to the list and it will compile both modules and everything will work correctly.

However if I click the "Run" button in eclipse to have my application run in devmode, then it will only recompile the entrypoint that I access in my browser. If I access the Main entrypoint then I will get a popup saying "gwt module may need to be recompiled" and devmode will not automatically recompile my Include entrypoint.

Is there someway that I can get devmode in eclipse to -always- recompile all of my modules?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

谈下烟灰 2024-12-14 09:19:07

据我了解,您使用包含辅助 GWT 模块的主机页的 IFrame。此框架的内容还必须使用 gwt.codesvr=127.0.0.1:9997 参数加载,否则它只会加载 GWT javascript 的最新编译版本,而不使用 devmode 服务器。

您还应该确保 Eclipse 中的调试配置包含这两个模块。您可以通过不直接单击按钮,而是使用菜单打开“调试配置”菜单来验证这一点。假设您之前单击了“调试”按钮,您应该在那里找到现有的 GWT 调试配置。确保这两个模块都列在“GWT”选项卡中。

如果您的模块位于两个不同的项目中,则可能必须使用开发模式服务器的两个实例。 (记住使用不同的端口)

As I understand it, you use an IFrame that contains the host page of a secondary GWT module. This frame's content must also be loaded using the gwt.codesvr=127.0.0.1:9997 parameter, or it would just load the latest compiled version of the GWT javascript without using the devmode server.

You should also make sure the debug configuration in Eclipse contains both modules. You can verify that by not clicking the button directly, but using the menu to open the "Debug Configurations" menu. Assuming you clicked on the "Debug" button before, you should find an existing GWT debug configuration there. Make sure that both modules are listed in the "GWT" tab.

If you have your modules in two different projects, you might have to use two instances of the dev mode server. (remember to use different ports)

嘦怹 2024-12-14 09:19:07

包含模块添加到模块中。
添加此代码来完成此操作。

<inherits name="fully qualified name of your module"/>

您可以通过在 main.gwt.xml 文件中

Add you included module to your main module.
You can do this by adding

<inherits name="fully qualified name of your module"/>

this code in your main.gwt.xml file.

最美的太阳 2024-12-14 09:19:07

我认为这更多的是一个“项目设置”问题,而不是“如何让 Eclipse 编译我的所有模块”问题。我这么说的原因是,我还没有看到有两个入口点是必要/有意义的 GWT 项目。拥有单独入口点的主要原因是为了重用(开发指南,划分代码到多个模块)。

我解决这个问题的方法是让你的 Main 模块,其中包括控件和 iFrame (并让它继承你的 Industed 模块),所以和你一样现在。我的不同之处在于我将包含模块设置为没有入口点。相反,如果您有理由将其与 Main 模块分开运行,我将创建一个“drive”/“launcher”模块,它也继承 Independent 模块。但是,该驱动程序模块不是像 Main 模块那样的控件和 iFrame,而是仅包含一个入口点和一个附加 Independent 模块的位置。

您还可以查看此问题以进行更多同样的讨论:GWT 中的多个入口点。

I would contend that this is more of a "project setup" problem, than "how can I get Eclipse to compile all my modules" problem. The reason I say this is, I have yet to see a GWT project where two entry points were necessary/made sense. The main reason to have separate entry points is for reuse (Dev Guide, Dividing code into multiple modules).

The way I would approach the problem is to have your Main module, which includes the controls and iFrame (and have it inherit your Included module), so the same as you are now. Where I would differ is I would set up the Included module to not have an entry point. Instead, if you have a reason to run it separately from the Main module, I would create a "drive"/"launcher" module that also inherits the Included module. However, instead of controls and an iFrame like the Main module, this driver module would consist merely of an entry point and a place to attach your Included module.

You might also check out this question for more discussion in this same vein: Multiple Entry Points in GWT.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文