GWT 设计无法运行

发布于 2024-12-29 06:51:38 字数 666 浏览 2 评论 0原文

在我对 GWT 设计没有问题之前,但是现在,我收到此错误:

Error loading module(s).
GWT Designer can't load a module either because there is not enough heap space available for Eclipse, or some other module or internal error has occurred. The GWT log at $project_dir/.gwt/.gwt-log has the following error messages:

Line 4: Unexpected exception while processing element 'inherits' Failure while parsing XML Unexpected error while processing XML 

我已经在 eclipse.ini 中添加了这些 vmargs,但它仍然无法工作:

-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:PermSize=64M
-XX:MaxPermSize=512M
-Xms256m
-Xmx512m

我还运行了 VisualVM,并且用完的 PermGen 甚至没有关闭最大。

before I have no problem with GWT design, however right now, I am getting this error:

Error loading module(s).
GWT Designer can't load a module either because there is not enough heap space available for Eclipse, or some other module or internal error has occurred. The GWT log at $project_dir/.gwt/.gwt-log has the following error messages:

Line 4: Unexpected exception while processing element 'inherits' Failure while parsing XML Unexpected error while processing XML 

I already added these vmargs with my eclipse.ini but still it wont work:

-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:PermSize=64M
-XX:MaxPermSize=512M
-Xms256m
-Xmx512m

I have also run VisualVM and the used up PermGen is not even close the the max.

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

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

发布评论

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

评论(2

海螺姑娘 2025-01-05 06:51:38

嗯......对我来说看起来很熟悉的问题。

不想让您失望太多,但是对于复杂的 ui,GWT Designer 没有功能,实际上功能失调,尤其是当您尝试打开不是使用 GWT Designer 创建的小部件时。或者您使用 GWT 设计器创建,但随后使用编辑器进行修改。

GWT Designer 与 spring roo 一样,只适合让您开始使用 UI - 这是我的拙见。然后,当我开始引入复杂性时,我必须使用源代码编辑器来完成此操作,之后当您尝试使用 Designer 编辑 UI 时,它将无法打开。

我在 Visual Studio 中使用 C# 时遇到了同样的问题。 (好吧,我仍在使用 Visual Studio 2005)。

一旦您在 UI 上使用了编辑器,就没有回头路了。您的 UI 设计师将不再识别该设计。

我发现 Qt 通过不让您乱搞生成的源代码来解决这个问题。当您使用设计器修改 UI 时,它会修改 XML 文件,该文件在编译时会生成 C++ 源文件。更改生成的 C++ 源文件不会更改设计,因为 UI 设计存储在 XML 文件中。当您使用编辑器修改 XML 文件时,您必须将其修改为符合 Qt 设计者的期望 - 而我只在极少数情况下才需要这样做。

人们可能会认为 gwt ui.xml 模板文件的功能与 Qt 的 UI XML 文件相同 - 区别在于 Qt 的 UI XML 文件后面没有 C++ 模板 bean,而 GWT ui.xml 文件需要后面有一个 Java 模板 bean。 OTOH,与 GWT 或 Visual Studio 不同,我确实发现生成 Qt Designer 兼容的小部件是一项相当乏味/令人畏惧的任务。

Hmm ... looks familiar problem to me.

Don't wish to disappoint you too much, but GWT Designer is non-functional, actually dysfunctional, for complex ui, especially when you try to open a widget that you did not create with GWT Designer. Or one that you created with GWT designer but then you modified using an editor.

GWT Designer, like spring roo, is good only to start you off on a UI - that's my abject opinion. And then when I start introducing complexity to it, and that I had to do it with the source editor, after which when you try to edit the UI with Designer, it would fail to open.

I faced the same problem with C# in Visual Studio. (OK, I am still using Visual Studio 2005).

Once you use the editor on your UI, there is no turning back. Your UI designer would not recognise the design anymore.

I observe that Qt overcomes the issue by not letting you muck around with the generated source code. When you use the designer to modify the UI, it modifies an XML file, which on compilation generates the C++ source file. Changing the generated C++ source file will not change the design because the UI design is stored in the XML file. When you modify the XML file with an editor, you have to modify it compliant to Qt designer'e expectations - and I have to do it only on rare occasions.

One might think that gwt ui.xml template file would function the same way as Qt's UI XML file - the difference is Qt's UI XML file has no C++ template bean behind it and GWT ui.xml file requires a Java template bean behind it. OTOH, unlike GWT or Visual Studio, I do find generating Qt Designer compliant widgets a rather tedious/daunting task.

百变从容 2025-01-05 06:51:38

我所做的是将 CSS 放在 com.myapp.css 包(或类似的包)中。这解决了我的问题。

What i did was to put the CSS on the com.myapp.css package (or similar). Which solved my problem.

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