October 2003 Commit Log

Number of Commits:
92
Number of Active Developers:
3
jstrachan 2003-10-31 19:44

Fully working BSF engine including variable passing context etc.



Now rather than just Groovy scripts being put into the static main() method, the scripts now derive from Script, the code is in the run() instance method and the Script object can take a ScriptContext to allow variables to be passed into and out of the script.



This makes for easy BSF integration. It will also be useful for interactive shells too; the variables can be shared across script invocations. Indeed each script can be in its own classloader and only the ScriptContext shared.

348 lines of code changed in:

jstrachan 2003-10-31 16:59

Initial cut of a BSF engine for Groovy



Patch to allow main(String[]) of strings to return an object.



Added hooks to GroovyShell for BSF.

280 lines of code changed in:

jstrachan 2003-10-31 16:31

removed text file - its now in the wiki

0 lines of code changed in:

jstrachan 2003-10-31 16:19

Added 'super' as a special variable too

11 lines of code changed in:

jstrachan 2003-10-31 16:11

Added a test case to demonstrate that 'this' can be used in static methods

15 lines of code changed in:

jstrachan 2003-10-31 14:34

Patch so that 'println' can be called from static methods

15 lines of code changed in:

jstrachan 2003-10-31 13:30

Refactored Groovy to be called GroovyShell which is a bit more descriptive.



Updated the documentation to have a better organisation and include details on running groovy code.



Also we now have 2 executables...



groovyc compiles groovy to bytecode

groovy compiles & runs groovy scripts

414 lines of code changed in:

jstrachan 2003-10-31 12:24

Static methods (such as scripts) can now use closures.

Also fixed a bug in the codegen of static methods.



Also we've now got a Groovy class which can be used from the command line or Java code to run arbitarary Groovy scripts

104 lines of code changed in:

jstrachan 2003-10-31 11:25

Added AST level support for methods inside scripts. Just need the parser to be able to parse them

33 lines of code changed in:

jstrachan 2003-10-31 10:01

Added support for the running of Groovy scripts without a class required



So you can now compile & run the following script...



println("Hello world")



who-hoo!

280 lines of code changed in:

jstrachan 2003-10-31 08:58

Refactored the parser so that we can build a module which can include classes and statements

42 lines of code changed in:

jstrachan 2003-10-31 00:42

Numerous bug fixes for working with class expressions.



Now we can handle the situation where you refer to a class in the same compliation unit (but not yet generated as bytecode) as well as handling imports to not-yet-existing classes etc.

361 lines of code changed in:

jstrachan 2003-10-30 22:38

Refactor to introduce a single CompileUnit which owns all the modules and classes in a compile so that we can know for sure which classes are in the compile unit and which are not. We can also detect duplicate classes and so forth.

287 lines of code changed in:

jstrachan 2003-10-30 20:50

Minor refactor to allow a source file to be a 'module' which allows N class declarations, import statements and soon embedded statements - if working in script mode

242 lines of code changed in:

jstrachan 2003-10-30 16:34

fixed the javadoc packages

2 lines of code changed in:

jstrachan 2003-10-30 16:28

Updated the documenation to include instructions on how to use Groovy unit tests from inside IDEs

21 lines of code changed in:

jstrachan 2003-10-30 16:18

removed package statement as we've stuff in groovy.* and in org.codehaus.*

2 lines of code changed in:

jstrachan 2003-10-30 15:57

Added a GroovyTestSuite which is a helper method for running Groovy unit test cases from inside an IDE which doesn't support Groovy. It just looks like a normal Java test suite which compiles a given Groovy script and uses that as the test suite

70 lines of code changed in:

jstrachan 2003-10-30 15:12

Major refactor of the use of print() and println().



We've now added 'global' methods to handle printing out objects in a simple way (common in things like Python and Ruby). This avoids the long winded System.out.println().



So we can now just do



println( "hello world!" )



The nice thing about this is, the owner class in which you execute this operation could overload print() and println() to do something cunning, like redirecting output to a file or whatnot.



So the previously added methods to print an object have been removed. You can no longer do



