November 2003 Commit Log

Number of Commits:
80
Number of Active Developers:
4
spullara 2003-11-29 07:56

Groovy-61 PROGRESS: Implemented a form of regular expressions for groovy that more naturally integrates with the current lexer and parser. Regular expression matching can be done like:



string ~= regex string



This expression returns a java.util.regex.Matcher that you can then manipulate as you see fit. This form:



string ~== regex string



Returns a boolean based on whether string is fully matched by regex string. Also implemented is asIterator for Matcher so that you can use it with closures:



("cheesecheese" ~= "cheese").each({x | println(x)})



Prints two 'cheese' lines. See the unit tests for more examples in RegularExpressionsTest.groovy.



Also within this change is a minor change to increase classloader support. I think that James is going to redo that in the future anyway.

242 lines of code changed in:

jstrachan 2003-11-28 06:43

Added a property to avoid the exception stack trace when running the console

4 lines of code changed in:

kasper 2003-11-27 00:12

pretty print

33 lines of code changed in:

kasper 2003-11-27 00:03

Adding some methods for lists

Set Intersection [ 1, 1, 3, 5 ] & [ 1, 2, 3 ] -> [1, 3]

Repetition [ 1, 2, 3 ] * 3 -> [1, 2, 3, 1, 2, 3, 1, 2, 3]

Concatenation [ 1, 2, 3 ] + [ 4, 5 ] -> [1, 2, 3, 4, 5]

Set Difference [ 1, 1, 2, 2, 3, 3, 3, 4, 5 ] - [ 1, 2, 4 ] -> [3, 5]

flatten [[1, 2, 3], [4, 5, 6, [7, 8]], 9, 10] -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

199 lines of code changed in:

jstrachan 2003-11-25 10:32

Added support for a step() method on a range so that step based iteration can be done on any range object

104 lines of code changed in:

jstrachan 2003-11-25 09:37

added some documentation about the inject method

53 lines of code changed in:

jstrachan 2003-11-25 09:29

added an extra test case

3 lines of code changed in:

jstrachan 2003-11-25 09:28

added sam's ID

1 lines of code changed in:

jstrachan 2003-11-25 09:25

added Sams name (damn I got distracted, meant to do this some time ago)

1 lines of code changed in:

jstrachan 2003-11-24 21:09

Added support for Ruby / Python style inject method for incrementally processing each item in a list & passing the value into each closure



Removed some cruft from the todo.txt

41 lines of code changed in:

jstrachan 2003-11-24 20:36

Added some documentation to the website describing Sam's cool work on groovlets (and pinching Sam's example groovlet too :)

1 lines of code changed in:

jstrachan 2003-11-24 17:47

updated so website shows timestamp

2 lines of code changed in:

spullara 2003-11-24 07:00

Various problems existed for accessing properties of variables from the script context. The meat of the fix was to remove the stack reordering that we were doing in visitPropertyExpression and replace it with a method call that takes the parameters in the natural order. Finding this hidden ASTORE that was stomping on my variables was fun for the whole family. I added a test for this case and also for using GroovyShell in general. After working on this for a few hours you wouldn't believe the sigh of relief when I found this reordering was being done and I could fix about 4 bugs that I ran into that turns out were all related to this. Yay!

122 lines of code changed in:

spullara 2003-11-24 00:21

Groovy-59 NEW FEATURE: Heredocs/verbatim/reports whatever you want to call them are implemented. The syntax is <<<TOKEN .....\nTOKEN They act just like double quoted GStrings so you can use them for large template text quite easily:



println(<<<EOS

Hello there!

EOS)



is exactly the same as

println("Hello there!")



Notice there are no trailing or prefixed new lines. You can see other examples in VerbatimGStringTest.groovy.

143 lines of code changed in:

spullara 2003-11-23 22:33

Groovy-48 FIXED: When there is a GString with a value in the first position the elegant logic of the toString method breaks down because in order to preserve its simplicity, there must be a string not a value as the first thing in the GString. This change simply checks to see if there are no strings when adding a value, if there are not, then it puts an EMPTY_STRING as the first thing in the string list. This preserves the way toString is handled, is unobtrusive, and fixes the bugs that were commented out.

6 lines of code changed in:

spullara 2003-11-23 21:44

Groovy-42 FIXED: This adds ! support to groovy. I tried a number of different strategies for adding it and this was the least traumatic. Javac supports ! by reversing the compares that are done in the underlying expression. This proved to be an extremely large change for something that is easily handled with a utility method. I do suggest that when we go back to optimize groovy that this may something that can be done more efficiently.

172 lines of code changed in:

spullara 2003-11-23 01:20

Groovy-44: FIXED You can now use numbers as objects.

