• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1This file describes the "gscripts" folder in ADT (Android Eclipse Plugin).
2
3
4----------
5- Overview
6----------
7
8ADT is the Android Eclipse Plugin. The plugin delivers a new editor, called
9the the Graphical Layout Editor (a.k.a. GLE2), to visually edit Android layout
10XML files.
11
12Details on how to handle the various Android views and layouts is not
13hardcoded in the GLE2 itself. Instead it is differed to a bunch of Groovy
14scripts.
15
16
17(TODO: expand/replace with a better overview of implementation... goal is
18to 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
29If you run ADT in debug mode and want to trace into Groovy
30methods, you need to tell Eclipse where to find the Groovy source code.
31
32To 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
44Be careful when adding new helper methods in the BaseView
45or BaseLayout classes.
46
47Due to the way Groovy looks up methods, private methods will *not* be found by
48same-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