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/compilerCommon/src/main/java/android/databinding/tool/processing/ScopedException.java
|
4ba16229a40e9758db86d4fb1df5119fdcb8aa2a |
|
22-Dec-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Change from commons-lang3 to guava Change-Id: I1a18e06af7bf2d65228f1491663b6e096a9538ed
/frameworks/data-binding/compilerCommon/src/main/java/android/databinding/tool/processing/ScopedException.java
|
9784c9aaedeb863018f5fcaa0a598e8e2f8ed2f3 |
|
13-Oct-2015 |
Yigit Boyar <yboyar@google.com> |
Data binding as studio dep + java6 This CL gets rid of the gradle plugin and instead provides DataBindingBuilder for the gradle plugin to directly use. Now, everything that is deployed via SDK Manager (lib and adapters) are included as prebuilts so that we avoid accidently changing them w/o an SDK manager release. There is still work to do: > re-enable proguard for externel dependencies > release a batch to ensure everything works Bug: 22516688 Change-Id: I83ace15bd6d3d23bf5b4ad850f36453dd23ebd43
/frameworks/data-binding/compilerCommon/src/main/java/android/databinding/tool/processing/ScopedException.java
|
fd8342a51a96282df315cd27055ba539e89a8c9e |
|
07-Oct-2015 |
Yigit Boyar <yboyar@google.com> |
Report syntax errors even though Antlr can recover This CL makes Antlr parser more strict by not allowing errors. Antlr usually tries to recover from these errors but thats not what we really want for this use case. This CL also updates version codes to rc4 since rc3 is already out. Change-Id: I0d305e06a6cdcbae2f37573c3c6ae4233cdd7958
/frameworks/data-binding/compilerCommon/src/main/java/android/databinding/tool/processing/ScopedException.java
|
08119ea342cb47910ca80ff646d746f00e4663ce |
|
06-Jul-2015 |
Yigit Boyar <yboyar@google.com> |
Print encoded errors only if data binding is invoked from the IDE This CL makes Scope aware of execution environment. Now when invoked from tests or via IDE, we'll print exceptions as encoded so that we can parse them back. When user invokes from command line or any other tool, we will print human readable errors. The encoded error format may still change depending on conversations w/ Studio team. Bug: 21953001 Change-Id: I5bd3ea0cb6728e011225ee84d3e38817a2993a43
/frameworks/data-binding/compilerCommon/src/main/java/android/databinding/tool/processing/ScopedException.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/compilerCommon/src/main/java/android/databinding/tool/processing/ScopedException.java
|