27 lines of code changed in:

  • groovy/groovy-core/src/main/org/codehaus/groovy/syntax/lexer: Lexer.java (+3 -14)
  • groovy/groovy-core/src/test/groovy: GroovyMethodsTest.groovy (-2)
  • groovy/groovy-core/src/test/org/codehaus/groovy/syntax/lexer: LexerTest.java (+24 -2)
spullara 2003-11-23 00:51

Groovy-60 FIXED: If the variable is new and it is a property we need to ensure that we store it in the local scope so that when someone sets in a lower scope and then reads it in a higher scope we don't get a verifier error because it may not have been initialized.

29 lines of code changed in:

spullara 2003-11-23 00:42

Tidying up the imports, should have gotten this the first time.

0 lines of code changed in:

spullara 2003-11-23 00:36

This is a checkin of the GroovyServlet. The groovy servlet can be registered to handle .groovy files in a web application. Those scripts are compiled and are run under the webapplications context so that you get additional variables from the container including "application", "session", "request", "response", "out" and any form parameters that are passed in. See the servlet source for the xml required to register it in the DD. This introduces an additional dependency "servletapi-2.3" on the build because it references javax.servlet.* classes. At some future date we may move this so that we can have a separate J2EE section in the repository. I had to remove the debugging calls to LogFactory because it can interfere with most servers use of the same functionality.

167 lines of code changed in:

spullara 2003-11-23 00:16

Reset the context classloader to the classloader that we saved on the stack to play nicely with application servers.

6 lines of code changed in:

bob 2003-11-21 06:46

Fix for GROOVY-50, plus test.

17 lines of code changed in:

jstrachan 2003-11-20 17:00

fixed the build system to include the FAQ

1 lines of code changed in:

jstrachan 2003-11-20 16:53

* removed unnecessary logging in console.

* fixed some typeos in the documentation

* added a basic FAQ

88 lines of code changed in:

bob 2003-11-20 16:14

trivial

1 lines of code changed in:

bob 2003-11-20 15:54

trivial

1 lines of code changed in:

jstrachan 2003-11-20 12:32

* applied Sam's patch to tidy up the MetaClass

* added early implementation of Sequences (for 0..n or 1..n cardinalities)

* added a keystroke for the swing console

* started some early implementations of an SQL facade for gdo

1004 lines of code changed in:

bob 2003-11-20 03:06

trivial

2 lines of code changed in:

bob 2003-11-20 02:59

trivial

0 lines of code changed in:

bob 2003-11-20 02:52

Trivial change to test damagecontrol.

2 lines of code changed in:

jstrachan 2003-11-19 11:43

Tidied up the console & fixed the classloader bug - creating a GroovyClassLoader will by default use the thread context class loader

145 lines of code changed in:

jstrachan 2003-11-19 11:10

Applied Sam's patch

16 lines of code changed in:

jstrachan 2003-11-19 07:10

Fixed my recent hacks which broke some unit test cases.



All test cases now seem to work fine.

4 lines of code changed in:

jstrachan 2003-11-19 03:17

Fixed the unit test cases after I accidentally broke them - sorry everyone!

97 lines of code changed in:

jstrachan 2003-11-17 21:34

added JTextPane support

2 lines of code changed in:

jstrachan 2003-11-17 21:34

Added support for String.tokenize

164 lines of code changed in:

jstrachan 2003-11-17 19:59

Tidied up the groovy console to be more like a normal terminal

70 lines of code changed in:

jstrachan 2003-11-17 04:27

stopped tracing of class files

1 lines of code changed in:

  • groovy/groovy-core/src/test/org/codehaus/groovy/classgen: TestSupport.java (+1 -1)
jstrachan 2003-11-17 04:11

Fixed GROOVY-50

11 lines of code changed in:

jstrachan 2003-11-17 03:36

added test case for static println

19 lines of code changed in:

jstrachan 2003-11-17 03:18

Fixed GROOVY-51

67 lines of code changed in:

jstrachan 2003-11-17 01:52

fixed my bad attempt to apply Sam's patch :)

2 lines of code changed in:

  • groovy/groovy-core/src/main/org/codehaus/groovy/ant: Groovyc.java (+2 -2)
jstrachan 2003-11-17 01:06

Committed Sam's patch to avoid NPEs when not specifying classpath

8 lines of code changed in:

  • groovy/groovy-core/src/main/org/codehaus/groovy/ant: Groovyc.java (+8 -4)
jstrachan 2003-11-16 23:34

added documentation about the swing console

16 lines of code changed in:

jstrachan 2003-11-16 23:31

added a history dialog to the command shell

14 lines of code changed in:

jstrachan 2003-11-16 20:12

