GWT UiBinder 的 Eclipse 自动完成(+ UiBinder 文档)

发布于 2024-09-06 20:21:41 字数 439 浏览 2 评论 0原文

我在 GWT 项目中使用 UiBinder xml 文件。问题是 Eclipse 没有给我任何关于我可以与小部件一起使用的属性的信息,

例如我知道我可以这样设置宽度或样式:

<g:HorizontalPanel width="100%" addStyleNames="{style.mainPanel}">

但是在单击 ctrl + space 后出现的列表中没有提到它们。所以我不知道我还有什么其他选择。我怎样才能得到它们?

更一般地说,我发现很难找到有关我们在 UiBinder 中可以做什么的完整文档。这导致花费大量时间来寻找如何处理像这样的简单功能有没有人有任何好的链接。

I am using UiBinder xml files in a GWT project. The problem is that Eclipse doesn't give me any info about what attribute I can use with the widgets

For example I know I can set width or style this way :

<g:HorizontalPanel width="100%" addStyleNames="{style.mainPanel}">

But they are not mentioned in the list that appears after clicking ctrl + space. So I don't know what other options I have. How can I get them ?

More generally I find it hard to find complete documentation on what we can do in the UiBinder. Which leads to spending a lot of time to find how to deal with simple features like this one Has anybody got any good links.

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

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

发布评论

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

评论(2

白色秋天 2024-09-13 20:21:41

您传递的任何属性都会根据一些命名准则转换为对象上的方法调用:

  • width="100%" -->这将调用 setWidth("100%")
  • addStyleNames=".."
    --> setAddStyleNames(...) 不存在,因此 GWT 将搜索
    使用该名称进行操作:
    addStyleNames

如果您遵循这些准则,则可以检查 Javadocs 以了解可以执行哪些操作。

如果您使用的是 GWT 2.1.0,则可以查看 Eclipse 的 GWT Designer 插件。我还没有使用过它,但我希望它能起到必要的作用。-

Any attribute you pass, is converted to a method call on the object according to some naming guidelines:

  • width="100%" --> this will call setWidth("100%")
  • addStyleNames=".."
    --> setAddStyleNames(...) does not exist, so GWT will search for an
    operation with that name:
    addStyleNames

If you follow these guidelines, you can check the Javadocs to see which operations can be executed.

If you are using GWT 2.1.0, you can have a look at the GWT Designer plugin for Eclipse. I have not used it yet, but I expect it to do the necessary.-

待天淡蓝洁白时 2024-09-13 20:21:41

我没有四处寻找一些第三方教程/见解,因为我发现 Google 提供的教程/见解就足够了:

I haven't looked around for some third party tutorials/insights, since I found the ones provided by Google sufficient:

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