History log of /frameworks/data-binding/compiler/src/test/java/android/databinding/tool/MockLayoutBinder.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
eebcbdd5d35e56a2c8ef37feeb65df46130d001d 26-Aug-2015 Yigit Boyar <yboyar@google.com> Fix the bug about marking expressions as read early

@{obj4.text}
@{obj4.useHello ? obj4.text : `hello`}

This case was broken and would not re-read obj4.text if
only obj4.useHello is invalidated. It was partially fixed in
Change-Id: Id449c8819b8dc0301a7ab893002478914780d480 but
but it was bringing it down to exact equality which would
mean we could fail to mark sth as read.

The coverage logic we use in expressions when marking them
as read was giving false positives, which results in
marking expressions as read before they are fully read.
This CL fixes that bug. The safe fix introduces some false
negatives when a conditional is behind another conditional.
We can address this post v1.

There was also another bug about setting conditional flags
even though the ternary does not need to be calculated.

@{obja.boolMethod(a)}
@{a ? objb.boolMethod(b) : objc.boolMethod(c)}

When obja is invalidated, it would re calculate the second
binding expression too even though it is never used (because
that expression is not invalidated). The re-calculation would
happen because we would calculate the value of `a` and set
the conditional flags w/o checking invalidation.

This would result in unnecessary calculations. I've also fixed
it for first degree where the ternary is not under another
ternary. The proper fix would requires bigger effort, post V1.

bug: 22957203
Change-Id: Ib73f31eac358f2ad7652395a021baaa93b79adf7
/frameworks/data-binding/compiler/src/test/java/android/databinding/tool/MockLayoutBinder.java
731b74f7f44e67312a1fc4161c4e0aae221b2417 25-Jun-2015 Yigit Boyar <yboyar@google.com> Introduce Scopes to track logical stack traces

This CL introduces a static class called Scope, which is
used the logical processing stack for data binding.
These scopes are used to generate meaningful error messages
when an error is detected.

Bug: 21953001
Change-Id: I5470a8c4ad94401d34a140762baae9d53c5a0402
/frameworks/data-binding/compiler/src/test/java/android/databinding/tool/MockLayoutBinder.java
7ff60c24c6de7ba0c674fe65a82ad4a88dab2e5d 13-Apr-2015 George Mount <mount@google.com> Delay evaluating the View and Binding class names.

Binding and View class names should be evaluated when processing
the binding expressions, not during layout XML processing.

Allow alternate binding class names as declared in layout
XML.

Use "binding_" as a prefix for binding tags instead of "bindingTag"

Preparation steps for customized data binding classes.

Change-Id: If08de28aad06401e8a5d461341b2616e17498aa1
/frameworks/data-binding/compiler/src/test/java/android/databinding/tool/MockLayoutBinder.java
96e1c821dd446d1ed78f8ae61131550588f60a24 10-Apr-2015 George Mount <mount@google.com> Support merge tags.

This also drops the requirement for include tags to have an ID.

Each root view tag is given a numeric suffix, starting with 0.
Merge tags can have multiple roots, the first of which always
is suffixed with 0. The remainder have tag identifiers that
are interspersed with the tags used with expressions. The
numeric suffix is used to identify the View in the mapBindings
call.

Include tag information now uses the tag of its parent so that
its parent will search for the includes within it. When
mapBindings is looking at the parent, it looks for all direct
children with the appropriate tag of the format "layout*/name_0".
Then it searches for all siblings with the same prefix and different
numeric suffixes. Any that are found are considered part of the
same merged include. If it finds another with _0, it knows that
a new include was found.

Change-Id: Idd1144d9037648193724667320744bd079791476
/frameworks/data-binding/compiler/src/test/java/android/databinding/tool/MockLayoutBinder.java
29eed96672ca43d68d12605ad6f91814d4c53988 13-Apr-2015 George Mount <mount@google.com> Fix test breaks.
/frameworks/data-binding/compiler/src/test/java/android/databinding/tool/MockLayoutBinder.java
fead9ca09b117136b35bc5bf137340a754f9eddd 23-Mar-2015 George Mount <mount@google.com> Move to package android.databinding.
/frameworks/data-binding/compiler/src/test/java/android/databinding/tool/MockLayoutBinder.java