• Home
  • History
  • Annotate
  • only in /frameworks/data-binding/compiler/src/main/java/android/databinding/
History log of /frameworks/data-binding/compiler/src/main/java/android/databinding/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
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
ool/CompilerChef.java
ool/ExpressionParser.java
ool/ExpressionVisitor.java
ool/LayoutBinder.java
ool/expr/ExprModel.java
ool/expr/ResourceExpr.java
15b6682cf3505b117329e2190967c92a89b179e9 08-Apr-2016 Yigit Boyar <yboyar@google.com> Move to org.antlr from tunnelvision

We were using a version of antlr that is published by
tunnelvision which works fine but this becomes a problem
when another gradle plugin wants to depend on antlr as
well. It is best if we depend on the original one to
avoid conflicts with other libs.

Bug: 27175207
Change-Id: I0a87f9902361ace5dc6d03d838e2ad431c844de8
ool/ExpressionParser.java
ool/ExpressionVisitor.java
ool/LayoutBinder.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
ool/expr/Expr.java
ool/expr/ExprModel.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
ool/CompilerChef.java
ool/expr/MathExpr.java
ool/reflection/InjectedBindingClass.java
ool/reflection/InjectedBindingClassField.java
ool/reflection/InjectedBindingClassMethod.java
ool/reflection/InjectedClass.java
ool/reflection/InjectedField.java
ool/reflection/InjectedMethod.java
ool/reflection/ModelAnalyzer.java
ool/reflection/ModelMethod.java
c0c1dab0b6254e4d27f18c37a72a9e7952e958a0 02-Mar-2016 George Mount <mount@google.com> Support for java 8 method reference syntax.

Bug 26937350

Our event handling syntax is obj.method, where java 8
uses the syntax obj::method. This adds support for
the java 8 syntax and adds a deprecation warning for
the old syntax.

Change-Id: Ideb0570c2646f674da031f642ed3369e8c5fcd3b
ool/ExpressionVisitor.java
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/expr/ListenerExpr.java
ool/expr/MethodBaseExpr.java
ool/expr/MethodReferenceExpr.java
ool/expr/ObservableFieldExpr.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
ool/Binding.java
ool/BindingTarget.java
ool/CompilerChef.java
ool/InverseBinding.java
ool/LayoutBinder.java
ool/expr/ArgListExpr.java
ool/expr/BitShiftExpr.java
ool/expr/BracketExpr.java
ool/expr/BuiltInVariableExpr.java
ool/expr/CallbackArgExpr.java
ool/expr/CallbackExprModel.java
ool/expr/CastExpr.java
ool/expr/ComparisonExpr.java
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/expr/FieldAssignmentExpr.java
ool/expr/IdentifierExpr.java
ool/expr/InstanceOfExpr.java
ool/expr/LambdaExpr.java
ool/expr/ListenerExpr.java
ool/expr/MathExpr.java
ool/expr/MethodCallExpr.java
ool/expr/ObservableFieldExpr.java
ool/expr/ResourceExpr.java
ool/expr/StaticIdentifierExpr.java
ool/expr/SymbolExpr.java
ool/expr/TernaryExpr.java
ool/expr/TwoWayListenerExpr.java
ool/expr/UnaryExpr.java
ool/expr/ViewFieldExpr.java
ool/reflection/InjectedBindingClass.java
ool/reflection/InjectedBindingClassField.java
ool/reflection/InjectedBindingClassMethod.java
ool/reflection/ModelAnalyzer.java
ool/reflection/ModelClass.java
ool/reflection/ModelMethod.java
ool/reflection/annotation/AnnotationAnalyzer.java
ool/reflection/annotation/AnnotationClass.java
ool/reflection/annotation/AnnotationMethod.java
ool/store/SetterStore.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
ool/ExpressionVisitor.java
ool/expr/ExprModel.java
ool/expr/GroupExpr.java
09f8e10e2a49a075da8bb2f64853377c5e37045a 17-Feb-2016 Yigit Boyar <yboyar@google.com> Allow ObservableFields to be Bindable.

This CL fixes a bug where if a field/accessor is Observable and
Bindable, it would not be assigned a BR id, resulting in
malformed generated code.

Bug: 26922185
Change-Id: Ia3d11204460fc1967f0a7b60ed7cba1d3698098d
ool/expr/FieldAccessExpr.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
ool/Binding.java
ool/BindingTarget.java
ool/CallbackWrapper.java
ool/DataBinder.java
ool/ExpressionVisitor.java
ool/LayoutBinder.java
ool/expr/BracketExpr.java
ool/expr/CallbackArgExpr.java
ool/expr/CallbackExprModel.java
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/expr/IdentifierExpr.java
ool/expr/LambdaExpr.java
ool/expr/MathExpr.java
ool/expr/MethodCallExpr.java
ool/expr/SymbolExpr.java
ool/expr/TernaryExpr.java
ool/reflection/Callable.java
ool/reflection/ModelAnalyzer.java
ool/reflection/ModelClass.java
ool/reflection/ModelMethod.java
ool/reflection/annotation/AnnotationAnalyzer.java
ool/reflection/annotation/AnnotationClass.java
ool/solver/ExecutionBranch.java
ool/solver/ExecutionPath.java
ool/writer/CallbackWrapperWriter.kt
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
ool/expr/BracketExpr.java
ool/expr/VersionProvider.java
99d74030fe5856572bd4b569bc04d2a11258f202 14-Jan-2016 George Mount <mount@google.com> Fixed warning when using a color resource.

Bug 26254496

