SpringSource/spring-xd — pull request #195 by aclement (2013-08-07 23:06:35+00:00)
Title: Xd592

This is a pull request with my extra changes on top of Erics changes. First time I've created a pull request like this, I hope it doesn't cause a merge nightmare. Basically I created a local branch based off master, merged erics branch into it and then did my work on top of that, finally pushing my new branch.

Many changes are due to the code formatter chewing on things that have been in there for a while. But the important changes are:
- Erics fix to inject the parser so we use the right one with the right stream repository when we need to (this avoids the problem of not finding streams when resolving taps)
- Some parser fixes to ensure we can tap on single names (and it will treat that as tapping onto the source in that stream).
- Parser fixes to tapping on label names will work (e.g. 'tap label' here: http | label: transform ... | transform ...)

IMPORTANT
There are some compile errors, someone with the necessary Spring skills can no doubt fix them in 5 seconds but that person isn't me I'm afraid... they relate to the parser injection change. I don't like putting up a PR like this...

There are new tests in the stream command tests, but I had to comment out (for now) the asserts on the sink contents (so the tests are just verifying the parse/deploy behaviour really). I'm seeing some kind of race condition or something where the tests work individually but fail when run together, as if I'm checking sinks before the system has had time to write to them.

There is some preliminary work in there to cope with the last remaining problem, tapping on a module that has a sink:

http | transform ... > :foo
tap transform | log

This will create a `tap --channel=foo` but that doesn't seem to work right now (but that's another jira...)