首页 > 其他分享 >Use Eclipse to develop groovy[docs.codehaus.org]

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

时间:2023-08-03 22:03:25浏览次数:38  
标签:groovy Groovy Use develop Eclipse update site GroovyEclipse org

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.

Eclipse level

Release update site

4.4 (Luna)

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

4.3 (Kepler)

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

4.2 and 3.8 (Juno)

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

3.7 (Indigo)

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

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/[email protected].

 

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.

 


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.

 


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/"

 


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.

 


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.

 


6

Accept the license agreement and click Finish.


7

Eclipse prompts you to restart.


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.


 

 



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/[email protected].

 

 

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.

 

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.

 

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.

 

4

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

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

 

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.

 

7

Paste this code into the file: 


static void main(def args) { 

   def mygreeting = "Hello World" 

   println mygreeting 

}

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.

 

9

The greeting is issued in the Consoletab.

 

 

 



标签:groovy,Groovy,Use,develop,Eclipse,update,site,GroovyEclipse,org
From: https://blog.51cto.com/u_15147537/6953620

相关文章

  • use iproc to config tdr during bscan
    1.casedescriptionwhenrunningbscan,aserialsofpinsneedtobecontrolledto1bytdr;astaticdftsignalwithdefaultvalue1wasregisteredby register_static_dft_signal_names,addedascontrolpointofthosepins;however,valuesarenot......
  • 生成随机User-Agent的第三方库
     安装pipinstallr-useragent使用fromrandom_useragentimportUserAgent​u=UserAgent()​#generateandroiduser-agentprint(u.android()) #randomprint(u.android(app="app"))print(u.android(app="webview"))print(u.android(app="uc&......
  • Vhost-user协议 — QEMU 8.0.0 文档 翻译版
    Vhost-user协议—QEMU8.0.0文档翻译版(先机翻,然后自己人工翻译一整天)PDF版免费送! 联系qq:2426149954,备注:“QEMU+PDF版 ”;Word版RM5!联系qq:2426149954,备注:“QEMU+Woed版 ”。  欢迎联系~       ......
  • 如何在 React 18 中使用 useSyncExternalStore
    原文useSyncExternalStore是React18中提供的自定义挂钩,可让您订阅外部存储并在外部存储更新时更新您的React组件。它对于订阅不是建立在React状态管理之上的外部存储特别有用。useSyncExternalStoreAPI您应该在组件的顶层调用useSyncExternalStore方法import{useSyncExte......
  • Linux:user is not in the sudoers file. This incident will be reported 解决方法
    学习自:userisnotinthesudoersfile.Thisincidentwillbereported解决方法_一路奔跑94的博客-CSDN博客1、原因没有在权限文件中说明该用户具有sudo权限2、解决步骤1)以root身份去/etc/sudoers文件中,编辑vi/etc/sudoers2)在rootALL=(ALL)ALL之下添加一行xxxALL......
  • clickhouse的安装流程
    使用yum命令安装yuminstallclickhouse-serverclickhouse-client启动/etc/init.d/clickhouse-serverstart日志文件将输出在/var/log/clickhouse-server/文件夹sudoserviceclickhouse-serverstatus连接客户端clickhouse-clientshowdatabase;默认情况下,使用de......
  • 报错:This generated password is for development use only. Your security configura
    项目报错:Thisgeneratedpasswordisfordevelopmentuseonly.Yoursecurityconfigurationmustbeupdatedbeforerunningyourapplicationinproduction.导致postman测试接口时报错:401UnauthorizedSimilarto403Forbidden,butspecificallyforusewhenauthenticat......
  • 火山引擎ByteHouse:云原生数据库如何提升MySQL兼容性?
    更多技术交流、求职机会,欢迎关注字节跳动数据平台微信公众号,回复【1】进入官方交流群当前各类软件层出不穷,单独某一款软件往往难以满足企业应用需求,一般都需要与各类软件组合使用,这时软件生态兼容性就显得格外重要。作为关系数据库管理系统的代表之一,MySQL支持大多数操作系统、编程......
  • 火山引擎ByteHouse:云原生数据库如何提升MySQL兼容性?
    更多技术交流、求职机会,欢迎关注字节跳动数据平台微信公众号,回复【1】进入官方交流群当前各类软件层出不穷,单独某一款软件往往难以满足企业应用需求,一般都需要与各类软件组合使用,这时软件生态兼容性就显得格外重要。作为关系数据库管理系统的代表之一,MySQL支持大多数操作......
  • 若依--自定义loadUserByUsername参数入参
    若依--自定义loadUserByUsername参数入参前言在使用若依的Security的登录认证时,默认只能使用用户名去查询sysUser,当我需要额外的参数去查询用户数据时,只能将用户名和额外参数组成json或者特定字符拼接,然后在UserDetailsServiceImpl的loadUserByUsername方法自定义查询数据。但是......