Change-Id: Ied6b942fada3a99ec331ad59f2f5ee6e6c33a20b
nnotationprocessor/ProcessDataBinding.java
ool/expr/ResourceExpr.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
nnotationprocessor/ProcessMethodAdapters.java
ool/Binding.java
ool/BindingTarget.java
ool/InverseBinding.java
ool/LayoutBinder.java
ool/MergedBinding.java
ool/expr/ArgListExpr.java
ool/expr/BitShiftExpr.java
ool/expr/BracketExpr.java
ool/expr/BuiltInVariableExpr.java
ool/expr/CastExpr.java
ool/expr/ComparisonExpr.java
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/expr/GroupExpr.java
ool/expr/IdentifierExpr.java
ool/expr/InstanceOfExpr.java
ool/expr/ListenerExpr.java
ool/expr/MathExpr.java
ool/expr/MethodCallExpr.java
ool/expr/ResourceExpr.java
ool/expr/StaticIdentifierExpr.java
ool/expr/SymbolExpr.java
ool/expr/TernaryExpr.java
ool/expr/TwoWayListenerExpr.java
ool/expr/UnaryExpr.java
ool/expr/ViewFieldExpr.java
ool/reflection/Callable.java
ool/reflection/ModelClass.java
ool/reflection/annotation/AnnotationAnalyzer.java
ool/reflection/annotation/AnnotationMethod.java
ool/store/SetterStore.java
4ba16229a40e9758db86d4fb1df5119fdcb8aa2a 22-Dec-2015 Deepanshu Gupta <deepanshu@google.com> Change from commons-lang3 to guava

Change-Id: I1a18e06af7bf2d65228f1491663b6e096a9538ed
nnotationprocessor/ProcessExpressions.java
ool/ExpressionParser.java
ool/ExpressionVisitor.java
ool/reflection/ModelClass.java
ool/store/SetterStore.java
1cd7d1209b1e3eec10cb2dd78b172b0d344008df 16-Nov-2015 George Mount <mount@google.com> Merge "Don't use DynamicUtil now that 1.0-rc5 has been released." into studio-master-dev
1907fd71019ef16d4fc2953d56f1ec0702275aa0 15-Nov-2015 Yigit Boyar <yboyar@google.com> Load intermediate files as Interface

Change-Id: I6e07443d7d51eaad0d655f4fcd2e3e43ef14bdc8
nnotationprocessor/ProcessExpressions.java
90004de4330158be2351b9e26ba951f2ccbccfce 14-Nov-2015 George Mount <mount@google.com> Don't use DynamicUtil now that 1.0-rc5 has been released.

Change-Id: I017049ba3fb3c0d66982f504192d6a2814859f9a
nnotationprocessor/ProcessDataBinding.java
ool/expr/ResourceExpr.java
28e7064d455e2ef9da31c817dfc05ec7405c60df 11-Nov-2015 Yigit Boyar <yboyar@google.com> Override layout file metadata from module

If a layout file is inherited from a module but also exists
in the app, w~e force the app version to the metadata of the
module version. This means forcing its created class location
to be the same as the module. This usually happens when gradle
or aapt generates some layout during app compilation.

Bug: 25369165
Change-Id: I5d2002ac04d16cfe9935fe5580548344b19b4aca
nnotationprocessor/ProcessDataBinding.java
nnotationprocessor/ProcessExpressions.java
59229481aec5a284d322a2ca80dff836485feb0c 30-Oct-2015 Yigit Boyar <yboyar@google.com> upgrade kotlin to 1.0-beta1

Change-Id: I62b77fd118e2715d272a16d96b9083d2347f5fb1
ool/Binding.java
ool/BindingTarget.java
ool/LayoutBinder.java
ool/MergedBinding.java
ool/expr/Expr.java
ool/expr/IdentifierExpr.java
ool/expr/ListenerExpr.java
83a8c9d56cba07985d611ce7df47346b94742336 23-Oct-2015 George Mount <mount@google.com> Add targetSdk check for DynamicUtil.

Change-Id: I271b3fc364c2d8689f22e0555174a8ca30bc04b5
ool/CompilerChef.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
nnotationprocessor/ProcessBindable.java
nnotationprocessor/ProcessDataBinding.java
nnotationprocessor/ProcessExpressions.java
ool/BindingTarget.java
ool/MakeCopy.java
ool/MergedBinding.java
ool/expr/BuiltInVariableExpr.java
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/IdentifierExpr.java
ool/expr/ListenerExpr.java
ool/expr/MethodCallExpr.java
ool/expr/ResourceExpr.java
ool/expr/SymbolExpr.java
ool/expr/TernaryExpr.java
ool/reflection/SdkUtil.java
ool/reflection/annotation/AnnotationAnalyzer.java
ool/store/SetterStore.java
ool/util/GenerationalClassUtil.java
bdc7aa8269502b3fc3ce73c124e4f1b2092502c9 23-Oct-2015 George Mount <mount@google.com> Use a dynamically-generated class to relax requirement to upgrade.

We may need some static methods between releases and instead of
requiring a release, we can now supply the methods as a dynamically
generated class, DynamicUtil

Change-Id: I9d53ae99b4b5717cd4780efdcb7a3f85bfac8dd9
nnotationprocessor/ProcessDataBinding.java
ool/CompilerChef.java
ool/expr/ResourceExpr.java
da97a54b679e19f4f40e23d290816093870956af 19-Oct-2015 George Mount <mount@google.com> Merge "Load drawables using the theme when necessary." into studio-master-dev
88ce44ccc65e74a8553244ca246cc9f4c48483e0 15-Oct-2015 Yigit Boyar <yboyar@google.com> Create BR id from Callable