"hello".println()

146 lines of code changed in:

jstrachan 2003-10-30 13:41

Fix for GDO test suite to work around bug GROOVY-45 until its fixed

116 lines of code changed in:

jstrachan 2003-10-30 10:14

added test to show that boolean && expressions look screwy

10 lines of code changed in:

  • groovy/groovy-core/src/test/org/codehaus/groovy/syntax/parser: ParserTest.java (+10)
jstrachan 2003-10-30 09:50

Added an example of an extensible language construct

81 lines of code changed in:

jstrachan 2003-10-30 02:10

Added some extra tracing to help the GDO implementation.



Seem to have found a bug somewhere but also added support for and and or in predicates for GDO - not working yet though

63 lines of code changed in:

jstrachan 2003-10-30 01:46

Added initial checkin of the GroovyDataObjects (GDO) developed at GeekNight with Chris Stevenson for creating groovy data objects via normal Groovy syntax (rather than SQL) and using closures for predicates or view projections or order by clauses

172 lines of code changed in:

jstrachan 2003-10-29 16:33

Added test case for 'global' print methods

26 lines of code changed in:

jstrachan 2003-10-29 10:33

Removed the Groovy Geronimo JMX console which was checked in by mistake

28 lines of code changed in:

jstrachan 2003-10-29 07:57

Updated the documentation for closures to include a mention of the 'it' variable

20 lines of code changed in:

jstrachan 2003-10-29 07:21

Added support for a default closure parameter called 'it' which makes writing simple closures much more concise.



e.g.



[1, 2, 3, 4].findAll { it > 1 }.map { it * 2 }

215 lines of code changed in:

jstrachan 2003-10-28 19:48

Added some instructions on how to compile Groovy code

3 lines of code changed in:

jstrachan 2003-10-28 18:41

Added nicer JavaDoc grouping to separate the GDK from the implementation

28 lines of code changed in:

jstrachan 2003-10-28 18:02

Minor refactor - moved the AntBuillder and GroovyMBean classes into the groovy.util package to make the groovy APIs simpler to use.



Also cleaned up the javadoc somewhat ensuring there's a package descriptor for each package

1116 lines of code changed in:

jstrachan 2003-10-28 16:59

updated documentation links

24 lines of code changed in:

jstrachan 2003-10-28 15:36

Made the parser exceptions non-runtime and commented out the failing PrintTest code

45 lines of code changed in:

jstrachan 2003-10-28 12:41

Fixed failing test

9 lines of code changed in:

jstrachan 2003-10-28 10:44

disabled failing null check

2 lines of code changed in:

  • groovy/groovy-core/src/main/org/codehaus/groovy/syntax/parser: ASTBuilder.java (+2 -1)
jstrachan 2003-10-28 10:33

Added unit tests to check for compiler errors.



Refactored the syntax & parser exceptions to be runtime for now.

62 lines of code changed in:

jstrachan 2003-10-27 16:41

Added new test case that demonstrates the use of class expressions

42 lines of code changed in:

jstrachan 2003-10-27 14:55

added a little more getting started documentation and fixed the developer CVS link

22 lines of code changed in:

jstrachan 2003-10-27 14:23

updated the todo list, refactoring it a bit

198 lines of code changed in:

jstrachan 2003-10-27 13:06

Added a unit test which demonstrates the GroovyMBean in action

0 lines of code changed in:

jstrachan 2003-10-27 10:39

fixed links for mail lists

12 lines of code changed in:

jstrachan 2003-10-27 10:17

Added getProperty() and setProperty() methods on GroovyObject making it easy to overload the property access mechanism in Groovy.



Also added an initial GroovyMBean which acts just like a regular POGO but is actually a JMX proxy to an underlying local or remote MBean

336 lines of code changed in:

jstrachan 2003-10-24 13:47

Numerous changes.



* tidied up the closure methods - added many new helper methods such as for iterating over files by line



* added a Swing builder together with some MVC models to make creating Swing UIs in Groovy really simple



* various things tidied up and more unit test cases



* return statement is now optional

3955 lines of code changed in: