Use Eclipse to develop groovy[docs.codehaus.org]

时间:2023-02-02 23:43:59

http://docs.codehaus.org/display/GROOVY/Install+Groovy-Eclipse+Plugin

http://docs.codehaus.org/display/GROOVY/Create+Your+First+Groovy+Project

Groovy-Eclipse is the set of Eclipse plugins that provide Eclipse support for Groovy projects.

Installation

The latest Groovy-Eclipse release is available from the following Eclipse update sites. To install, point your Eclipse update manager to the update site appropriate for your Eclipse version or drag and drop the marketplace icon into your Eclipse installation.

Or, you can choose to install a development build, see below for more update sites.  In general, our development builds are quite stable.

Icon

The install directory must be writable by the current user. Groovy-Eclipse cannot be installed into a shared install. This includes protected directories on windows like  C:\Program Files. For more information Eclipse Bug 395516.

http://groovy.codehaus.org/Eclipse+Plugin

TUTORIAL OVERVIEW 
Task - Install GroovyEclipse Plugin. 
Level - Very basic. 
Prerequisites - Eclipse 3.4.2, 3.5, 3.5.1 or 3.6.0.

ALL GROOVY-ECLIPSE TUTORIALS 
Install GroovyEclipse Plugin 
Create Your First Groovy Project

QUICK FACTS FOR ECLIPSE EXPERTS

GroovyEclipse update site for Eclipse 4.2 (Juno), 
Release update site

http://dist.springsource.org/release/GRECLIPSE/e4.2/

GroovyEclipse update site for Eclipse 3.7 (Indigo), 
Release update site

http://dist.springsource.org/release/GRECLIPSE/e3.7/

GroovyEclipse update site for Eclipse 3.6.n (Helios), 
snapshot build with recent fixes

http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.6/

GroovyEclipse update site for Eclipse 3.5.n (Galileo), 
M1 build

http://dist.springsource.org/milestone/GRECLIPSE/e3.5/

GroovyEclipse update site for Eclipse 3.5.n (Galileo), 
snapshot build with recent fixes

http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.5/

GroovyEclipse update site for Eclipse 3.4.2 (Europa), 
snapshot build with recent fixes

http://ci.repository.codehaus.org/greclipse/snapshot/e34/

GroovyEclipse update site for Eclipse 3.4.2 (Europa), 
M1 build

available soon

GETTING HELP – If you have problems, send a message to http://xircles.codehaus.org/lists/eclipse-plugin-user@groovy.codehaus.org.

 

Do

See

1

In Eclipse 3.5.x, click Help > Install New Software.

You use Eclipse's standard installation process to download and install GroovyEclipse. The Eclipse user interface for software installation and update varies between 3.4 and 3.5.

Eclipse 3.4.2 users: click Help > Software Updates and follow the dialogs to work with or add the GroovyEclipse update site - see step 3 for the URL.

Use Eclipse to develop groovy[docs.codehaus.org]

2

To add the GroovyEclipse plugin download site to your Available Software Sites, click Add on the Available Software page.

If you have previously added the site, click the blue down arrow and select if from the drop-down list of your available sites.

Use Eclipse to develop groovy[docs.codehaus.org]

3

On the Add Site page, type a name in the Name box to assign a name of your preference to the site, or leave it blank to use a default site name constructed from repository metadata.

In the Location box type the download URL the URL that corresponds to your version of Eclipse, and click Next.

If you use 3.4.2 - "http://ci.repository.codehaus.org/greclipse/snapshot/e34" or

If you use 3.5.x - "http://dist.springsource.org/milestone/GRECLIPSE/e3.5/"

Use Eclipse to develop groovy[docs.codehaus.org]

4

On the Available Software page, checkmark Groovy-Eclipse Plugin, and if you wish to work with the plugin sources, Groovy Eclipse SDK.

Click Next.

Don't checkmark Groovy Compilers - they are included in the GroovyEclipse Plugin.

Use Eclipse to develop groovy[docs.codehaus.org]

5

You can review the components to be installed on the Install Details page.

As noted above, the GroovyEclipse Plugin includes two versions of the Groovy compilers: v1.7-beta2 (enabled) and v1.6.5.

The JDT Core patch is an update to the Eclipse Java Development Tool (JDT) that enables Groovy/JDT integration.