This CL fixes a bug where if an expression maps into a method
with a different name, we would create the BR id from the
expression instead of the referenced method.

Bug: 24973950
Change-Id: Ia57c31d926a737c9fc84775780aeb5e617769d43
ool/expr/FieldAccessExpr.java
ool/expr/MethodCallExpr.java
ool/reflection/Callable.java
ool/reflection/ModelClass.java
ool/util/BrNameUtil.java
d0bb3f1e1a94747bb3dd8bd2fee315d8816f0f5d 14-Oct-2015 George Mount <mount@google.com> Load drawables using the theme when necessary.

Bug 24936186

Drawables could be loaded from themed resources as of L (v21),
so the Theme should be used to load those resources.

The same is true for ColorStateList in M (v23).

Change-Id: I3e6d7a55ff7fe744ed872f83f550abfb018a3df8
ool/expr/ResourceExpr.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
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/TernaryExpr.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
ool/ExpressionParser.java
ool/LayoutBinder.java
219d16f518d161d9fcc1f0eca950863105990568 05-Oct-2015 George Mount <mount@google.com> Merge "Fix resolving listeners for multi-attribute binding adapters." into studio-master-dev
975c05c00dae9193a636c4775df81d8665fc6749 30-Sep-2015 George Mount <mount@google.com> Fix resolving listeners for multi-attribute binding adapters.

Bug 24538724

Change-Id: I39a72fd701abf9d2368d2a0a7fc5a4c1ac63c0a0
ool/Binding.java
ool/BindingTarget.java
ool/LayoutBinder.java
ool/MergedBinding.java
74c69a5dfad22472ceace07480e564610dc481e0 30-Sep-2015 Yigit Boyar <yboyar@google.com> Merge "Load full SDK table" into studio-master-dev
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
ool/reflection/SdkUtil.java
a128d1c99ea98bb48c45d648906652e3d618d513 29-Sep-2015 George Mount <mount@google.com> Bring all instance BindingAdapters into Component.

This also uses a non-arbitrary ordering for name clashes.

Bug 24407912

Change-Id: Ibd96adfb979af86370889acb7b60c1b6953b190d
ool/Binding.java
ool/DataBinder.java
ool/MergedBinding.java
ool/store/SetterStore.java
ool/writer/ComponentWriter.java
7c1b078ca84336caba7f811709836562bd5550d6 17-Sep-2015 George Mount <mount@google.com> Add context as an automatic variable.

Bug 24136218

Change-Id: I0996ac8d3b42d29fbfe1c14da1343e05954c3bef
ool/LayoutBinder.java
ool/expr/BuiltInVariableExpr.java
ool/expr/ExprModel.java
1f1f50563ad8166e3cd2be64b705ae583834540d 11-Sep-2015 Yigit Boyar <yboyar@google.com> Shift Long in FlagSet instead of int :/

Bug: 23979611
Change-Id: I7825a718dddd1c15d598f19a4fe8722ddc5a5763
ool/writer/FlagSet.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
ool/expr/BracketExpr.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
ool/expr/Expr.java
ool/expr/ExprModel.java
bd42d20f70b1f88e27e3b3c9c3a9c55ec155d128 25-Aug-2015 George Mount <mount@google.com> Support generics in conversion parameters.

Bug 23490384

Change-Id: I691da60a671d15c73cf2753ff830f9effb360e96
ool/reflection/ModelClass.java
ool/reflection/annotation/AnnotationClass.java
ool/store/SetterStore.java
23910cf498c35704a03ba4f3889de2ab97ccbe21 25-Aug-2015 George Mount <mount@google.com> Make setVariable return true for declared variables.

Bug 23518718

Change-Id: Ic147421aefe0adbf576285ca642334fcb907abfb
ool/LayoutBinder.java
ool/expr/IdentifierExpr.java
70eac8c30b5cd1b357bc23b32bb56f81416c54d6 26-Aug-2015 George Mount <mount@google.com> Merge "Fix access to static field of generic object." into studio-master-dev
e0d5ed7613cb72192430cd2ed8e4159618ca308e 25-Aug-2015 George Mount <mount@google.com> Fix NPE when evaluating bracket expressions.

Bug 23498104

Change-Id: I8de149e573721485b916ae6ae692113f3ed2990d
ool/expr/BracketExpr.java
ool/reflection/annotation/AnnotationClass.java
23ad7265de1729abdcda4fc3dbae5f7e6818c6ac 24-Aug-2015 George Mount <mount@google.com> Fix access to static field of generic object.

Bug 23491360

Change-Id: I94c62b67dfa8f8bd4c7f9fb5ab1adff4a927f77b
ool/reflection/annotation/AnnotationClass.java
97758524d3953793b50e3e0121ef3cbdc047b35b 19-Aug-2015 George Mount <mount@google.com> Remove automatic converstions to Object.

Bug 23348140

Change-Id: I6bdcb0982c2e755dc4ad0eb53b35e07d1ac9ebed
ool/store/SetterStore.java
91beb3a1a89a58b1c0b6b874d889394a3be90b6c 06-Aug-2015 George Mount <mount@google.com> Fix ternary operator with null assigned to listener.

Bug 22907244

When finding a common type, null is an Object and
the listener is an interface, so the types don't
match.

Change-Id: I0c5a88ec02230767b894b2feda17a1a1c8cef9f7
ool/expr/TernaryExpr.java
ool/reflection/ModelAnalyzer.java
793e979f25e190162eacf46d6a4efc3efc1d2f91 31-Jul-2015 George Mount <mount@google.com> Support different event handlers having different API levels.

Bug 22957226

