GWT doesn't provide Collections.synchronizedMap so we can't default to that.
Because we don't want someone to extend BasicCollector on a multi-threaded
platform and get an unsynchronized HashMap, which would cause things to fail,
we instead make creatFetcherCache abstract and document that if you extend
BasicCollector, you need to return a synchronized map (if the platform you're
targeting is multithreaded).
Set the Bundle-ActivationPolicy to 'lazy'. According to the OSGi wiki:
"This can improve performance in a system with many bundles, where
instead of starting them they may be placed into a lazy state, and
only activated when they are actually used."
-- http://wiki.osgi.org/wiki/Bundle-ActivationPolicy
'Lazy' is fine for jmustache, because it has no bundle activator,
and does not provide any OSGi services that need to be registered.
The ' entity is an XML entity, rather than an HTML entity, and is not
supported by Internet Explorer. The numeric form is supported in both XML
and HTML.
Some of the automatically generated headers are suppressed because
they are for information only, and not very useful. These include
Bnd-LastModified, Include-Resource, Private-Package and Tool.
I've ironed out most of the kinks, but the GWT unit test still fails because
we're forced to do some sneaky things with java.io.Reader/Writer. I think it
will all work when compiled to JavaScript, so I need to check it in a real
project.
Kali/Bertrand convinced me that being consistent with other Mustache
implementations is more important than whatever wacky reasons I was harboring
for keeping compound variables different than singleton sections.
a pluggable component.
This allows scaling down to the GWT environment by hiding the reflection code
via GWT's super source mechanism.
And it allows scaling up to non-Java languages (like Scala) by allowing the
library client to extend the DefaultCollector and teach it about Scala
Iterators, Iterables and Maps.
I also just realized that GWT has no facilities for Reader and Writer, which is
going to complicate making things work in GWT even further. But for now, I'll
just leave things as is.
Otherwise you get undesirable newline skipping if you do things like, for
example:
{{#foos}}
{{bar}}{{^-last}}, {{/-last}}
{{/foos}}
where you want the newline after {{/-last}}, but it was getting skipped.