Use Eclipse to develop groovy[docs.codehaus.org]

6

Accept the license agreement and click Finish.

Use Eclipse to develop groovy[docs.codehaus.org]

7

Eclipse prompts you to restart.

Use Eclipse to develop groovy[docs.codehaus.org]

8

After Eclipse restarts, you can see that Eclipse's File > New menu now includes wizards for creating Groovy projects, classes, and test cases.

You have successfully installed GroovyEclipse.

For step-by-step instructions on how to create your first Groovy program using GroovyEclipse, see Create Your First Groovy Project.

Use Eclipse to develop groovy[docs.codehaus.org]

TUTORIAL OVERVIEW 
   Task - Create a Groovy project in Eclipse. 
   Level - Basic. The task is simple if you have created a Java project in Eclipse. 
   Prerequisites - GroovyEclipse v2.0, Eclipse 3.4.2, 3.5, or 3.5.1.

ALL GROOVY-ECLIPSE TUTORIALS 
   Install Groovy-Eclipse Plugin 
   Create Your First Groovy Project

QUICK FACTS FOR EXPERIENCED ECLIPSE USERS 
Create a Groovy project in Eclipse the same way you do a Java project, but use the Groovy wizards – File > New > Groovy Project and File > New > Groovy Class – instead of the Java equivalents.

NOTE: In this tutorial, the Groovy-Eclipse plugin is running on Eclipse 3.5.1. The user interface and task flow may vary somewhat in Eclipse 3.4.2.

GETTING HELP – If you have problems, send a message to http://xircles.codehaus.org/lists/eclipse-plugin-user@groovy.codehaus.org.

 

Do

See

1

In Eclipse, click File > New > Groovy Project.

If Groovy Project does not appear in the drop-down list, then select Other and search for Groovy Project in the dialog box.

Use Eclipse to develop groovy[docs.codehaus.org]

2

In the New Groovy Project wizard, type a name in the Project Name box, and click Next.

GroovyEclipse creates the project and a folder structure for it. A folder with the same name as the project appears in the Package Explorer. The project directory contains asrc and a bin folder, each empty.

Use Eclipse to develop groovy[docs.codehaus.org]

3

The tabs and options in the Build Settings window are identical to those in the the Java Development Tool (JDT).

Click Finish to proceed without customizing the build settings.

For information about build options, see Eclipse help for the New Java Project Wizard; it applies to Groovy projects as well.

Use Eclipse to develop groovy[docs.codehaus.org]

4

Select the project in the Package Explorer, and click File > New > Groovy Class.

Use Eclipse to develop groovy[docs.codehaus.org]

5

In the Groovy Class wizard, type a name for the class in the Name box, a name for the package in the Packagefield, and click Finish to create the class and package.

If you type the name of an existing package in thePackage field, the class is created there.

Just like in the JDT, you can create a package as a separate step with File > New > Package, or when you use the create the first class

Use Eclipse to develop groovy[docs.codehaus.org]

6

GroovyEclipse creates the new class. The new class, Greetings.groovy in this example, is listed in the Package Explorer, and opened in the editor.

Note that, as generated by GroovyEclipseGreetings.groovy already contains the package statement and class declaration.

Use Eclipse to develop groovy[docs.codehaus.org]

7

Paste this code into the file:

static void main(def args) { 
   def mygreeting = "Hello World" 
   println mygreeting 
}

Use Eclipse to develop groovy[docs.codehaus.org]

8

Right click anywhere in the editor and then Run > Run As > Groovy Scriptor Java Application.

Running as an Application will launch the compiled *.class files, whereas running as aScript will launch the uncompiled *.groovy files. In general, the results will be the same, but there are some subtle differences between the two.

Use Eclipse to develop groovy[docs.codehaus.org]

9

The greeting is issued in the Consoletab.

Use Eclipse to develop groovy[docs.codehaus.org]

