Home | History | Annotate | Download | only in docs
      1 This file describes the "gscripts" folder in ADT (Android Eclipse Plugin).
      2 
      3 
      4 ----------
      5 - Overview
      6 ----------
      7 
      8 ADT is the Android Eclipse Plugin. The plugin delivers a new editor, called
      9 the the Graphical Layout Editor (a.k.a. GLE2), to visually edit Android layout
     10 XML files.
     11 
     12 Details on how to handle the various Android views and layouts is not
     13 hardcoded in the GLE2 itself. Instead it is differed to a bunch of Groovy
     14 scripts.
     15 
     16 
     17 (TODO: expand/replace with a better overview of implementation... goal is
     18 to use this a doc for 3rd-party projects to implement their own rules.)
     19 
     20 
     21 
     22 -------------
     23 - Groovy tips
     24 -------------
     25 
     26 
     27 - Debugging:
     28 
     29 If you run ADT in debug mode and want to trace into Groovy
     30 methods, you need to tell Eclipse where to find the Groovy source code.
     31 
     32 To do this:
     33 - in Eclipse, import an existing project
     34 - Select the project at <android-source-tree>/prebuilt/common/groovy/
     35 - This will add a new Eclipse project named "GroovySrc" which contains
     36   a single zip file with the groovy source.
     37 - ADT is already pre-configured to find the Groovy source in the GroovySrc
     38   project.
     39 
     40 
     41 
     42 - Private methods:
     43 
     44 Be careful when adding new helper methods in the BaseView
     45 or BaseLayout classes.
     46 
     47 Due to the way Groovy looks up methods, private methods will *not* be found by
     48 same-class methods if invoked by a derived class in the context of a closure
     49 (which is about the case of all these helper methods.)
     50