Eclipse API来美化Groovy脚本代码 [英] Eclipse API to beautify Groovy Script code

查看:101
本文介绍了Eclipse API来美化Groovy脚本代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试了Eclipse代码格式化程序 Eclipse代码for matter 来格式化我的Web项目需求的Java代码。现在我正在为Groovy寻找类似的东西。任何人都可以告诉我Groovy怎么样?

解决方案

没有语法高亮显得如此卑鄙......!



Aaron D推荐使用Eclipse Marketplace并不适用于我:版本过时了,安装尝试失败。这对我来说很有用(几个月后Neon,然后Oxygen)


  • go here https://github.com/groovy/groovy-eclipse/wiki

  • 在快照生成(低于发布,在撰写本文时只能发布到Eclipse Luna),在Eclipse中识别和复制链接以供Eclipse使用

  • go go帮助 - >安装新软件

  • 使用 - >粘贴: http://dist.springsource.org/snapshot/GRECLIPSE/e4.6/ (来自以上站点:Eclipse Neon的正确版本)(2018-01-03 http://dist.springsource.org/snapshot/GRECLIPSE/e4.7/ :氧气) li>
  • 点击add

  • 勾选项目Groovy-Eclipse - > Next - > Next - > Accept,Finish installed时间:右下角显示的进度)

  • 重新启动Eclipse

  • 窗口 - >首选项:现在有一个Groovy项目

  • Groovy - >编译器 - > Groovy脚本文件夹:已选中** / *。gradle
  • 应用:必须完整构建.. 。

  • 再次重新启动Eclipse

  • *。groovy和* .gradle:语法高亮显示!自动格式化!


I tried the Eclipse code formatter Eclipse code for-matter to format Java code for my web project requirement. Now I am looking for something similar for Groovy. Can any one tell me how do the same for Groovy as well?

解决方案

No syntax highlighting is so glum...!

Aaron D's recommendation to use the Eclipse Marketplace didn't work for me: versions out of date it seems, installation attempts failed. This is what worked for me (Neon, then Oxygen a few months later)

  • go here https://github.com/groovy/groovy-eclipse/wiki
  • under "Snapshot builds" (lower down than "Releases", which only go up to Eclipse Luna at time of writing), identify and copy the link for your Eclipse version
  • in Eclipse go Help --> Install new software
  • Work with --> paste: http://dist.springsource.org/snapshot/GRECLIPSE/e4.6/ (from above site: correct version for Eclipse Neon) (2018-01-03 http://dist.springsource.org/snapshot/GRECLIPSE/e4.7/ : Oxygen)
  • click add
  • check the item "Groovy-Eclipse" --> Next --> Next --> Accept, Finish installed (took long time: progress indicated at bottom right)
  • restart of Eclipse
  • Window --> Prefs: there is now a "Groovy" item
  • Groovy --> Compiler --> Groovy Script Folders: checked "**/*.gradle"
  • Apply : "must do full build"...
  • restart Eclipse again
  • *.groovy and *.gradle : syntax highlighting! auto-formatting!

这篇关于Eclipse API来美化Groovy脚本代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