Much neater swing console

4 lines of code changed in:

jstrachan 2003-11-16 19:52

Fixed various test cases I broke with the GPath changes

156 lines of code changed in:

jstrachan 2003-11-15 17:22

Added an early version of a GPath test case

81 lines of code changed in:

jstrachan 2003-11-15 15:37

tidied up todo list & added new map test

138 lines of code changed in:

jstrachan 2003-11-15 06:42

Apologies for the monster commit everyone - was stuck travelling for 24 hours so had heaps of time to hack groovy - without WiFi in Houston or Gatwick :(



here's a summary of the changes



* refactored the MetaClass method invocation code to be much cleaner (no List and Object[] crap) the dispatcher can now handle overloading of 1 type of a multi-arg list.



* fixed bad exception message when exceptions occur inside a closure which lead to a wierd exception message that was very confusing (due to an exception being wrapped). Added a test case to demonstrate this now works fine.



* added a NoSuchMethodException for better exception



* added better error checking validation messages & exceptions for bad class names & known properties & methods.



* attempted to tidy up the line numbers when exceptions occur; its not totally working yet :)



* tidied up class resolving code so that classpath & compile unit class resolutions work much cleaner.



* uncommented a bunch of test cases. If you search for @todo in the *.groovy files you'll often see little bits of tests that are commented out until some issue with the parser or runtime is sorted out.



* the while() loop appears to be working now

896 lines of code changed in:

jstrachan 2003-11-11 19:35

Added more test cases & fixed bug with typesafe method returns

37 lines of code changed in:

jstrachan 2003-11-11 19:07

added some new test cases

24 lines of code changed in:

bob 2003-11-11 15:47

Fixing double-quoted string interpolation. Building from CST to AST was failing

due to iterating children nodes ineffectively.

9 lines of code changed in:

jstrachan 2003-11-11 13:17

further attempts to get the string interpolation working

20 lines of code changed in:

jstrachan 2003-11-11 12:56

Tidied up my patches to get more unit test cases working again

33 lines of code changed in:

jstrachan 2003-11-11 10:42

fixed test due to && and || now working

0 lines of code changed in:

jstrachan 2003-11-11 10:30

Minor patch to the GString expression changes, so that by default strings are turned into ConstantExpressions unless they have at least 1 dynamic value

33 lines of code changed in:

  • groovy/groovy-core/src/main/org/codehaus/groovy/ast/expr: GStringExpression.java (+14 -1)
  • groovy/groovy-core/src/main/org/codehaus/groovy/syntax/parser: ASTBuilder.java (+17 -2)
  • groovy/groovy-core/src/test/org/codehaus/groovy/classgen: GStringTest.java (+2 -2)
jstrachan 2003-11-10 20:13

added work around for NPE

21 lines of code changed in:

jstrachan 2003-11-10 20:05

working logical branches

7 lines of code changed in:

bob 2003-11-10 20:00

First attempt at GROOVY-14

106 lines of code changed in:

jstrachan 2003-11-10 19:54

First attempt at creating implementing && and ||

68 lines of code changed in:

  • groovy/groovy-core/src/main/org/codehaus/groovy/classgen: ClassGenerator.java (+56 -6)
  • groovy/groovy-core/src/test/org/codehaus/groovy/classgen: DumpClass3.java (+12)
jstrachan 2003-11-10 19:54

added test case for GString for bob

13 lines of code changed in:

bob 2003-11-10 19:07

Front-end fix for GROOVY-41



Backend borks on && binary op.

8 lines of code changed in:

bob 2003-11-10 18:55

Fix for GROOVY-43.



a+b+c

40 lines of code changed in:

jstrachan 2003-11-10 09:30

Added GroovyMock library for mock testing of groovy objects

390 lines of code changed in:

jstrachan 2003-11-07 15:45

Added more folks to developer list

27 lines of code changed in:

jstrachan 2003-11-07 15:42

Adds a feature summary to the homepage

30 lines of code changed in:

jstrachan 2003-11-06 09:46

added more docs on eclipse plugin

7 lines of code changed in:

jstrachan 2003-11-06 09:39

updated the documentation and project descriptor to be consistent with the new groovy-core subdirectory. Also made a brief mention of groovy-eclipse on the website

17 lines of code changed in:

jstrachan 2003-11-06 08:15

Moved the code into the groovy-core subdirectory to allow new modules to be added to the groovy CVS tree.

0 lines of code changed in:

jstrachan 2003-11-06 07:50

Added a simple (and so far quite crap) groovy console in Swing

93 lines of code changed in:

jstrachan 2003-11-06 07:49

Added target to help groovy-eclipse

62 lines of code changed in:

  • groovy: