This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
-have java app with following groovy class: package test class Book { def title String author public Book(title) { this.title = title } boolean order(int qty, Resseller) { true } def title() { "book title" } } -build project -have following script: import test.Book def book = new Book() println ("groovy ${book?.title()}") Issue 1) - editor does not know about test.Book groovy class - there's an error annotation -run script from the IDE Issue 2) : /space/java/groovy-1.5.6/bin/groovy /home/lukas/NetBeansProjects/JavaApplication2/src/NewGroovyScript.groovy org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, /home/lukas/NetBeansProjects/JavaApplication2/src/NewGroovyScript.groovy: 7: unable to resolve class test.Book @ line 7, column 1. import test.Book ^ 1 error It works on the command line: lukas@ubuntu-m9:~/NetBeansProjects/JavaApplication2/src$ groovy NewGroovyScript.groovy groovy book title
Fixed. Editor problem is fixed in http://hg.netbeans.org/main/contrib/rev/2e04f61cbc2c Execution problem is fixed in http://hg.netbeans.org/main/contrib/rev/72d4415d9c58 but this kind of execution will be removed soon as it is completely ignoring Ant project setup and you have to build project before you call Execute script. I'll remove this action once regular project Run File action will be available for Groovy.
v.
Integrated into 'main-golden', available in NB_Trunk_Production #206 build Changeset: http://hg.netbeans.org/main/rev/cc5a4f778439 User: Martin Adamek <martin_adamek@netbeans.org> Log: Editor part of #134203: Cannot execute script which contains import