78dc9ae6d67ae94bf3f637eeea0848e4f700b7a3 |
21-Apr-2016 |
George Mount <mount@google.com> |
Fix problem where root View's style is used instead of bound View's Bug 27808662 Change-Id: I870b0db47e3ed970a3bd67e602e873e503610028
ndroid/databinding/tool/ExpressionVisitorTest.java
ndroid/databinding/tool/LayoutBinderTest.java
ndroid/databinding/tool/expr/ExecutionPathTest.java
ndroid/databinding/tool/expr/ExprModelTest.java
|
f58c3bd412f9bdc5ec589fdcfed470889abb6ea6 |
26-Mar-2016 |
Yigit Boyar <yboyar@google.com> |
Fix expression evaluation problem This CL fixes a bug in expression evaluator where we would elevate a conditional dependency by mistake when it is not read completely. This was caused by marking bit paths as read in the same cycle. There is still a potential bug in the code path where we detect a variable would've already been calculated for a dependency to be calculated (e.g. a ? a : b) but this change is a fairly safe compared to making a big change in that logic. Bug: 895468 Change-Id: I60a704a59c3b5b8e4f833f060c6233d356dab6c8
ndroid/databinding/tool/expr/ExprModelTest.java
|
11df39c91611b9ff2d7c87a9a9829251a015bccf |
16-Mar-2016 |
George Mount <mount@google.com> |
Added simple inverted String conversion. When binding a primitive to an EditText, a common pattern is to use '@{"" + value}'. This, however, doesn't allow for a two-way data binding expressions. To mitigate the need for conversion functions, a simple inversion for this expression wsa implemented that just converts value from a String when possible. This CL also fixes a bug in which a method matching the first parameter was always chosen, reguardless of the second and further parameters. Change-Id: I36828d9f54d2073965358fceb140b2d5e6328919
ndroid/databinding/tool/reflection/java/JavaAnalyzer.java
|
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
ndroid/databinding/tool/ExpressionVisitorTest.java
ndroid/databinding/tool/LayoutBinderTest.java
ndroid/databinding/tool/expr/ExecutionPathTest.java
ndroid/databinding/tool/expr/ExprModelTest.java
ndroid/databinding/tool/expr/ExprTest.java
ndroid/databinding/tool/reflection/java/JavaAnalyzer.java
ndroid/databinding/tool/reflection/java/JavaMethod.java
|
b522c7650bf7d9ec566845bc9eb37e761eea853d |
23-Feb-2016 |
George Mount <mount@google.com> |
GroupExpr is unnecessary. The grouping happens at parsing time, so grouping as part of the expression model is unnecessary. It can be inferred. Change-Id: I10c617516741b9ff8115144d51fcadcd2f8b87d6
ndroid/databinding/tool/expr/ExprModelTest.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
ndroid/databinding/BindingExpressionParserTest.java
ndroid/databinding/tool/expr/ExecutionPathTest.java
ndroid/databinding/tool/expr/ExprModelTest.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
ndroid/databinding/tool/expr/ExprModelTest.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
ndroid/databinding/tool/LayoutBinderTest.java
ndroid/databinding/tool/expr/ExprModelTest.java
ndroid/databinding/tool/expr/ExprTest.java
|
4ba16229a40e9758db86d4fb1df5119fdcb8aa2a |
22-Dec-2015 |
Deepanshu Gupta <deepanshu@google.com> |
Change from commons-lang3 to guava Change-Id: I1a18e06af7bf2d65228f1491663b6e096a9538ed
ndroid/databinding/tool/expr/ExprModelTest.java
ndroid/databinding/tool/reflection/java/JavaAnalyzer.java
|
e61d1cc710803cdf0ab4f2aca3d18c46949758a9 |
04-Dec-2015 |
Yigit Boyar <yboyar@google.com> |
Fix compiler tests setup, upgrade public known version Change-Id: I91babbab13cd00d4f0df149c997349fca0aed80b
ndroid/databinding/tool/expr/ExprModelTest.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
ndroid/databinding/tool/expr/ExprModelTest.java
|
876ba3272f17ed891ea455e7dd526d44e468757c |
17-Oct-2015 |
Yigit Boyar <yboyar@google.com> |
Fix broken test. The test was using a sample which is not compliant with JavaBeans notation. It did not fail before because these tests are not compiled as data binding apps Change-Id: Ifad7a1d204d6e6e4b227bc68ccabdb650d73dec6
ndroid/databinding/tool/expr/ExprModelTest.java
|
09aeb26073fc8a98263806f53e44819ebe5046c6 |
09-Oct-2015 |
Yigit Boyar <yboyar@google.com> |
Handle constant predicate in ternary If a ternary expressions's predicate is constant, we would never evaluate it which means we would never evaluate the ternary unless some other expression depends on it. This CL changes ExprModel to move such constant expressions into pending list so that they can be evaluated + necessary flags are set. We can actually avoid this process by replacing TernaryExpression with something else when this case is detected but that would be a bigger change and not safe shortly before the release. Hopefully, codegen logic will be refactored into a more well defined process. Bug: 24768154 Change-Id: I0918568414b64d64f070978f1f8e77cc3b6c85fd
ndroid/databinding/tool/expr/ExprModelTest.java
|
f01c66d7aaafd713de64b499c568f5870855dcd5 |
30-Sep-2015 |
Yigit Boyar <yboyar@google.com> |
Load full SDK table When loading methods from the SDK, we would only load methods that have since > Application.minApi. This way, we would keep the hash very small. On the other hand, this algorithm break if a newer API version adds a method that has the same signature with a subclass. This case happened when we added setForeground to View at API 23 but it has been in FrameLayout since 1. Bug:24509802 Change-Id: I7ac7ca5d1aac142a9afe8cd57ab9497dfb649650
ndroid/databinding/tool/reflection/SdkVersionTest.java
|
8dcc185bbd1b1e3654c6018a740b6e33283d908b |
21-Sep-2015 |
Yigit Boyar <yboyar@google.com> |
Fix test initialization. This tests was behaving flaky. Looks like if it is the first test to run, it would crash because JavaAnalyzer is not initialized. Onether reason to not to use static singletons. Change-Id: I1afa26f002e927dcf6b17f0bee42f464a0d67bd4
ndroid/databinding/tool/LayoutBinderTest.java
|
1f1f50563ad8166e3cd2be64b705ae583834540d |
11-Sep-2015 |
Yigit Boyar <yboyar@google.com> |
Shift Long in FlagSet instead of int :/ Bug: 23979611 Change-Id: I7825a718dddd1c15d598f19a4fe8722ddc5a5763
ndroid/databinding/tool/writer/FlagSetTest.java
|
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
ndroid/databinding/tool/LayoutBinderTest.java
ndroid/databinding/tool/MockLayoutBinder.java
ndroid/databinding/tool/expr/ExprModelTest.java
ndroid/databinding/tool/reflection/java/JavaAnalyzer.java
|
bd42d20f70b1f88e27e3b3c9c3a9c55ec155d128 |
25-Aug-2015 |
George Mount <mount@google.com> |
Support generics in conversion parameters. Bug 23490384 Change-Id: I691da60a671d15c73cf2753ff830f9effb360e96
ndroid/databinding/tool/reflection/java/JavaClass.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
ndroid/databinding/tool/expr/ExprModelTest.java
ndroid/databinding/tool/expr/ExprTest.java
|
d615f15f0f0cc4c4de7570119d181e13d44e708a |
05-Aug-2015 |
George Mount <mount@google.com> |
Fixed: conditional expression not always waiting for its dependencies. Bug 22957203 Some conditional expressions were not waiting for all of their dependencies to be evaluated before evaluting the expression. Change-Id: Id449c8819b8dc0301a7ab893002478914780d480
ndroid/databinding/tool/expr/ExprModelTest.java
|
c9a5d6f140f732ca0ff279a4b1ee315072e1c422 |
11-Jul-2015 |
George Mount <mount@google.com> |
Fix up javadoc. Bug 22175560 Change-Id: Ib5bfd87f66602919764bd9b28c0afdcbe55a7ce5
ndroid/databinding/CallbackRegistryTest.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
ndroid/databinding/tool/MockLayoutBinder.java
|
c1560e6b00b398867da12fbdc5a1fcd1d50b801c |
25-Jun-2015 |
Yigit Boyar <yboyar@google.com> |
Carry over location information from parser to annotation processor This CL changes LayoutParser to use Antlr which provides us the location information. This information is now serialized inside the bundle so that we can read it in the annotation processor, enabling better error logs with location information. Bug:21953001 Change-Id: If9b5cf2f87598a609ddf77235decc17098a46a6b
ndroid/databinding/tool/ExpressionVisitorTest.java
ndroid/databinding/tool/LayoutBinderTest.java
ndroid/databinding/tool/expr/ExprModelTest.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
ndroid/databinding/tool/expr/ExprModelTest.java
ndroid/databinding/tool/expr/ExprTest.java
ndroid/databinding/tool/reflection/java/JavaAnalyzer.java
|
716ba89e7f459f49ea85070d4710c1d79d715298 |
18-Jun-2015 |
George Mount <mount@google.com> |
Support calling listener methods without interfaces. Bug 21594573 It is convenient to be able to assign event listeners by just referencing a method, similar to the way onClick="handler" works. This adds a whole lot of listeners for the framework. Additional listeners must be added for support library components. This isn't perfect in resolving listeners. Perfect resolution requires that each expression is evaluated in its own context within the binding statement. If, for example, the same method name is used for a listener and an accessor, we will assume that the listener is used always and there will be a compilation failure. Change-Id: If4705122b67a451430451b6e7d890eb813af1c5c
ndroid/databinding/tool/reflection/java/JavaClass.java
ndroid/databinding/tool/reflection/java/JavaMethod.java
|
924fa7c597694ebc433fc0379d0015785351d1b7 |
23-Jun-2015 |
Yigit Boyar <yboyar@google.com> |
Fix compiler tests Compiler tests were broken after the parcelable change. JavaClassLoader cannot access Parcelable when resolving ObservableXX from the library. Compiler tests do not need to resolve Observables so in this CL I override the related method to avoid trying to load them. I've also removed the requirement to deploy a libraryJar from the library. Instead, compiler will directly include the library sources when it is being compiled for tests.
ndroid/databinding/tool/reflection/java/JavaAnalyzer.java
|
ec2f3896c21a504b464bf591cdb45b62692b6760 |
10-Jun-2015 |
Yigit Boyar <yboyar@google.com> |
Improve static method / field handling Previously, we would allow access to static fields via instance variables but it would not work for methods. Moreover, the behavior was not exactly the same with how java handles it. In java, the instance can be null but our binding code would not evaluate it if instance is null. This CL fixes these bugs by adding static resolution support to methods and replacing their variable identifiers with static identifiers while the method is being resolved so that the rest of the system is still consistent. Bug: 20412284 Change-Id: Id97ce564c312b97d5a0e60d7d7a5bbd06b131071
ndroid/databinding/tool/expr/ExprModelTest.java
|
b1356339eaa6c8e967e4fc1dc283b82909a1208d |
22-May-2015 |
Yigit Boyar <yboyar@google.com> |
Merge projects for an easier release This CL merges annotation processor, xml grammer and grammer builder into compiler project. It also adds logic to pass gradle's --debug parameter to the annotation processor so that we can grab logs when necessary. Bug: 21327802 Change-Id: I1d07002519a6b95de3cdc0891bd00f461f73e8ea
ndroid/databinding/BindingExpressionParserTest.java
|
24ff3c01534a5e4dc9f65796009debe7fd87c1be |
20-May-2015 |
Yigit Boyar <yboyar@google.com> |
Merge "Handle inter-expr dependencies properly"
|
7b07818f07c28c6dec34ca2a9ab5f61e86afb493 |
20-May-2015 |
Yigit Boyar <yboyar@google.com> |
Handle inter-expr dependencies properly We had a bug where we would never be able to solve a case if there are two expressions that trigger a circular dependency. a ? b : c b ? a : d We actually had some logic to partially elevate conditional dependencies but there were two issues with it: * LayoutInflator was caching shouldReadFlags permanently * There was a bug in how we resolve whether all potential evaluation paths are covered. (we were not using a cloned bitset but rather updating the original). I've fixed these two issues and added logic to partially elevate conditional expressions if they cannot be marked as fully read. Bug: 21324645 Change-Id: I779afb6dae48920196404d3cfbb5f8774686404d
ndroid/databinding/tool/expr/ExprModelTest.java
|
c96847768305d83c6bc4919432af9bd9bfe4c08e |
20-May-2015 |
George Mount <mount@google.com> |
Fix String.format expression. An expression @{String.format("%s", "test")} was failing for two reasons: the L.d was doing string concatenation and String wasn't imported and considered a StaticIdentifier. Change-Id: I67b4c880f1e147a5c1aac15b3b845d4112c6d00b
ndroid/databinding/tool/LayoutBinderTest.java
ndroid/databinding/tool/expr/ExprModelTest.java
|
0ba9cf91183c16e18f8055e9d08a6618f4f60019 |
20-May-2015 |
Yigit Boyar <yboyar@google.com> |
Merge "Properly handle constant binding expressions"
|
8533f27db6c31b0c295ae62d314dbf07ea640571 |
19-May-2015 |
Yigit Boyar <yboyar@google.com> |
Properly handle constant binding expressions Previously, we would assign each binding expression a flag id even if it is constant. This was necessary to be able to implement invalidateAll. Later, we've changed how invalidateAll works and assigned it a separate flag. Unfortunately, we were still incrementing ids for such binding expressions, causing index out of bounds exceptions during code generation in certain situations. This CL fixes that bug and does not add flags to constant binding expressions anymore. Bug: 21284295 Change-Id: I114bf34520d0b246426ce7d45b8c511cf6709778
ndroid/databinding/tool/expr/ExprModelTest.java
|
b9e4aa96812692a7dcf468445e64bc5b30d3c79a |
19-May-2015 |
George Mount <mount@google.com> |
Better handling of generics in BindingAdapters Bug 21277338 Handle <T> adapter(View, T value) Also test and fixes to support View<T> with multi-attribute adapters. Change-Id: I12bda5b235111762b55357fed7f163ccaf83838d
ndroid/databinding/tool/reflection/java/JavaClass.java
|
91d538470c011e19fa4375cc3531b5dd9ae01d55 |
15-May-2015 |
George Mount <mount@google.com> |
Fix generic setter on generic View. When a View is generic (e.g. MyView<T>), and a setter takes a generic parameter, the setter parameter didn't match the argument. Change-Id: I115ace5582b847bda792d75cf7aaf57ffc8bd4cd
ndroid/databinding/tool/reflection/java/JavaClass.java
|
019c36b97c7c172ac03997f6bf170e65b2ed7fe4 |
17-Apr-2015 |
Yigit Boyar <yboyar@google.com> |
Fix how final fields are handled There was a bug in Expression analyzer where if a field is final, it would return dynamic=false although its parent is dynamic. This CL changes that behavior such that if the parent of a field access is dynamic, then field access is dynamic unless it is static & final. If parent is not dynamic, (e.g. android.view.View) field is dynamic if an only if itself is dynamic. This CL also fixes another bug where if you have a bunch of expressions none of which can be invalidated, there would not be any flags to set thus we would not generate proper if statements. We were resolving tree properly but code-generation never worked in that situation. To overcome this issue, since there should always be a way to invalidate all bindings, I've added a flag to invalidate all, which is automatically included in each invalidate flag set. This does not bring any serious cost because we have flag inheritance in the generated code. I've also removed some code from LayoutBinderWriter that may create duplicate names. This was failing a test where a variable and View were given the same names. I changed these name uniqueness to be scope based so that we can create most readable w/o sacrificing correctness. Bug: 20341011 Change-Id: I0e98a5e28f250c36ae5de306f5ed99adffd20b59
ndroid/databinding/tool/expr/ExprModelTest.java
ndroid/databinding/tool/expr/ExprTest.java
|
ee7586713d68806b556a425cbebf007a56261ff3 |
17-Apr-2015 |
Yigit Boyar <yboyar@google.com> |
Add 3rd party licenses to fatJar This CL adds 3rd party licenses to compiler-fatJar so that we can use it in our build process w/o maven dependency. It also removes dependency on SDK folder for api level lookup by shipping versions.xml file with the bundle. It adds a new gradle task, preparePrebuilds, which bundsles all necessary builds to a prebuild folder which should be committed. These pre-builds will be used by the makefile to support make builds. Bug: 19945740 Change-Id: I0bba72bbb13770aba94317301217ddd842211e2d
ndroid/databinding/tool/SdkVersionTest.java
ndroid/databinding/tool/expr/ExprModelTest.java
ndroid/databinding/tool/reflection/SdkVersionTest.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
ndroid/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
ndroid/databinding/tool/MockLayoutBinder.java
|
29eed96672ca43d68d12605ad6f91814d4c53988 |
13-Apr-2015 |
George Mount <mount@google.com> |
Fix test breaks.
ndroid/databinding/tool/MockLayoutBinder.java
|
74f72d77b1db2b78ee6422da2ec94de12edcb6dc |
27-Mar-2015 |
Yigit Boyar <yboyar@google.com> |
Fix bugs related to how we handle Ternary ops This CL fixes two bugs. 1) When a Ternary operation was inside another operation, we were not handling dependecies properly and model would think that the container expression can be evaluated before Ternary is evaluated, eventually causing an exception in code-gen because Ternay is not calculated yet. 2) This also fixes another bug where when ?? is used, we would put ifTrue and ifFalse statements in wrong order and eventually evaluate !??. Bug: 19939148 Change-Id: I3e1d2bee172e47412bb8ef9e7c785aef47337155
ndroid/databinding/tool/expr/ExprModelTest.java
|
fead9ca09b117136b35bc5bf137340a754f9eddd |
23-Mar-2015 |
George Mount <mount@google.com> |
Move to package android.databinding.
ndroid/databinding/CallbackRegistryTest.java
ndroid/databinding/tool/ExpressionVisitorTest.java
ndroid/databinding/tool/LayoutBinderTest.java
ndroid/databinding/tool/MockLayoutBinder.java
ndroid/databinding/tool/SdkVersionTest.java
ndroid/databinding/tool/expr/ExprModelTest.java
ndroid/databinding/tool/expr/ExprTest.java
ndroid/databinding/tool/reflection/java/JavaAnalyzer.java
ndroid/databinding/tool/reflection/java/JavaClass.java
ndroid/databinding/tool/reflection/java/JavaField.java
ndroid/databinding/tool/reflection/java/JavaMethod.java
ndroid/databinding/tool/reflection/java/JavaTypeUtil.java
ndroid/databinding/tool/writer/FlagSetTest.java
om/android/databinding/ExpressionVisitorTest.java
om/android/databinding/LayoutBinderTest.java
om/android/databinding/MockLayoutBinder.java
om/android/databinding/SdkVersionTest.java
om/android/databinding/expr/ExprModelTest.java
om/android/databinding/expr/ExprTest.java
om/android/databinding/reflection/java/JavaAnalyzer.java
om/android/databinding/reflection/java/JavaClass.java
om/android/databinding/reflection/java/JavaField.java
om/android/databinding/reflection/java/JavaMethod.java
om/android/databinding/reflection/java/JavaTypeUtil.java
om/android/databinding/writer/FlagSetTest.java
|
fa9fe12980ef1103fabe33bf5ff0e2f53042a204 |
18-Mar-2015 |
George Mount <mount@google.com> |
Move common parts of AnnotationAnalyzer methods to ModelAnalyzer. Bug 19643846 Bug 19627630 Also made it so that setter methods will auto-cast from Object when necessary. This is useful for heterogenous map objects where .get(id) may return an Integer or a String or a Drawable. Change-Id: Iacfd739ea4938f38b584a8eab9193f1fd4071df1
om/android/databinding/reflection/java/JavaAnalyzer.java
om/android/databinding/reflection/java/JavaClass.java
om/android/databinding/reflection/java/JavaField.java
om/android/databinding/reflection/java/JavaMethod.java
|
a6e4583962e19e8e93b4ca3f9fe3d34560b6d96c |
13-Mar-2015 |
Yigit Boyar <yboyar@google.com> |
Support for multi module setups This CL adds support for building multi module apps with proper context. For library modules, we only generate base classes in the initial compilation. We also generate a temporary BR file which does not have final methods. When final app is being generated, all layout binders, adapters and Bindable information gets merged and all final classes are generated in their appropriate packages. This CL also adds support for Test runs and any number of build variants. Bug: 19714904 Change-Id: I9b50b54db05f3fa206eec33709d43c2ac94a9e5e
om/android/databinding/MockLayoutBinder.java
om/android/databinding/reflection/java/JavaAnalyzer.java
|
4c5cc009bcbcfb19e33fb19db5ec80f83f7b3326 |
12-Mar-2015 |
George Mount <mount@google.com> |
Use abstract base class instead of interfaces for Binding objects. Bug 19627511 Bug 19709604 Changed generated classes to end with "Binding" instead of "Binder" to avoid confusion with Android Binders. Removed DataBinder class and moved the important aspects of its contents to ViewDataBinding. Improved mapping of Views in included layouts. Avoid traversing included layouts while looking for bound expressions. Change-Id: I1f28093b0792d5428d07192f1fc458a5b4b788b2
om/android/databinding/reflection/java/JavaAnalyzer.java
|
895b618d9c6e3deb56465d0759cda57f50c46214 |
12-Mar-2015 |
Yigit Boyar <yboyar@google.com> |
Downgrade to java 1.6 This CL removes java 1.7 code so that we can easily integrate w/ Idea. It also partially removes dependency on ModelAnalyzer for interface generation so that we can call it from the Idea plugin. Change-Id: Id7616987f5660911e951ddf20dacd4f407dacbd9
om/android/databinding/MockLayoutBinder.java
om/android/databinding/reflection/java/JavaAnalyzer.java
om/android/databinding/reflection/java/JavaClass.java
|
97d6ddf47f4ff1abb3ed5201ce5232163f5325b1 |
04-Mar-2015 |
Yigit Boyar <yboyar@google.com> |
Check API version for methods called via binding In data binding, setting an attribute actually means calling a method, which might be an issue if the method is added after a certain API. This CL introduces a change which will check called methods per api and add necessary API check code to avoid calling those methods in older platforms. This CL also resurrects the Java Model Analyzer (in testing) and also fixes compiler tests. Bug: 19593398 Change-Id: I0da4194625231cf43125e1b43338069e7d191eb9
om/android/databinding/ExpressionVisitorTest.java
om/android/databinding/LayoutBinderTest.java
om/android/databinding/MockBindable.java
om/android/databinding/MockIViewDataBinder.java
om/android/databinding/MockLayoutBinder.java
om/android/databinding/MockObservable.java
om/android/databinding/MockObservableLsit.java
om/android/databinding/MockObservableMap.java
om/android/databinding/SdkVersionTest.java
om/android/databinding/expr/ExprModelTest.java
om/android/databinding/expr/ExprTest.java
om/android/databinding/reflection/java/JavaAnalyzer.java
om/android/databinding/reflection/java/JavaClass.java
om/android/databinding/reflection/java/JavaField.java
om/android/databinding/reflection/java/JavaMethod.java
om/android/databinding/reflection/java/JavaTypeUtil.java
|
a7e767e576adebcddf043ad34ccb8dd167f777b3 |
20-Feb-2015 |
George Mount <mount@google.com> |
Added support for imports in type checking. findType did not support user-defined imports, so casting, for example, of Foo<String> didn't recognize Foo or String. This also will import java.lang.* by default.
om/android/databinding/LayoutBinderTest.java
|
a70fed6415aa1e8bbbe929aee776402ac3b81c86 |
20-Feb-2015 |
George Mount <mount@google.com> |
Fix broken static import with alias. Added tests to ensure they don't break again.
om/android/databinding/ExpressionVisitorTest.java
om/android/databinding/LayoutBinderTest.java
|
79fc7f3727815ab35bb1bb2e060bfb7db3176eed |
18-Feb-2015 |
George Mount <mount@google.com> |
Removed reflection-based implementations and renamed classes. Renamed Model* classes to Annotation* Renamed Reflection* classes to Model* Removed Class* classes -- they are no longer needed. The names were confusing. I think this is better.
om/android/databinding/ExpressionVisitorTest.java
om/android/databinding/LayoutBinderTest.java
om/android/databinding/expr/ExprModelTest.java
om/android/databinding/expr/ExprTest.java
|
e6c6d3bf4fac3fa11c5780cfd3bc14cdb0caaea1 |
10-Feb-2015 |
George Mount <mount@google.com> |
Prepare ClassAnalyzer to be replaced by other implementations. ClassAnalyzer uses normal reflection. We intend to move to an Annotation Processor and possibly an Android Studio plugin version of type interaction as well. This abstracts the type interaction to prepare. Change-Id: I2b95ea9074bca7e3053aeadcd3692dffe93b41d6
om/android/databinding/ExpressionVisitorTest.java
om/android/databinding/LayoutBinderTest.java
om/android/databinding/expr/ExprModelTest.java
om/android/databinding/expr/ExprTest.java
|
9e20571da789c7d50650513c38d5a333b11b9fd3 |
10-Feb-2015 |
Yigit Boyar <yboyar@google.com> |
Fix how we handle non-bindable fields in Observable objects Change-Id: Ia33200a2ade3bd3ed8d3a66e1602a04111f4387a
om/android/databinding/MockIViewDataBinder.java
|
0fa158e8aa91297cc246e3bb9e5d1388dc2355cc |
27-Jan-2015 |
Yigit Boyar <yboyar@google.com> |
more integration tests Change-Id: I275ab3b41930694acd5db3875a5b4265a19581ca
om/android/databinding/MockObservableLsit.java
om/android/databinding/MockObservableMap.java
om/android/databinding/expr/ExprModelTest.java
|
dc69f49d687ec036947f26a9bf9025a305de0721 |
26-Jan-2015 |
Yigit Boyar <yboyar@google.com> |
properly handle expressions which are static. Also make bindable a runtime expression so that we can read it in the compiler Change-Id: Id8f6cdf010dde61d64a20841557c3b997916fbf9
om/android/databinding/expr/ExprModelTest.java
|
bfb7b3b8813a3eec0123a95a6fee6fdb0dcaa367 |
22-Jan-2015 |
Yigit Boyar <yboyar@google.com> |
fixed tests
om/android/databinding/ExpressionVisitorTest.java
om/android/databinding/LayoutBinderTest.java
om/android/databinding/MockBindable.java
om/android/databinding/MockObservable.java
om/android/databinding/writer/FlagSetTest.java
om/android/databinding2/ExpressionVisitorTest.java
om/android/databinding2/LayoutBinderTest.java
om/android/databinding2/MockBindable.java
om/android/databinding2/MockObservable.java
|
43596c2b2997e40b709627419732100d78a62ff0 |
22-Jan-2015 |
Yigit Boyar <yboyar@google.com> |
Cleanup previous layout generators. Change-Id: Ib55038fa762561ad69c3936e5731f2a27998c87f
om/android/databinding/expr/ExprModelTest.java
om/android/databinding/expr/ExprTest.java
om/android/databinding/writer/FlagSetTest.java
om/android/databinding2/ExpressionVisitorTest.java
om/android/databinding2/LayoutBinderTest.java
om/android/databinding2/expr/ExprModelTest.java
om/android/databinding2/expr/ExprTest.java
om/android/databinding2/writer/FlagSetTest.java
|
d7af42b29ddf22f0068f7496c5ac6f4f34b543b6 |
09-Jan-2015 |
Yigit Boyar <yboyar@google.com> |
WIP Moved models to Java, refactored expressions to have proper dependencies, added tests Change-Id: I863787a3ed76ecc397b677cfd110aa7aba99cb38
om/android/databinding2/ExpressionVisitorTest.java
om/android/databinding2/LayoutBinderTest.java
om/android/databinding2/MockBindable.java
om/android/databinding2/MockObservable.java
om/android/databinding2/expr/ExprModelTest.java
om/android/databinding2/expr/ExprTest.java
om/android/databinding2/writer/FlagSetTest.java
|