bb4a033fcd5cd20e5be46ef8ead442dc7db2454d |
|
18-Feb-2016 |
George Mount <mount@google.com> |
Have two-way binding use localized variables to prevent NPE. Bug 26962999 Two-way binding was using the inverted expressions directly without localizing variables. That meant that if there was a variable set to null during evaluation, it may get a NullPointerException even though it checked for null on the value previously. This CL localizes the variables so that cannot happen. Change-Id: Ia55955ce0f1cb750e6a678e72e0cda03f0e3c9b6
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/expr/BracketExpr.java
|
6047998943beebd81e0ae1068df39c0cbee38628 |
|
02-Feb-2016 |
Yigit Boyar <yboyar@google.com> |
Lambda In da house This CL adds support for assigning callbacks to listeners using lambda expressions. These expressions can receive either 0 or N arguments where N is equal to the number of parameters in the callback function. These expressions are evaluated when the callback is invoked. In other words, they are independent from the rest of the ExprModel except the Identifier expressions. Since these are limited to 1 full expression and they don't have any invalidation flags; we use a verbose branching code generation mode where we calculate all possible execution paths, eliminate trivial ones and generate the code. This allows callbacks to be thread safe as well. See ExecutionPath class for details. It is not efficient but since these are rere occasions, should be OK. Callback expressions are still forced to be expressions that return value. To handle `void` case, I've added `void` and `Void` as acceptable symbols. Also, if the callback method returns void, the expression is free to return `void` or any other value. ¯\\_(ツ)_/¯ I've also moved kotlin to rc0. Although rc0 is unrelated to this task, it made more sense to upgrade here because most changes it will ask for were already done in this branch. Bug: 26849440 Change-Id: I805b3d470f85df9c2ce3f3ed5ca74925a08bb7a5
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/expr/BracketExpr.java
|
af146d6a8c0efcf5682d14047c06866a5548f78f |
|
22-Jan-2016 |
Yigit Boyar <yboyar@google.com> |
Update data binding to kotlin beta 4 I've also run some cleanup inspections to keep codebase more up to date. Bug: 26738574 Change-Id: I02aa43157cad858c0ea60dd41a22150e3cf2cfa1
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/expr/BracketExpr.java
|
d3f2b9229472c9dae9bf4ae8b3e2d653b5653b01 |
|
17-Sep-2015 |
George Mount <mount@google.com> |
Two-way binding Bug 1474349 Bug 22460238 This adds two-way data binding for those attributes on Views that also have event listeners for them. General use is also supported, but event listeners are required to notify when those properties change. Change-Id: Iedc66a604257930265f9d661f69658a0a0c3208b
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/expr/BracketExpr.java
|
76b791f78542a2feb191482a2204de95eaf8ee72 |
|
04-Sep-2015 |
George Mount <mount@google.com> |
Better handling of out of bounds exceptions on bracket expressions. Bug 23820607 Handle out of bounds in bracket expressions by returning the default value. Change-Id: I8b3a5a5ced48acfd6683ee1df6264480526244d1
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/expr/BracketExpr.java
|
e0d5ed7613cb72192430cd2ed8e4159618ca308e |
|
25-Aug-2015 |
George Mount <mount@google.com> |
Fix NPE when evaluating bracket expressions. Bug 23498104 Change-Id: I8de149e573721485b916ae6ae692113f3ed2990d
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/expr/BracketExpr.java
|
e52882df6130221462bf07f5f2b52de5c4b0f8de |
|
30-Jul-2015 |
George Mount <mount@google.com> |
Move toCode to Expr classes. It turns out that toCode as part of Java is just about as readable as in kotlin and it makes much more sense than using instanceof (equivalent). Change-Id: Ic2a0de5c4376dafa487d048e6a9420fab9e7f22a
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/expr/BracketExpr.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/main/java/android/databinding/tool/expr/BracketExpr.java
|
2611838bffef5a009ca71e3e9e59a93f29b098ed |
|
24-Jun-2015 |
Yigit Boyar <yboyar@google.com> |
Remove guava from compiler This CL removes all dependency from guava and replaces it w/ either plain java or some utilities. Bug: 22047836 Change-Id: I94be54ed992ab6b5f27c47a8cf400ae60aef02f8
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/expr/BracketExpr.java
|
fead9ca09b117136b35bc5bf137340a754f9eddd |
|
23-Mar-2015 |
George Mount <mount@google.com> |
Move to package android.databinding.
/frameworks/data-binding/compiler/src/main/java/android/databinding/tool/expr/BracketExpr.java
|