Change-Id: Ia08bcb857872eccad3340c14b8d10b78198b90a6
ool/Binding.java
ool/LayoutBinder.java
ool/MergedBinding.java
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/expr/ListenerExpr.java
ool/reflection/ModelClass.java
ool/store/SetterStore.java
a0820baa03e731f274ef55c5541e9fc101bbaddb 03-Aug-2015 George Mount <mount@google.com> Combine like conditions for efficiency.

Bug 22957163

Change-Id: If35430c966900ff9af56375152441e28066a4c89
ool/writer/FlagSet.java
96b22e7bbbf942aea1079dc8e8d0c4657663e5a7 30-Jul-2015 George Mount <mount@google.com> Multiple adapter attributes can now have optional expressions.

Bug 22957032

Change-Id: If1b04262009a1edf311d097c65e97b194103906e
nnotationprocessor/ProcessMethodAdapters.java
ool/store/SetterStore.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
ool/Binding.java
ool/MergedBinding.java
ool/expr/ArgListExpr.java
ool/expr/BitShiftExpr.java
ool/expr/BracketExpr.java
ool/expr/CastExpr.java
ool/expr/ComparisonExpr.java
ool/expr/Expr.java
ool/expr/FieldAccessExpr.java
ool/expr/GroupExpr.java
ool/expr/IdentifierExpr.java
ool/expr/InstanceOfExpr.java
ool/expr/MathExpr.java
ool/expr/MethodCallExpr.java
ool/expr/ResourceExpr.java
ool/expr/StaticIdentifierExpr.java
ool/expr/SymbolExpr.java
ool/expr/TernaryExpr.java
ool/expr/UnaryExpr.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
ool/expr/Expr.java
a649c6ce3f6eb4882221e77a1d27e0d28c4c13a0 15-Jul-2015 George Mount <mount@google.com> Fix compilation tests.

Bug 22489623

Change-Id: Id948b2fcc4496dd5e94b6047dd6e4758cbfa5159
nnotationprocessor/ProcessExpressions.java
e4cd38824a6627b9fef229c549c636e35ad63b5f 07-Jul-2015 George Mount <mount@google.com> Support dependency injection.

Bug 22389109

Change-Id: Iec63375c5412edc03b4808ee129a7596b61bf9e6
nnotationprocessor/ProcessExpressions.java
nnotationprocessor/ProcessMethodAdapters.java
ool/Binding.java
ool/CompilerChef.java
ool/DataBinder.java
ool/LayoutBinder.java
ool/MergedBinding.java
ool/store/SetterStore.java
ool/writer/ComponentWriter.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
nnotationprocessor/BuildInfoUtil.java
b15fd21ad1821b5e6a1c0c4977bc24c01d6bc7ce 01-Jul-2015 Yigit Boyar <yboyar@google.com> Merge "Introduce Scopes to track logical stack traces" into mnc-dev
e8609ca3a9e95cb730d74f8a6114bc2ae11b6a10 30-Jun-2015 Yigit Boyar <yboyar@google.com> Add cache to GenerationalClassUtil to avoid re-reading jars

Bug:22185294
Change-Id: I0c9def9944ecc68e7e5df530228d00011c1f8c57
nnotationprocessor/ProcessBindable.java
nnotationprocessor/ProcessDataBinding.java
nnotationprocessor/ProcessExpressions.java
ool/store/SetterStore.java
ool/util/GenerationalClassUtil.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
nnotationprocessor/ProcessDataBinding.java
ool/Binding.java
ool/BindingTarget.java
ool/DataBinder.java
ool/ExpressionParser.java
ool/LayoutBinder.java
ool/expr/BracketExpr.java
ool/expr/Expr.java
ool/expr/FieldAccessExpr.java
ool/expr/GroupExpr.java
ool/expr/IdentifierExpr.java
ool/expr/MethodCallExpr.java
ool/expr/UnaryExpr.java
4df4ba38a62b791bbbc25e923efe8d9c2f9a52e9 27-Jun-2015 Yigit Boyar <yboyar@google.com> Data binding startup improvement

This CL replaces how we map tags(string) to layout ids in the
generated DataBindingMapper class. Previously, we would create
a hashmap which was some unnecessary work in startup. The alternative
was using switch(string) but we did not want to require java 7.
This CL does what java 7's switch(string) would do thanks to the
well defined API of String.hashCode.

This CL also adds a method to DataBindingUtil to convert BR.ids
back to String for debugging purposes.

Bug: 22108735
Change-Id: I4b8ef816f4aac99b2963793dd46519b056ce4a30
nnotationprocessor/ProcessBindable.java
nnotationprocessor/ProcessDataBinding.java
nnotationprocessor/ProcessExpressions.java
ool/CompilerChef.java
ool/LayoutBinder.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
ool/ExpressionParser.java
ool/ExpressionVisitor.java
ool/LayoutBinder.java
ool/expr/Expr.java
ool/expr/ExprModel.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
nnotationprocessor/BuildInfoUtil.java
nnotationprocessor/ProcessBindable.java
nnotationprocessor/ProcessExpressions.java
nnotationprocessor/ProcessMethodAdapters.java
ool/BindingTarget.java
ool/ExpressionVisitor.java
ool/LayoutBinder.java
ool/MergedBinding.java
ool/expr/BitShiftExpr.java
ool/expr/BracketExpr.java
ool/expr/CastExpr.java
ool/expr/ComparisonExpr.java
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/expr/IdentifierExpr.java
ool/expr/InstanceOfExpr.java
ool/expr/MathExpr.java
ool/expr/MethodCallExpr.java
ool/expr/ResourceExpr.java
ool/expr/SymbolExpr.java
ool/expr/TernaryExpr.java
ool/expr/UnaryExpr.java
ool/reflection/ModelAnalyzer.java
ool/reflection/SdkUtil.java
ool/reflection/annotation/AnnotationAnalyzer.java
ool/store/SetterStore.java
0c2ed0cbaee2f206e926bfc780b05e9f1e52b551 24-Jun-2015 Yigit Boyar <yboyar@google.com> Remove guava dependency from the plugin

