LGTM, but please not my comments...
SOYC is becoming smart!! One thing I'm wondering is whether we have a
good way of making sure we still get the right information everywhere
(the smarter it gets, the harder it gets to follow in some sense, e.g.,
one-character function names, etc.). There's SoycTest, but when I wrote
it, it was pretty empty (just checking for the existence of a file or
two). Do you think medium term it would be worth it to add some tests
to that to make sure we're getting the right entries in the different
categories?
http://gwt-code-reviews.appspot.com/1171801/diff/1/3
File dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java
(right):
http://gwt-code-reviews.appspot.com/1171801/diff/1/3#newcode115
dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java:115:
public void freeze() {
I've been trying to come up with a way in which you would not have to
call freeze() and still be safe. I don't have a good solution -- my
only gripe here is that if you forget to call freeze(), you won't get
any values. Seems like the only way to get around this is to call
freeze whenever something is put in the builder, but that seems very
overheady. The only other thing I can come up with is for frozen and
builder to actually be the same thing (so do an in-place reordering when
you call freeze -- also see my comment below). In that case, if you
forget to call freeze, you still have access to the data, just not in an
optimal way. Do you have any other brilliant ideas?
http://gwt-code-reviews.appspot.com/1171801/diff/1/3#newcode126
dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java:126: }
What happens if your count has more than 8 digits?
http://gwt-code-reviews.appspot.com/1171801/diff/1/3#newcode131
dev/core/src/com/google/gwt/soyc/MakeTopLevelHtmlForPerm.java:131:
builder = null;
So the only thing I'm wondering is why you're not just using a
TreeMapString, Integer (for frozen) and sorting it by value rather
than key (in the comparator that you give it). Would that not get you
around having to create the valus TreeMap?
http://gwt-code-reviews.appspot.com/1171801/show
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors