GWT UiBinder 的 Eclipse 自动完成(+ UiBinder 文档)
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您传递的任何属性都会根据一些命名准则转换为对象上的方法调用:
--> 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:
--> 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.-
我没有四处寻找一些第三方教程/见解,因为我发现 Google 提供的教程/见解就足够了:
UiObject
包含一些附加信息I haven't looked around for some third party tutorials/insights, since I found the ones provided by Google sufficient:
UiObject
contain some additional info