This CL is the first step in getting rid of guava dependency.
It removes guava from compilerCommon which in return removes
the dependency for the gradle plugin.

This CL also fixes compiler tests which were broken by the
listener CL.

Bug: 22047836
Change-Id: I43f87885c5291174f5bc694487fc6c075b480194
ool/expr/ExprModel.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
ool/Binding.java
ool/LayoutBinder.java
ool/MergedBinding.java
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/reflection/Callable.java
ool/reflection/ModelClass.java
ool/reflection/ModelMethod.java
ool/reflection/annotation/AnnotationClass.java
ool/reflection/annotation/AnnotationMethod.java
ool/store/SetterStore.java
af84cb304c158381a8bf0f0ac1c37c5a2ad04bfb 23-Jun-2015 Yigit Boyar <yboyar@google.com> Merge "Don't generate inflators for libraries" into mnc-dev
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.
ool/reflection/ModelAnalyzer.java
8b1da958f181639d33dfaa907c0ee66add2decd6 23-Jun-2015 Yigit Boyar <yboyar@google.com> Don't generate inflators for libraries

If a library project (A) depends on anohter library project (B),
we would generate code that accesses R file of project B while
compiling project A. Unfortunately, gradle does not generate that
R file when compiling A, it only exists when compiling the app
and B.
This CL changes the base class generation to not to generate
real code for base classes unless we are building the final app.

Bug: 22001270
Change-Id: Ic107001ab58c94016f37f7f6fc0470a822db3aa7
ool/DataBinder.java
ool/LayoutBinder.java
d37b47419005587c52ca4c099432327b7f06478d 19-Jun-2015 Yigit Boyar <yboyar@google.com> Make observables parcelable

We got some feedback where people want to keep their View presenter
classes parcelable. This CL makes observables parcelable and
their lists transient to allow this.

Bug: 21785040
Change-Id: I76adc7d7ca3876c83fd8749f6dbcf02a926c97c2
ool/reflection/ModelAnalyzer.java
6a62f1fff2a45c639b85c6cc12c00a1d8e9e98c9 17-Jun-2015 George Mount <mount@google.com> Merge "Support old values in binding adapters." into mnc-dev
20c7182163d99575d382e065f5a5fe45ed6b87e2 12-Jun-2015 George Mount <mount@google.com> Support old values in binding adapters.

Bug 21594573

When a binding adapter takes old values, the old values
are stored in the generated binding as fields.

Change-Id: Ib163d74720a8199d70ff6884d59fbe4e0d17fece
nnotationprocessor/ProcessMethodAdapters.java
ool/Binding.java
ool/MergedBinding.java
ool/store/SetterStore.java
0cb9fbb96197af013f4f879ed6cddf2681b88fd6 16-Jun-2015 Yigit Boyar <yboyar@google.com> Move shared code between build and compiler to a separate project

This CL encapsulates the shared code between build time and annotation
processing into a separate project. This project has no dependency on
kotlin so we can easily use it in gradle plugin.

Bug: 21815393
Change-Id: I9fd2e88885d06ff5423121747817ffcd056e8c74
ool/LayoutXmlProcessor.java
ool/reflection/annotation/AnnotationAnalyzer.java
ool/store/LayoutFileParser.java
ool/store/ResourceBundle.java
ool/store/SetterStore.java
ool/util/L.java
ool/writer/JavaFileWriter.java
5d22cc076ccddf9fc94cc2261f6962864e04a586 15-Jun-2015 George Mount <mount@google.com> Merge "Remove fragment data binding." into mnc-dev
ad34a89c8ae0814403107014ebbe8a40069ffe6b 15-Jun-2015 Yigit Boyar <yboyar@google.com> Merge changes Ida966e4b,Ibeed24bd into mnc-dev

* changes:
Remove kotlin from gradle plugin
Export generated class list from javac
d6527ee28cc3aa05818799af8def9593346f91bc 15-Jun-2015 George Mount <mount@google.com> Remove fragment data binding.

Fragment data binding is much more complex than the previous
implementation supported. It may be that we don't want to support
data binding to fragments because fragment life cycle differs
from View life cycle, including back stack support.

I made it so that fragments with IDs do not get public final
fields on the generated data binding objects.

Bug 21667601

Change-Id: Ief77972ea854f7ded5a93aa59822d76ef533fc21
ool/Binding.java
ool/BindingTarget.java
ool/store/LayoutFileParser.java
ool/store/ResourceBundle.java
0d6e2b8ac5e9e8635adf95c4166dd26441c51997 13-Jun-2015 Yigit Boyar <yboyar@google.com> Fix public field resolution

This CL fixes a bug where if a field is prefixed w/ one of our private
field conventions, we would not be able to find it because we would
strip it.

Now, when searching fields, we'll also look for exact match as we
do for methods.

Bug: 21807334
ool/reflection/ModelClass.java
b6887f1479c3ecec38a7989748ef33de1fbcd973 12-Jun-2015 Yigit Boyar <yboyar@google.com> Export generated class list from javac

Previously, gradle plugin would figure out generated class names
that should be excluded from the packaging. This CL changes that
behavior to export the list from java compiler so that it is
consistent going forward.

