Intellij IDEA-Grails GDSL 不工作
我尝试在 IDEA 中为我的 grails 项目使用 GDSL 脚本。
我尝试了指南中所示的操作:GDSL 指南 。我遵循的步骤是:
- 在我的项目主目录中创建了一个 myDef.gdsl 文件(即在文件夹
包含 grails-app、web-app 等) 在该文件中我添加了以下代码:
def ctx2 = context(ctype: "com.myPackage.MyClass") 贡献者(ctx2){ 方法(名称:“withLock”,类型:“void”,参数:[闭包:{}]) }
单击“激活”。
但当我这样做时,它仍然没有显示任何自动完成或识别:
Myclass m = new MyClass()
m.withLock() //This is not recognised
我做错了什么??? :(
详细信息:
- 创意系列:终极
- 创意版本:107.535
I tried to use GDSL Scripts for my grails project in IDEA.
I tried things as shown in the Guide: GDSL Guide. The Steps I followed were:
- Created a myDef.gdsl file in my project home(i.e. in the folder
that containg grails-app, web-app etc) In that file i added this code:
def ctx2 = context(ctype: "com.myPackage.MyClass") contributor(ctx2) { method(name: 'withLock', type: 'void', params: [closure: { }]) }
Clicked on Activate.
But it still does not show any autocomplete or recognise when I do:
Myclass m = new MyClass()
m.withLock() //This is not recognised
What am I doing wrong??? :(
Details:
- Idea Series: Ultimate
- Idea Version: 107.535
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GDSL 文件应位于某个源根目录下。 Grails 模块内容根不是源根。例如,请考虑将其放入 src/main/groovy 中。
The GDSL file should be located under some source root. Grails module content roots aren't source roots. So please consider putting it into src/main/groovy, for example.