[TIMOB-1732] Android: Kroll refactor
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-04-17T01:57:00.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 1.5.0 M01 |
Components | Android |
Labels | android, feature, kroll, refactor, rplist |
Reporter | Marshall Culpepper |
Assignee | Marshall Culpepper |
Created | 2011-04-15T03:00:46.000+0000 |
Updated | 2011-04-17T01:57:00.000+0000 |
Description
This ticket is a placeholder for commits towards the new Android Kroll refactor. This refactor includes:
- Annotation based API w/ source code generation (minimal use of reflection)
- Better contextual awareness throughout the API
- Static binding (vs Dynamic)
(from [0595585260b1ed294cfecdd26f7d09691332d7da]) first stab at a complete port of Titanium to the new Kroll [#1732]
This includes numerous improvements, including (but not limited to):
- The annotation processor has been broken out into it's own kroll-apt project, and is also an Eclipse plugin (this is the easiest way to run the new annotation processor). To build just run the kroll-apt/pde-build.xml ant script inside Eclipse (more instructions coming soon) - Support for optional arguments, Invocation injection, varargs, auto-generated "createXX" methods, and retained dynamic properties - A port of everything but titanium-android to the new Kroll API - Several bug fixes in the annotation processor - Copy/cleanup of the old to/fromNative code to KrollConverter - Proxies now automatically bind themselves upon creation - Better error handling in generated code - the kroll project has been integrated back into the traditional "titanium" project - faster Drillbit test launching in Android - an initial Drillbit test app.js for tests w/o UI http://github.com/appcelerator/titanium_mobile/commit/0595585260b1ed294cfecdd26f7d09691332d7da"> http://github.com/appcelerator/titanium_mobile/commit/0595585260b1e...
(from [c3bb89640388469f0650272ccc5592b25d3c475d]) initial implementation of new kroll module boot and binding filters, fix for API.getName and method name overrides. [#1732] http://github.com/appcelerator/titanium_mobile/commit/c3bb89640388469f0650272ccc5592b25d3c475d"> http://github.com/appcelerator/titanium_mobile/commit/c3bb896403884...
(from [bcf5cf16cac639595aa7cbb223f255d9c0fb3a5c]) the annotation processor now keeps state between rounds in JSON so we don't lose any state if Eclipse decides to only build a few files in a round. added a @Kroll.runOnUiThread annotation to automatically wrap dynamic properties and/or methods, added module fixed some bugs for Kitchensink [#1732] http://github.com/appcelerator/titanium_mobile/commit/bcf5cf16cac639595aa7cbb223f255d9c0fb3a5c"> http://github.com/appcelerator/titanium_mobile/commit/bcf5cf16cac63...
(from [52df63ed425045ad220fab099d5a1eb9102e790e]) added a new top level binding annotation @Kroll.topLevel (binds a module or method as a top level binding i.e. on the same level as "Ti"). lots of bug fixes for KitchenSink [#1732] http://github.com/appcelerator/titanium_mobile/commit/52df63ed425045ad220fab099d5a1eb9102e790e"> http://github.com/appcelerator/titanium_mobile/commit/52df63ed42504...
(from [58854d6c79b3b89a308ea4078c915fa74cd5e8fb]) more drillbit fixes for the new kroll [#1732] http://github.com/appcelerator/titanium_mobile/commit/58854d6c79b3b89a308ea4078c915fa74cd5e8fb"> http://github.com/appcelerator/titanium_mobile/commit/58854d6c79b3b...
(from [4e2842818d5152160e9c729b91cf1f5a59d8d04f]) better proxy/module name generation, a new API to retrieve the current Ti/KrollContext, fixes for dynamic property and KrollObject conversion, a nice toString() for KrollInvocation and new create methods that use the current TiContext. more bug fixes for KS [#1732] http://github.com/appcelerator/titanium_mobile/commit/4e2842818d5152160e9c729b91cf1f5a59d8d04f"> http://github.com/appcelerator/titanium_mobile/commit/4e2842818d515...
Please use http://developer.appcelerator.com/helpdesk/view/42371">Helpdesk 42371 as a testcase.
(from [b1e6dde0d48b6541625c7ff009d99156e605d28f]) the big android_native_refactor + android_kroll_refactor hand merge, some changes on top of resolving conflicts: - Kroll modules are now singleton and are only instantiated/bound once - Split up binding into 3 phases: bindToParent, bindProperties, and bindContextSpecific - Ported lots of new code / modules to new API - Enabled production deploy type checking (and a manual property override: ti.android.compilejs) in compiler.py [#1732] Merge branch 'android_native_refactor' of github.com:appcelerator/titanium_mobile into android_refactor
Conflicts:
http://github.com/appcelerator/titanium_mobile/commit/b1e6dde0d48b6541625c7ff009d99156e605d28f"> http://github.com/appcelerator/titanium_mobile/commit/b1e6dde0d48b6...
(from [4494349e526e05c694b94e9a89be873ea86fd093]) some renaming: KrollProperty is now the base interface for all properties, KrollDynamicProperty is the subclass for properties implemented with getters/setters, and KrollReflectionProperty is the subclass for properties implemented with java instance members. dynamic getters/setters are now implemented in source code generation rather than using reflection. fixed up a few mis-annotated APIs [#1732] http://github.com/appcelerator/titanium_mobile/commit/4494349e526e05c694b94e9a89be873ea86fd093"> http://github.com/appcelerator/titanium_mobile/commit/4494349e526e0...
(from [b8f077c92df3d0d0e1e27aacd4e258025c4d448a]) new markdown documentation for installing, using, and debugging the new Kroll annotation processor for Android [#1732] http://github.com/appcelerator/titanium_mobile/commit/b8f077c92df3d0d0e1e27aacd4e258025c4d448a"> http://github.com/appcelerator/titanium_mobile/commit/b8f077c92df3d...
Titanium SDK version: 1.5.0 (12/01/10 09:30 ac7cfd8), Drillbit, Android Sim 1.6, 2.1