This CL also changes exclusion task to always exclude generated
binding info class to not to leak any information about user's
local.

Bug: 21668472
Change-Id: Ibeed24bd854781942b4185f618a5cd1eafe706d3
nnotationprocessor/ProcessExpressions.java
ool/CompilerChef.java
ool/DataBinder.java
ool/LayoutXmlProcessor.java
ool/MakeCopy.java
0792cfc12b4854c377f6e72a02b4e74bae95aa0c 11-Jun-2015 Yigit Boyar <yboyar@google.com> Merge "Improve static method / field handling" into mnc-dev
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
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/expr/MethodCallExpr.java
ool/reflection/ModelClass.java
4d4979490e1fa374c0d7f3599fed0a9e83a579d0 08-Jun-2015 George Mount <mount@google.com> Support data binding for fragments.

Bug 21667601

Change-Id: I636dec1bbb5567d70a996e115e6bf8322c3aa29d
ool/Binding.java
ool/BindingTarget.java
ool/LayoutXmlProcessor.java
ool/MakeCopy.java
ool/store/LayoutFileParser.java
ool/store/ResourceBundle.java
c4a07bddb4dd5c3bfbecf4d87909c5b447ae56dc 05-Jun-2015 George Mount <mount@google.com> Only create case statements for Bindable attributes.

Bug: 21571818
Change-Id: Id03c7a7de6e39d7f59da6cda11d3311f072addd0
ool/expr/FieldAccessExpr.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
nnotationprocessor/AnnotationUtil.java
nnotationprocessor/BuildInfoUtil.java
nnotationprocessor/ProcessBindable.java
nnotationprocessor/ProcessDataBinding.java
nnotationprocessor/ProcessExpressions.java
nnotationprocessor/ProcessMethodAdapters.java
ool/LayoutXmlProcessor.java
ool/util/L.java
d911e414a989cad68befdeb554580d59ad81f04a 21-May-2015 Yigit Boyar <yboyar@google.com> Update version to rv0, disable debug logs
ool/util/L.java
75da807698ae0f3b857d8160541cb03bb5ee1028 20-May-2015 Yigit Boyar <yboyar@google.com> Handle spaces in file paths

If file path has spaces, we were not handling them properly.
I've replaced the code with what android studio does so they
should be consistent.

Bug: 21283108
ool/store/LayoutFileParser.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
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/VersionProvider.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
ool/LayoutBinder.java
ool/expr/ExprModel.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
ool/expr/Expr.java
ool/expr/ExprModel.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
ool/reflection/ModelClass.java
ool/reflection/annotation/AnnotationAnalyzer.java
ool/reflection/annotation/AnnotationClass.java
ool/store/SetterStore.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
ool/reflection/ModelClass.java
ool/reflection/annotation/AnnotationClass.java
ool/store/SetterStore.java
1bbaf7cdf7f9d93ae09365192abb2288cf0dfb41 15-May-2015 George Mount <mount@google.com> Always generate the DataBinderMapper.java class

When a project first enables data binding, it may
not have any layout files with binding expressions.
The DataBinderMapper class should be generated to
avoid a linking error.

Bug 19945740

Change-Id: I6d8e12649c71f88e59463d7cfb2d8f260ff1eb7c
ool/CompilerChef.java
1331801c598a377a2c16e1aed8f975b728adc06e 14-May-2015 George Mount <mount@google.com> Give warning when BindingAdapter uses namespace.

Bug 20725101

Change-Id: Ia1cf0d5fc886a6e5ebc9090fefa77ea6f1e3ca46
ool/store/SetterStore.java
ool/util/L.java
f6e8d6516561432dd1c0f3014be7405a5dcd251b 14-May-2015 George Mount <mount@google.com> Merge "Generate Binding class when <layout> exists."
f701e1aa21a5ec74f4eb67030ced2704a90c7d5e 14-May-2015 Yigit Boyar <yboyar@google.com> Merge "Add webview, surface view and texture view"
5f3aae011cc291c2abbb90215c2e6f89a5f2626d 13-May-2015 George Mount <mount@google.com> Give an error if attribute is used when no setter is available.

Bug 20979710

This only prevents invalid setter calls for Views, not for
Bindings, such as used with includes.
ool/reflection/ModelClass.java
ool/store/SetterStore.java
4eb96071f10f4c65aaade8c8b76dc0bdc350f671 08-May-2015 George Mount <mount@google.com> Generate Binding class when <layout> exists.

Whenever a <layout> element exists we'll generate a Binding class.

Change-Id: I4f6ea25f4934b36cb617dbdd6a0f21bee1023a59
ool/store/LayoutFileParser.java
a97508c49c11bbc92722192890ca43a3bf6d3036 13-May-2015 Yigit Boyar <yboyar@google.com> Add webview, surface view and texture view

We were missing these items from the list of packages which are not
in android.widget

Bug: 21091253
ool/store/ResourceBundle.java
c619d8f69127c1200103d8119101c5f0675661d0 01-May-2015 George Mount <mount@google.com> Have BindingMethod use Class instead of String.

Bug 20720873
ool/store/SetterStore.java
30cc484507f3dfd7a3c56e5f785c4783e3e0da9d 30-Apr-2015 George Mount <mount@google.com> Add tool determining files that need stripping from artifact.

Also, modified the command line to take an optional parameter
[-l] to inform whether or not this is a library.

Change-Id: I6b1e96ae64bfa7ce2b2c685bbd64f0021a3bed42
ool/LayoutXmlProcessor.java
ool/MakeCopy.java
e9b33bac04bb1ce1444d7f1744fcec1ecd3a57da 30-Apr-2015 Yigit Boyar <yboyar@google.com> Support multi-param adapters in code generation

