Eclipse for Roo 项目中的自动完成
我有一个 Roo 项目,我在其中创建了几个实体,当我在 Eclipse 中加载该项目时,它加载得很好,但是如果我创建一个实例 MyEntity实体
然后编写entity.
我没有在自动完成列表中获取任何属性(即 getMyField)。如果我编写 entity.getMyField()
它编译得很好,这是由方面处理的。如何为方面生成的函数启用自动完成功能?
干杯
尼克
I've got a Roo project where I've made a couple of entities, and when I load up the project in Eclipse it loads up fine, but if I i.e. make an instance MyEntity entity
and then write entity.
I don't get any of my properties (i.e. getMyField) in the autocompletion list. If I write entity.getMyField()
it compiles fine, that is taken care of by the aspects. How do I enable autocompletion for functions generated by the aspects?
Cheers
Nik
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您使用哪种“类型”的 Eclipse?您的 eclipse 中是否安装了 AJDT?如果是这样,仍然可以选择禁用 JDT 编织。下面的注释(摘自 Roo 文档)应该可以帮助您打开 JDT 编织(窗口 -> 首选项 > JDT 编织。
顺便问一下,您是否考虑过尝试Spring Source Tool Suite?在那里您可以找到已安装的所有插件(AJDT 支持...)。它非常适合 Roo,因为它在 eclipse 中提供了 Roo 功能。
Which "type" of eclipse are you using? Do you have AJDT intstalled within your eclipse? If so there is still an option to disable weaving of JDT. The note below (taken from the Roo documentation) should help you to turn on JDT weaving (Window -> Preferences > JDT Weaving.
By the way have you considered trying the Spring Source Tool Suite? There you find all the plugins (AJDT support...) already installed. And it fits very well for Roo as it offers Roo functionality from within eclipse.
我遇到了与 niklassaers 相同的问题:Roo AspectJ 方法在编译时未显示在 Eclipse 自动完成中。我使用的是最新版本的 STS,默认安装了 AJDT,并验证了 JDT Weaving 处于活动状态,但问题仍然存在。
另一方面,我发现执行
Maven >更新项目... (Alt-F5)
使 ROO AJ 方法对自动完成可见。该解决方案可能与我构建项目的方式有关(我的工作区中有两个 eclipse Maven 项目,
myproject.data
包含带有 aj 方法的 roo 类,以及myproject.services
充当这些课程的客户端);此外,每次打开工作区时我都必须重复 Alt-F5,但这似乎有效。我想更好地理解这个代码完成问题的原因,也许找到一些方法来永久解决该问题,而不必每次都更新 Maven 项目。是否与AJDT插件和m2eclipse Maven插件之间的交互有关?
I have experienced the same problem as niklassaers: Roo AspectJ methods not showing in eclipse autocompletion while compiling fine. I'm using the latest version of STS, with AJDT installed by default, and verified that JDT Weaving is active, but the problem persists.
On the other hand, I've found out that executing
Maven > Update project... (Alt-F5)
makes the ROO AJ methods visible to auto completion.This solution might be related on how I structured my project (I have two eclipse Maven projects in my workspace,
myproject.data
containing roo classes with aj methods, andmyproject.services
acting as a client for those classes); besides, I have to repeat Alt-F5 every time I open my workspace, but this seems to work.I'd like to understand better the reasons of this code completion problem, and maybe find some way to solve the problem permanently, without having to update maven projects every time. Could it be related to interactions between the AJDT plugin and m2eclipse Maven plugin?