Use Eclipse to develop groovy[docs.codehaus.org]的更多相关文章

  1. 在eclipse中安装groovy插件

    在eclipse中安装groovy插件详细步骤: step 1:检查自己的eclipse版本:在help->About Eclipse中查看: step 2:进入 https://github. ...

  2. SoapUI Pro Project Solution Collection –Easy develop Groovy Script to improve SoapUI ability

    As you know the groovy script and java script language is the soapui supported .but unfortunately So ...

  3. eclipse开发Groovy代码,与java集成,maven打包编译

    今天尝试了一下在eclipse里面写Groovy代码,并且做到和Java代码相互调用,折腾了一下把过程记录下来. 首先需要给eclipse安装一下Groovy的插件,插件地址:https://gith ...

  4. Eclipse Groovy插件使用时出现的错误 org.eclipse.core.runtime.InvalidRegistryObjectException: Invalid registry object

    在eclipse marketplace中下载了groovy插件,发现使用的groovy版本跟项目中使用的groovy版本不一致. 于是在Preferences -> Groovy -> ...

  5. 〖Groovy〗语言使用贴士(Tips)(转)

    [Groovy]是一门运行在[JVM]之上的动态语言.由[James Strachan]和[Bob McWhirter]于2003年启动开发,之后于2004年3月成为[JSR 241](Java Sp ...

  6. Debug with Eclipse

    In this post we are going to see how to develop applications using Eclipse and Portofino 4. The trad ...

  7. 【转载】Gradle学习 第九章:Groovy快速入门

    转载地址:http://ask.android-studio.org/?/article/17 To build a Groovy project, you use the Groovy plugin ...

  8. Git下载Spring项目源码并编译为Eclipse

    1)当前系统中安装了gradle,如果为安装,可以从:http://www.gradle.org/downloads,,下载完后进行解压到任意盘符,然后增加环境变量GRADLE_HOME,并在环境变量 ...

  9. Maven + Eclipse + Tomcat - 开启项目调试之旅(转)

    本文的读者需要拥有一些Maven基础知识和实践,如果没有,请直接绕过或者先看一些关于Maven教程,比如Juven翻译的<Maven权威指南>,google一下便知. 开门见山,首先抛出一 ...

随机推荐

  1. url编码base编码解码十六进制

    0x25346425353425343525333525343325366125343525373725346425353125366625373825346425343425363725346225 ...

  2. cocos布局分析

    HBox和VBox布局 HBox只是一个水平布局包装类. HBox里面所有的孩子节点都会水平排列成一行 VBox仅仅是对垂直布局的一个简便的类封装. VBox把它的子节点布局在一竖列中. Layout ...

  3. WPF之旅(三)- 布局之StackPanel

    说到WPF的界面布局,相信很多朋友都写过Html代码.在WPF中,大多数程序都使用类似Web的(flow)流布局.在使用流布局模型时,各种控件可以按特定的要求来排列,在窗口内容发生变化时,比如窗口大小 ...

  4. C&num;整理6——数组的应用

    数组的应用:(一).冒泡排序.1.冒泡排序是用双层循环解决.外层循环的是趟数,里层循环的是次数.2.趟数=n-1:次数=n-趟数.3.里层循环使用if比较相临的两个数的大小,进行数值交换. 作业:1. ...

  5. octopress command memo

    1 rake new_post rake new_post[title]           # Begin a new post in source/_posts 2 rake preview ht ...

  6. C语言代码训练(一)

    今天我们先来讲解一道C语言的经典例题,也是从零开始系列中的一道课后练习题. 请用控制台程序绘制如下图案. 循环经典例题 分析情况 这个题目是要求打印30行"*",每行打印的个数不同 ...

  7. &lbrack;C&rsqb;最大公约数和最小公倍数

    /*求最大公约数和最小公倍数 编写程序,在主函数中输入两个正整数 a,b,调用两个函数 fun1() 和 fun2(),分别求 a 和 b 的最大公约数和最小公倍数,在主函数中输出结果. */ #in ...

  8. Eloquent JavaScript &num;02&num; program&lowbar;structure

    第一章中作者介绍了各种值,但是这些独立的值是没有意义的,只有当值放在更大的框架的时候才会彰显它们的价值.所以第二章开始介绍程序结构. 1.var VS. let 以及 const 作者推荐用 let ...

  9. How to give a math lecture

    摘自 http://www.timhsu.net/courses/generic/proof.pdf   或 http://www.timhsu.net/courses/generic/how-to- ...

  10. PAT 1063 Set Similarity&lbrack;比较&rsqb;

    1063 Set Similarity (25 分) Given two sets of integers, the similarity of the sets is defined to be N ...