Bug: 19800022

Change-Id: I40c4ac72f24f965db12fd1c7dec6591184160ae5
ool/Binding.java
ool/BindingTarget.java
ool/LayoutBinder.java
ool/MergedBinding.java
ool/expr/ArgListExpr.java
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/store/SetterStore.java
cffffe30fe53455856d3d41724b9d5dd21aebf9a 28-Apr-2015 George Mount <mount@google.com> First stage in allowing multi-parameter BindingAdapters.

Allow multi-parameter binding adapters. These will affect
Views where multiple attributes are using expressions.
In this initial stage, BindingAdapters can be applied to
multiple attributes and the list of such binding adapters
can be retrieved.

Change-Id: I073393c215cd93d232fb1e3682641fdc31d994d2
ool/store/SetterStore.java
71dc4a20f0c80adc3a24a8df94258cb94e588a94 30-Apr-2015 Yigit Boyar <yboyar@google.com> Merge "Add base library prebuild, remove library.jar prebuild"
be83770af82294c1841eef414513653646b88dc6 29-Apr-2015 Yigit Boyar <yboyar@google.com> Move java-gen task to proper hook

Bug: 20640611
ool/LayoutXmlProcessor.java
ool/MakeCopy.java
d33691a5725244f1bb5c4491af81b9fc67e0f39f 28-Apr-2015 George Mount <mount@google.com> Support using aliased classes as outer classes.

Bug 20350624
ool/reflection/annotation/AnnotationAnalyzer.java
d1369ca2b7114fa456293695f3850e5be5e6d21e 23-Apr-2015 Yigit Boyar <yboyar@google.com> Add placeholder flag for invalidate any
ool/expr/Expr.java
ool/expr/ExprModel.java
658c71b9ba3211ac5c10f261a8c6f38b1916d3bf 22-Apr-2015 Yigit Boyar <yboyar@google.com> Fix invalidate any flag.

This CL also adds a new build target to move folders to an EAP folder that
can be shipped to early access partners.
I've also changed the demo to use android emojis
ool/expr/ExprModel.java
ae161289a90f6ac69ffe6411ac8c09653c81d04d 21-Apr-2015 Yigit Boyar <yboyar@google.com> Add base library prebuild, remove library.jar prebuild

Bug: 19945740
ool/LayoutXmlProcessor.java
d7adbdab48fb8f894cb59073b864da8f5bafb8a9 20-Apr-2015 George Mount <mount@google.com> Fix merge failure.
ool/reflection/ModelClass.java
11e3c78221d957e86be098255ccd0f8f28280cff 20-Apr-2015 George Mount <mount@google.com> Merge changes If9ddfd09,I310535e6

* changes:
Support array length.
Added some missing expressions.
8ec9696461abb5ad0b95024edc3f3ccb9ace85be 17-Apr-2015 George Mount <mount@google.com> Support array length.

Change-Id: If9ddfd09d7becc504741b8dd4f91332de944bfe1
ool/reflection/ModelClass.java
c6bcb7bf9cab139b3141c4644e5b3267deed5213 20-Apr-2015 George Mount <mount@google.com> Added some missing expressions.

unary: +/-/~/!
shift: >>/>>>/<<
logical: &&/||
bit: &/|/^
instanceof

Change-Id: I310535e67c8fda2f067a62079e1b609a11bda741
ool/ExpressionVisitor.java
ool/expr/BitShiftExpr.java
ool/expr/ExprModel.java
ool/expr/InstanceOfExpr.java
ool/expr/UnaryExpr.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
ool/BindingTarget.java
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/expr/MethodCallExpr.java
ool/reflection/Callable.java
ool/reflection/ModelClass.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
ool/LayoutXmlProcessor.java
ool/MakeCopy.java
ool/reflection/ModelClass.java
ool/reflection/SdkUtil.java
3b8fedce6e9ee814ffe7b63d07aa5456f08fb9b2 15-Apr-2015 George Mount <mount@google.com> Parse and strip new layout format.

API Council suggested a new layout format for layouts with
bindings. Here, we parse the new format and strip it. This
also brings in the ability to provide a custom class name
for the binding.

Change-Id: I674320d21265c1dec70d1a52285341fe4994895b
ool/store/LayoutFileParser.java
ool/store/ResourceBundle.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
ool/DataBinder.java
ool/LayoutBinder.java
ool/store/LayoutFileParser.java
ool/store/ResourceBundle.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
ool/CompilerChef.java
ool/DataBinder.java
ool/LayoutBinder.java
ool/expr/SymbolExpr.java
ool/store/LayoutFileParser.java
ool/store/ResourceBundle.java
0390898cf7c4fcad255e8cfd6802f722b516cb2c 03-Apr-2015 George Mount <mount@google.com> Use layout path for the tag on bound layout roots.

Change-Id: I6bda5d5716e749251b27c112865da066ba908509
ool/LayoutBinder.java
ool/LayoutXmlProcessor.java
ool/store/LayoutFileParser.java
ool/store/ResourceBundle.java
d8c8ec27ed2ec0b11fa37f476395ce27834471f0 05-Apr-2015 Yigit Boyar <yboyar@google.com> Fix ternary handling and generate better code

This CL fixes an issue about ternary expressions where
a ternary expression would be evaluated with its last
evaluated dependency. This would create a problem where
ternary expressions would not be evaluated if other branch
of the conditional is chosen, This bug is fixed by checking
outher flags such that we'll still calculate it together
if all dependencies are behind the same flag vs we'll
calculate it independently if its dependency flags are different.

