Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1732] Android: Kroll refactor

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:57:00.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.5.0 M01
ComponentsAndroid
Labelsandroid, feature, kroll, refactor, rplist
ReporterMarshall Culpepper
AssigneeMarshall Culpepper
Created2011-04-15T03:00:46.000+0000
Updated2011-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)

Comments

  1. Marshall Culpepper 2011-04-15

    (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...

  2. Marshall Culpepper 2011-04-15

    (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...

  3. Marshall Culpepper 2011-04-15

    (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...

  4. Marshall Culpepper 2011-04-15

    (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...

  5. Marshall Culpepper 2011-04-15

    (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...

  6. Marshall Culpepper 2011-04-15

    (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...

  7. Don Thorp 2011-04-15

    Please use http://developer.appcelerator.com/helpdesk/view/42371">Helpdesk 42371 as a testcase.

  8. Marshall Culpepper 2011-04-15

    (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:

       android/modules/bump/src/ti/modules/titanium/bump/BumpModule.java
       android/modules/contacts/src/ti/modules/titanium/contacts/PersonProxy.java
       android/modules/database/src/ti/modules/titanium/database/DatabaseModule.java
       android/modules/filesystem/src/ti/modules/titanium/filesystem/FileProxy.java
       android/modules/geolocation/src/ti/modules/titanium/geolocation/TiLocation.java
       android/modules/media/src/ti/modules/titanium/media/MediaModule.java
       android/modules/network/src/ti/modules/titanium/network/HTTPClientProxy.java
       android/modules/platform/src/ti/modules/titanium/platform/DisplayCapsProxy.java
       android/modules/ui/src/ti/modules/titanium/ui/EmailDialogProxy.java
       android/modules/ui/src/ti/modules/titanium/ui/LabelProxy.java
       android/modules/ui/src/ti/modules/titanium/ui/TabGroupProxy.java
       android/modules/ui/src/ti/modules/titanium/ui/TiUIWindow.java
       android/modules/ui/src/ti/modules/titanium/ui/android/AndroidModule.java
       android/modules/ui/src/ti/modules/titanium/ui/widget/TiUITabGroup.java
       android/modules/ui/src/ti/modules/titanium/ui/widget/TiUIText.java
       android/modules/ui/src/ti/modules/titanium/ui/widget/picker/TiUIDateSpinner.java
       android/modules/ui/src/ti/modules/titanium/ui/widget/picker/TiUIPicker.java
       android/modules/ui/src/ti/modules/titanium/ui/widget/tableview/TiBaseTableViewItem.java
       android/modules/utils/src/ti/modules/titanium/utils/UtilsModule.java
       android/modules/xml/src/ti/modules/titanium/xml/NodeProxy.java
       android/modules/xml/src/ti/modules/titanium/xml/XMLModule.java
       android/titanium/src/org/appcelerator/titanium/TiActivity.java
       android/titanium/src/org/appcelerator/titanium/TiApplication.java
       android/titanium/src/org/appcelerator/titanium/TiContext.java
       android/titanium/src/org/appcelerator/titanium/TiModule.java
       android/titanium/src/org/appcelerator/titanium/TiProxy.java
       android/titanium/src/org/appcelerator/titanium/TiRootActivity.java
       android/titanium/src/org/appcelerator/titanium/kroll/KrollBridge.java
       android/titanium/src/org/appcelerator/titanium/kroll/KrollCallback.java
       android/titanium/src/org/appcelerator/titanium/kroll/KrollContext.java
       android/titanium/src/org/appcelerator/titanium/kroll/KrollObject.java
       android/titanium/src/org/appcelerator/titanium/proxy/TiViewProxy.java
       android/titanium/src/org/appcelerator/titanium/util/TiConvert.java
       android/titanium/src/org/appcelerator/titanium/util/TiUIHelper.java
       android/titanium/src/org/appcelerator/titanium/view/Ti2DMatrix.java
       android/titanium/src/org/appcelerator/titanium/view/TiUIView.java
       android/titanium/src/ti/modules/titanium/TitaniumModule.java
       support/android/compiler.py
       support/android/templates/App.java
       

    http://github.com/appcelerator/titanium_mobile/commit/b1e6dde0d48b6541625c7ff009d99156e605d28f"> http://github.com/appcelerator/titanium_mobile/commit/b1e6dde0d48b6...

  9. Marshall Culpepper 2011-04-15

    (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...

  10. Marshall Culpepper 2011-04-15

    (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...

  11. Matt Schmulen 2011-04-15

    Titanium SDK version: 1.5.0 (12/01/10 09:30 ac7cfd8), Drillbit, Android Sim 1.6, 2.1

JSON Source