如何将GWT DevMode的自定义子类迁移到GWT 2.7.0超级开发模式 [英] How to migrate a a custom sublass of GWT DevMode to GWT 2.7.0 Super dev mode

查看:165
本文介绍了如何将GWT DevMode的自定义子类迁移到GWT 2.7.0超级开发模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很长一段时间,我们使用com.google.gwt.core.ext.ServletContainerLauncher和com.google.gwt.dev.DevMode的自定义子类在Eclipse中运行基于GWT的应用程序。



这是为了让我们运行我们自定义的(最新的)Jetty,随着时间的推移,它给了我们一些其他的控制权,例如在Eclipse中启动服务器的方式稍有不同,以便允许文件围绕Eclipse项目进行传播,而不是放在生产环境中。

这些有效地替换/重新实现/覆盖 JettyLauncher.java DevMode.java

现在我正在尝试升级到GWT 2.7,这不再有效。具体来说,它始于:

 在端口9997上启动代码服务器
加载模块
com。< ;. ..> .ClientDev
在...中找到的公共资源
在...中找到的可转换源
在端口8008上启动HTTP

我得到的是臭名昭着的GWT模块客户端可能需要(重新)编译。我发现Eclipse启动配置现在提供了超级开发模式和经典模式之间的选择。我还没有改变(仍然是经典),但我们的想法是,我们需要转到超级开发模式(主要是因为速度和支持,但IDE中的经典功能和调试将被忽略)。 p>

我试图找到有关更改(或需要在代码中进行更改的文档)的文档,以便达到2.7,但迄今为止失败。任何人都可以提供帮助吗?

谢谢!

解决方案

找到任何文档,但我成功开始。以下是我必须做的事情:


  1. 实际上,我根本不必更改启动器/ dev模式代码。 / li>
  2. 必须修改Eclipse * .launch文件以添加-nosuperDevMode参数。由于它自己的嵌入式容器和我的新版本之间的冲突,我无法获得超级开发模式,因此我不想花时间解决这个问题。

  3. 创建一个新的使用以下参数独立启动com.google.gwt.dev.codeserver.CodeServer的方法:-bindAddress [相同地址为主机] -port 9876 -launcherDir [war-folder-path] [GWT-module-name]

  4. 清除所有cookie。 CodeServer有缓冲区溢出(http错误413),因为我有太多的cookie。


  5. 我直接访问CodeServer URL,将两个书签(Dev Mode On,Dev mode off)添加到浏览器中。只是为了确保我有这些结构,但这不应该是必要的,我想。

  6. 首先启动我的服务器。

  7. 启动代码服务器秒。

  8. 使用小书签转动开发模式。

  9. 访问我的应用程序。


For a long while we were running our GWT-based application in Eclipse using custom subclasses of com.google.gwt.core.ext.ServletContainerLauncher and com.google.gwt.dev.DevMode.

This was to allow us to run our custom (newest) Jetty and, over time, it gave us some other control, i.e. launching the server just a bit differently in Eclipse so as to allow files to be spread around Eclipse projects instead of being where they end up in production.

These were effectively displacing/reimplementing/overriding bits of JettyLauncher.java and DevMode.java

Right now I am trying to upgrade to GWT 2.7 and this no longer works. Specifically it starts with:

Started code server on port 9997
Loading modules
   com.<...>.ClientDev
      Public resources found in...
      Translatable source found in...
Starting HTTP on port 8008

All I get is that the infamous "GWT module "client" may need to be (re)compiled". I see that the Eclipse launch configuration now offers the choice between super dev mode and a "classic" one. I didn't change that yet (still at "classic") but the idea is that we need to move on to Super Dev Mode (predominantly because of speed and support, but classic features and debugging in IDE will be missed).

I tried to find documentation on what changed (or needs to be changed in code such as mine) to get over to 2.7 but failed so far. Can anyone help?

Thanks!

解决方案

I didn't find any documentation but I succeeded to get started. Here are the things that I had to do:

  1. I actually didn't have to change my launcher/dev mode code at all.
  2. Eclipse *.launch file had to be modified to add -nosuperDevMode argument. I could not get the super dev mode to work within it due to the conflict between its own embedded container and my newer version and I did not want to spend time solving this.
  3. Create a new way to independently launch com.google.gwt.dev.codeserver.CodeServer with the following arguments: -bindAddress [same-address-as-for-the-main-one] -port 9876 -launcherDir [war-folder-path] [GWT-module-name]
  4. Clear all the cookies. CodeServer had buffer overruns (http error 413) because I had too many cookies for it.
  5. Access the CodeServer URL directly to add the two bookmarklets (Dev Mode On, Dev mode Off) to the browser.
  6. I precompiled my app once just to make sure I have the structures but this should not be necessary, I think.
  7. Start my server first.
  8. Start the code server second.
  9. Turn dev mode on using the bookmarklet.
  10. Access my app.

这篇关于如何将GWT DevMode的自定义子类迁移到GWT 2.7.0超级开发模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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