This CL also improves the generated code in two ways:
- When there is an if inside if, we don't add flag check (the if)
if all of its conditions are covered in the parent if.
- I replaced flag names with binary values. This looks more
readable then generated names.

Bug: 20073197
Change-Id: I9d07868206a5393d6509ab0a205b30a796e11107
ool/writer/FlagSet.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
ool/ExpressionVisitor.java
ool/expr/Expr.java
ool/expr/ExprModel.java
2e2043d30f95585de2069e1cbb23e022ab0e71c4 02-Apr-2015 George Mount <mount@google.com> Change "generated" to "databinding"
ool/LayoutBinder.java
ool/store/LayoutFileParser.java
e7c2a5e45d7651899790bd347da635875f9c73fb 02-Apr-2015 George Mount <mount@google.com> Use setTag(id, val) when minSdk is ICS and later.

setTag(id, val) leaks on versions before ICS. When the
minimum SDK is before ICS, setTag(val) must be used
for bindings. However, this prevents the developer from
using the tag for his or her own purposes. Therefore,
if the minimum SDK is ICS and greater, setTag(id, val)
is used.

Change-Id: I46327084bde4bafc05a64f82ad5ebcf710820ecc
ool/CompilerChef.java
53398fcd565782a0fd973eec43eac5c659c927c0 01-Apr-2015 George Mount <mount@google.com> Address comment in CL

Bug 19933646
ool/LayoutBinder.java
125f08f32dbe73b457768aeca4accfbc44dd44b6 01-Apr-2015 George Mount <mount@google.com> Don't use reflection for DataBinderMapper.

By having a concrete implementation of DataBinderMapper in the
library and then stripping it out, the generated DataBinderMapper
may be instantiated without reflection.
ool/CompilerChef.java
95d1b38adeb5963ec5337e7dd6177b4bb5a03619 01-Apr-2015 George Mount <mount@google.com> Capture views with IDs and no expressions in Binding.

We want to get all Views with IDs in the Binding to save the
developer effort in calling findViewById.

Change-Id: Ib7dd85ae9ecc0fd31b235364c0eadc2303dd1780
ool/store/LayoutFileParser.java
dea555cf42dc3583604699c8c018d22681f56166 30-Mar-2015 George Mount <mount@google.com> Merge implementation into base class for single implementations.

Bug 19933646

Change-Id: Ifc947d929b5275e32598e8d40f0122504a99d7f8
ool/CompilerChef.java
ool/DataBinder.java
ool/LayoutBinder.java
61630faa88ee4817834d47294a0e17f19d8e1c51 30-Mar-2015 George Mount <mount@google.com> Require only one pass to make BR.java file.

Bug 19985005

Because the generation of Binding files created @Bindable
annotations, the BR file generation had to wait until a
second annotation pass. This caused errors to be generated
that were later cleared, causing confusion. I moved the
BR file generation to the same annotation processing stage
that generates the Binding files to clear up the error
generation.

TODO: merge the annotation processing stages so that there
is less cross-talk between annotation processors.
ool/CompilerChef.java
de38dd3ef0577d25b2d59863603abe5750d0c231 28-Mar-2015 George Mount <mount@google.com> Make ViewStub support binding variables like include.

Bug 19969378
ool/Binding.java
ool/reflection/ModelAnalyzer.java
ool/reflection/ModelClass.java
ool/store/ResourceBundle.java
34a18e6a231f3b64726bd93e7e097a0d5a75995d 26-Mar-2015 George Mount <mount@google.com> Move to public final fields instead of getters for Views.

Bug 19933644
ool/BindingTarget.java
ool/LayoutBinder.java
ool/store/ResourceBundle.java
fead9ca09b117136b35bc5bf137340a754f9eddd 23-Mar-2015 George Mount <mount@google.com> Move to package android.databinding.
ool/Binding.java
ool/BindingTarget.java
ool/CompilerChef.java
ool/DataBinder.java
ool/ExpressionParser.java
ool/ExpressionVisitor.java
ool/LayoutBinder.java
ool/LayoutXmlProcessor.java
ool/MakeCopy.java
ool/expr/BracketExpr.java
ool/expr/CastExpr.java
ool/expr/ComparisonExpr.java
ool/expr/Dependency.java
ool/expr/Expr.java
ool/expr/ExprModel.java
ool/expr/FieldAccessExpr.java
ool/expr/GroupExpr.java
ool/expr/IdentifierExpr.java
ool/expr/MathExpr.java
ool/expr/MethodCallExpr.java
ool/expr/ResourceExpr.java
ool/expr/StaticIdentifierExpr.java
ool/expr/SymbolExpr.java
ool/expr/TernaryExpr.java
ool/reflection/Callable.java
ool/reflection/ModelAnalyzer.java
ool/reflection/ModelClass.java
ool/reflection/ModelField.java
ool/reflection/ModelMethod.java
ool/reflection/SdkUtil.java
ool/reflection/TypeUtil.java
ool/reflection/annotation/AnnotationAnalyzer.java
ool/reflection/annotation/AnnotationClass.java
ool/reflection/annotation/AnnotationField.java
ool/reflection/annotation/AnnotationMethod.java
ool/reflection/annotation/AnnotationTypeUtil.java
ool/store/LayoutFileParser.java
ool/store/ResourceBundle.java
ool/store/SetterStore.java
ool/util/GenerationalClassUtil.java
ool/util/L.java
ool/writer/AnnotationJavaFileWriter.java
ool/writer/FlagSet.java
ool/writer/JavaFileWriter.java