OSDN Git Service
The Android Open-Source Project [Thu, 16 Jun 2011 18:14:09 +0000 (11:14 -0700)]
merge from tools_r12
Change-Id: Ic2a9844fe74da7c873c7264e38d50d568f190530
Xavier Ducrohet [Thu, 16 Jun 2011 18:00:49 +0000 (11:00 -0700)]
Merge "Merge
bc434d73 from master to r12. do not merge." into tools_r12
Xavier Ducrohet [Wed, 15 Jun 2011 23:22:12 +0000 (16:22 -0700)]
Merge
bc434d73 from master to r12. do not merge.
Add cpu.model to AVD running armeabi-v7a system images.
Change-Id: I2e94a3bed50936a39eebaffa014427d6ce40983d
Xavier Ducrohet [Thu, 16 Jun 2011 17:55:20 +0000 (10:55 -0700)]
Merge "Add cpu.model to AVD running armeabi-v7a system images."
Xavier Ducrohet [Wed, 15 Jun 2011 23:22:12 +0000 (16:22 -0700)]
Add cpu.model to AVD running armeabi-v7a system images.
Change-Id: I5b97b115ada432e284ad2dd3c69bcf7009677aec
The Android Open-Source Project [Wed, 15 Jun 2011 22:44:40 +0000 (15:44 -0700)]
merge from tools_r12
Change-Id: I60f32f625de3ea932c87747e25366377c07e74a5
Xavier Ducrohet [Wed, 15 Jun 2011 22:32:18 +0000 (15:32 -0700)]
Merge "Merge
df07f53c from master to r12. do not merge." into tools_r12
Bill Napier [Wed, 15 Jun 2011 21:50:21 +0000 (14:50 -0700)]
Merge "Laying out the base for ChimpChat"
Michael Wright [Mon, 13 Jun 2011 16:13:55 +0000 (09:13 -0700)]
Laying out the base for ChimpChat
Change-Id: Ia9ba8bb572e029bf3c838605feae55b2f91f16eb
Xavier Ducrohet [Wed, 15 Jun 2011 01:13:11 +0000 (18:13 -0700)]
Merge
df07f53c from master to r12. do not merge.
Fix parsing of the styleable enum/flag attribute values.
Better handling for hexa value > 0x7FFFFFFF
Change-Id: I1cbbed8f9d3ce9f1b7396e2d34c7bd33dc18e70f
Xavier Ducrohet [Wed, 15 Jun 2011 01:20:38 +0000 (18:20 -0700)]
Merge "Fix parsing of the styleable enum/flag attribute values."
The Android Open-Source Project [Wed, 15 Jun 2011 01:17:07 +0000 (18:17 -0700)]
merge from tools_r12
Change-Id: I51da72204b208742edac5cd6f5c3b708bba13346
Xavier Ducrohet [Wed, 15 Jun 2011 01:16:06 +0000 (18:16 -0700)]
Merge "Merge
756d19df from master to r12. do not merge." into tools_r12
Xavier Ducrohet [Wed, 15 Jun 2011 01:13:11 +0000 (18:13 -0700)]
Fix parsing of the styleable enum/flag attribute values.
Better handling for hexa value > 0x7FFFFFFF
Change-Id: If0c2ed23847a720431bceee95f8b264ceb967e3e
Tor Norbye [Wed, 15 Jun 2011 01:02:47 +0000 (18:02 -0700)]
Merge
756d19df from master to r12. do not merge.
Handle "
ffffffff" in attribute flag values
Change-Id: I1ff6dbf959e2c1ff1b475c5cdcebcd0c73975c01
Xavier Ducrohet [Wed, 15 Jun 2011 01:08:50 +0000 (18:08 -0700)]
Merge "Handle "
ffffffff" in attribute flag values"
Xavier Ducrohet [Wed, 15 Jun 2011 01:02:52 +0000 (18:02 -0700)]
Merge "Merge
9d342967 from master to r12. do not merge." into tools_r12
Tor Norbye [Wed, 15 Jun 2011 01:02:47 +0000 (18:02 -0700)]
Handle "
ffffffff" in attribute flag values
Change-Id: I410fccd9a9970eaa65e114be33a9e576280bb6c9
Xavier Ducrohet [Wed, 15 Jun 2011 00:30:49 +0000 (17:30 -0700)]
Merge
9d342967 from master to r12. do not merge.
Fix broken equals() in new qualifiers.
Change-Id: Id083d11a2941d120ca6fd9438a5a12ed7502ab92
Xavier Ducrohet [Wed, 15 Jun 2011 00:33:24 +0000 (17:33 -0700)]
Merge "Fix broken equals() in new qualifiers."
Xavier Ducrohet [Wed, 15 Jun 2011 00:30:49 +0000 (17:30 -0700)]
Fix broken equals() in new qualifiers.
Change-Id: Ide197a390c3d9de8d4e30a8f99f0a32a6ad2191d
Tor Norbye [Tue, 14 Jun 2011 21:31:27 +0000 (14:31 -0700)]
Merge "Add two more layout actions for linear layouts"
Tor Norbye [Tue, 14 Jun 2011 00:27:48 +0000 (17:27 -0700)]
Add two more layout actions for linear layouts
Add two more actions:
(1) Clear All Weights: This removes all the layout weights in a
layout, and converts and 0-sized views to wrap_content.
(2) Assign All Weight: This adds all the weight in the layout to the
selected view(s) and removes it from the remaining views.
Change-Id: Id2a27299d99f77ef4056b7e1745373d52a9331f7
The Android Open-Source Project [Mon, 13 Jun 2011 23:32:04 +0000 (16:32 -0700)]
merge from tools_r12
Change-Id: I14130e9e2a1f58a8db762b3e2b9a1b249664fa4e
Tor Norbye [Mon, 13 Jun 2011 23:26:28 +0000 (16:26 -0700)]
Merge "When distributing linear layout weights, also set size to 0dp. DO NOT MERGE" into tools_r12
Tor Norbye [Mon, 13 Jun 2011 23:12:07 +0000 (16:12 -0700)]
When distributing linear layout weights, also set size to 0dp. DO NOT MERGE
When you use the layout actions bar "Distribute Weights" in a
LinearLayout, in addition to setting all the weights to the same
nonzero value, also set the size (the height for a vertical linear
layout and the width for a horizontal one) to 0dp, to ensure that the
widgets are all given the same total size rather than sharing the
remaining space evenly.
In addition, when adding new widgets to a LinearLayout, see if all
elements in the linear layout already have nonzero and equal weights,
and if so duplicate this weight value on the new widget as well, and
similarly also duplicate 0dp/0dip/0px if used.
Change-Id: I78d1c5af05a8b8b54e4d1eb0d426ce592bc1fc69
Tor Norbye [Mon, 13 Jun 2011 23:24:15 +0000 (16:24 -0700)]
Merge "When distributing linear layout weights, also set size to 0dp"
Tor Norbye [Mon, 13 Jun 2011 23:12:07 +0000 (16:12 -0700)]
When distributing linear layout weights, also set size to 0dp
When you use the layout actions bar "Distribute Weights" in a
LinearLayout, in addition to setting all the weights to the same
nonzero value, also set the size (the height for a vertical linear
layout and the width for a horizontal one) to 0dp, to ensure that the
widgets are all given the same total size rather than sharing the
remaining space evenly.
In addition, when adding new widgets to a LinearLayout, see if all
elements in the linear layout already have nonzero and equal weights,
and if so duplicate this weight value on the new widget as well, and
similarly also duplicate 0dp/0dip/0px if used.
Change-Id: Iac5284a866b19b27e91666dc62278c63b8dde2bb
The Android Open-Source Project [Mon, 13 Jun 2011 20:58:38 +0000 (13:58 -0700)]
merge from tools_r12
Change-Id: Ic2616b4dccc395eaa8e224c2fa12cbce6fd2f770
Tor Norbye [Mon, 13 Jun 2011 20:56:35 +0000 (13:56 -0700)]
Merge "Update changes.txt for ADT 12" into tools_r12
Tor Norbye [Mon, 13 Jun 2011 20:22:32 +0000 (13:22 -0700)]
Update changes.txt for ADT 12
Change-Id: I12575476e0acf9a053ad849544dfdd6e9ad03f07
The Android Open-Source Project [Mon, 13 Jun 2011 18:42:18 +0000 (11:42 -0700)]
merge from tools_r12
Change-Id: Ib9d187b111a4e9cd69fc3db2b125e7cf021bd9a8
Xavier Ducrohet [Mon, 13 Jun 2011 18:31:14 +0000 (11:31 -0700)]
Merge "Merge
0b95acc1 from master to r12. do not merge." into tools_r12
Tor Norbye [Fri, 10 Jun 2011 00:44:03 +0000 (17:44 -0700)]
Merge
0b95acc1 from master to r12. do not merge.
RelativeLayout: Assign ids dynamically, handle multi-drag, bugs
This CL fixes three issues with the new relative layout interaction:
(1) Assign ids dynamically. Before this changeset you couldn't attach
to a node which does not have an @id attribute, since layout
params need to name the constraint by id.
This changeset changes this such that you can attach to any
arbitrary edge, and when you commit the drag, a unique id is
generated on the fly and assigned to the node.
(2) Handle dragging multiple nodes at the same time. The new
constraints code was unconditionally applying the same constraints
to all the dragged nodes, which meant they ended up on top of each
other. This fixes things such that the first node is assigned the
new constraints, and then all subsequent nodes are attached one
next to the other, in a direction depending on which edge you
attached to (e.g. attaching on the right will arrange the siblings
towards the left out from the edge.)
(3) Fix a bug in the code to detect and prevent cycles.
Change-Id: I3da16903ffac6c34a0d5efee52a87824fb9e04fb
The Android Open-Source Project [Mon, 13 Jun 2011 18:28:02 +0000 (11:28 -0700)]
merge from tools_r12
Change-Id: Ibac37d5ac8a7cea21828865a6681ec2ccf43450c
Xavier Ducrohet [Mon, 13 Jun 2011 18:26:19 +0000 (11:26 -0700)]
Merge "RelativeLayout: Assign ids dynamically, handle multi-drag, bugs"
Xavier Ducrohet [Mon, 13 Jun 2011 18:15:52 +0000 (11:15 -0700)]
Merge "Merge
acdf7441 from master to r12. do not merge." into tools_r12
Xavier Ducrohet [Mon, 13 Jun 2011 18:15:45 +0000 (11:15 -0700)]
Merge "Merge
050bcb67 from master into r12. do not merge." into tools_r12
Josiah Gaskin [Fri, 10 Jun 2011 20:10:50 +0000 (13:10 -0700)]
Merge
acdf7441 from master to r12. do not merge.
Add ADT preference to disable skipping of PostComp
This change adds a preference option to ADT under
Android->Build to allow user control of whether
PostCompilation is skipped during a file save and
pushed back until launch or export.
Change-Id: I1cce3409ec3601c1b80da7e1618427fd091cd7fb
Xavier Ducrohet [Fri, 10 Jun 2011 23:56:02 +0000 (16:56 -0700)]
Merge
050bcb67 from master into r12. do not merge.
Properly handle CPU Arch/ABI in AVDs.
When we introduced x86 support in the tree there was no
generic emulator exe able to act as a launcher to the -arm and
-x86 versions of the emulator.
This exe is now present and packaged with the SDK, so we remove the
code to launch either arch specific version and instead make the AVD
Manager and ADT simply launch the normal emulator once again.
(This has the side effect of making ADT 12 able to run on Tools r11
and below.)
For this to run though, hw.cpu.arch must be set in the AVD if the
arch is not arm. The new AVD manager sets this properly.
Also fixed some issues from my previous fix to the hardware property.
Now the list contains all of them but there's a isValidForUi that's used
to not show up some prop in the UI.
Change-Id: I4187a8f973ee82762b430c9a3c709169c92d6b99
Xavier Ducrohet [Mon, 13 Jun 2011 17:52:27 +0000 (10:52 -0700)]
Merge "Properly handle CPU Arch/ABI in AVDs."
Josiah Gaskin [Mon, 13 Jun 2011 16:50:57 +0000 (09:50 -0700)]
Merge "Add ADT preference to disable skipping of PostComp"
Tor Norbye [Fri, 10 Jun 2011 00:44:03 +0000 (17:44 -0700)]
RelativeLayout: Assign ids dynamically, handle multi-drag, bugs
This CL fixes three issues with the new relative layout interaction:
(1) Assign ids dynamically. Before this changeset you couldn't attach
to a node which does not have an @id attribute, since layout
params need to name the constraint by id.
This changeset changes this such that you can attach to any
arbitrary edge, and when you commit the drag, a unique id is
generated on the fly and assigned to the node.
(2) Handle dragging multiple nodes at the same time. The new
constraints code was unconditionally applying the same constraints
to all the dragged nodes, which meant they ended up on top of each
other. This fixes things such that the first node is assigned the
new constraints, and then all subsequent nodes are attached one
next to the other, in a direction depending on which edge you
attached to (e.g. attaching on the right will arrange the siblings
towards the left out from the edge.)
(3) Fix a bug in the code to detect and prevent cycles.
Change-Id: I157d45e117d3229f285870517b85ed902607b966
Xavier Ducrohet [Fri, 10 Jun 2011 23:56:02 +0000 (16:56 -0700)]
Properly handle CPU Arch/ABI in AVDs.
When we introduced x86 support in the tree there was no
generic emulator exe able to act as a launcher to the -arm and
-x86 versions of the emulator.
This exe is now present and packaged with the SDK, so we remove the
code to launch either arch specific version and instead make the AVD
Manager and ADT simply launch the normal emulator once again.
(This has the side effect of making ADT 12 able to run on Tools r11
and below.)
For this to run though, hw.cpu.arch must be set in the AVD if the
arch is not arm. The new AVD manager sets this properly.
Also fixed some issues from my previous fix to the hardware property.
Now the list contains all of them but there's a isValidForUi that's used
to not show up some prop in the UI.
Change-Id: I7a264a59cb3c5051ff62f6103da9663c7b7eb22f
The Android Open-Source Project [Fri, 10 Jun 2011 22:05:58 +0000 (15:05 -0700)]
merge from tools_r12
Change-Id: Ie521b9c9d5d89663d827ef958aebeea89a4b1b79
Josiah Gaskin [Fri, 10 Jun 2011 20:10:50 +0000 (13:10 -0700)]
Add ADT preference to disable skipping of PostComp
This change adds a preference option to ADT under
Android->Build to allow user control of whether
PostCompilation is skipped during a file save and
pushed back until launch or export.
Change-Id: Id877586bb11ae5af3fdb7fbc9c78c7f925115f07
Xavier Ducrohet [Fri, 10 Jun 2011 21:30:19 +0000 (14:30 -0700)]
Merge "CherryPick
8f21dc3e from master to r12. do not merge." into tools_r12
Xavier Ducrohet [Fri, 10 Jun 2011 21:30:11 +0000 (14:30 -0700)]
Merge "CherryPick
aef49b24 from master to r12. do not merge." into tools_r12
Xavier Ducrohet [Fri, 10 Jun 2011 21:30:04 +0000 (14:30 -0700)]
Merge "CherryPick
28978f45 from master to r12. do not merge." into tools_r12
Tor Norbye [Fri, 10 Jun 2011 20:41:51 +0000 (13:41 -0700)]
CherryPick
8f21dc3e from master to r12. do not merge.
Workaround view info cookie bug
This changeset works around the case where a ViewInfo cookie is
identical to its parent. This is for example the case for a
ZoomControls widget, where the child views have MergeCookies whole
value points to the parent ZoomControl.
Change-Id: I6c85dab318eb5b5a4e5dd95d4c7ead61c81f435d
Tor Norbye [Fri, 10 Jun 2011 20:58:35 +0000 (13:58 -0700)]
CherryPick
aef49b24 from master to r12. do not merge.
Fix proguard template to avoid shrinking XML-only references
See 16384: ProGuard template generated by the ADT is flawed
Change-Id: Ibf4510cc4ad9aafec2712326053e80d80599add4
Tor Norbye [Fri, 10 Jun 2011 21:27:18 +0000 (14:27 -0700)]
Merge "Workaround view info cookie bug"
Tor Norbye [Fri, 10 Jun 2011 21:26:31 +0000 (14:26 -0700)]
Merge "Fix proguard template to avoid shrinking XML-only references"
Xavier Ducrohet [Fri, 10 Jun 2011 21:22:13 +0000 (14:22 -0700)]
CherryPick
28978f45 from master to r12. do not merge.
Make String-based hw prop not recognized.
Currently all those strings aren't set to be viewed by the user
in the AVD UI so we ignore them.
In the future we should use a specific flag to ignore some (like
avd.name) and allow others.
Change-Id: I4567dfd9ebfec1f09ab027019a8302e442962630
Xavier Ducrohet [Fri, 10 Jun 2011 21:24:54 +0000 (14:24 -0700)]
Merge "Make String-based hw prop not recognized."
Xavier Ducrohet [Fri, 10 Jun 2011 21:22:13 +0000 (14:22 -0700)]
Make String-based hw prop not recognized.
Currently all those strings aren't set to be viewed by the user
in the AVD UI so we ignore them.
In the future we should use a specific flag to ignore some (like
avd.name) and allow others.
Change-Id: Icab59bcc0b97c14fa14b786c737457434b7f51ac
Xavier Ducrohet [Fri, 10 Jun 2011 21:18:29 +0000 (14:18 -0700)]
Merge "Cherrypick
e2bdf98b from master to r12. do not merge." into tools_r12
Xavier Ducrohet [Fri, 10 Jun 2011 21:18:25 +0000 (14:18 -0700)]
Merge "CherryPick
ce54b194 from master into r12. do not merge." into tools_r12
Raphael Moll [Fri, 10 Jun 2011 20:47:39 +0000 (22:47 +0200)]
Cherrypick
e2bdf98b from master to r12. do not merge.
Fix NPE on edit unknown AVD hardware property.
Change-Id: I93d2348622b8ccd320c76e40c508bf15ff96ff31
Raphael Moll [Fri, 10 Jun 2011 20:22:34 +0000 (22:22 +0200)]
CherryPick
ce54b194 from master into r12. do not merge.
Fix AVD detail not displaying correctly.
Change-Id: If6bf328e38cc1e57bdedf060ea0a27d12b41c487
Tor Norbye [Fri, 10 Jun 2011 20:58:35 +0000 (13:58 -0700)]
Fix proguard template to avoid shrinking XML-only references
See 16384: ProGuard template generated by the ADT is flawed
Change-Id: I6ebbcf059bbee8c485747dcee55f4ecfa14b6831
Xavier Ducrohet [Fri, 10 Jun 2011 20:55:12 +0000 (13:55 -0700)]
Merge "Fix NPE on edit unknown AVD hardware property."
Raphael Moll [Fri, 10 Jun 2011 20:47:39 +0000 (22:47 +0200)]
Fix NPE on edit unknown AVD hardware property.
Change-Id: Ie79eb0bbfef17dd114b2002bbf5414d375eeb499
Tor Norbye [Fri, 10 Jun 2011 20:41:51 +0000 (13:41 -0700)]
Workaround view info cookie bug
This changeset works around the case where a ViewInfo cookie is
identical to its parent. This is for example the case for a
ZoomControls widget, where the child views have MergeCookies whole
value points to the parent ZoomControl.
Change-Id: Ie0eb62750fba6eeaa7241edce68e05f853e08a75
Xavier Ducrohet [Fri, 10 Jun 2011 20:27:12 +0000 (13:27 -0700)]
Merge "Fix AVD detail not displaying correctly."
Raphael Moll [Fri, 10 Jun 2011 20:22:34 +0000 (22:22 +0200)]
Fix AVD detail not displaying correctly.
Change-Id: I4ecf1c25c9f9defe28b8896332301c15b343c056
Tor Norbye [Fri, 10 Jun 2011 18:47:39 +0000 (11:47 -0700)]
Merge "Fix refresh issue in the resource chooser"
Tor Norbye [Fri, 10 Jun 2011 18:47:32 +0000 (11:47 -0700)]
Merge "Fix excludes in the change layout/widget refactoring dialogs"
Tor Norbye [Fri, 10 Jun 2011 18:47:21 +0000 (11:47 -0700)]
Merge "Fix GestureOverlayView handling"
Tor Norbye [Fri, 10 Jun 2011 18:29:58 +0000 (11:29 -0700)]
Fix GestureOverlayView handling
This CL fixes a number of problems related to the GestureOverlayView.
The first big problem was that GestureOverlayView lives in the
android.gesture package, which is not one of the special builtin
packages you can omit when specifying the element in layout XML
files. This CL both stores a full path in the descriptor XML name,
which fixes tag-to-descriptor lookup (without this we were showing the
wrong icon and missing vital attributes in completion), and handles
scenarios where the full path has to be used.
The second problem was that the descriptor metadata listed
GestureOverlayView as a "view" rather than a "layout", which meant
that it was missing information about children (which meant you
couldn't drop into it), and it was missing layout params (which meant
children couldn't be assigned attributes like layout_width and
layout_height).
Also tweak selection handling for gesture views.
There are a number of places where we need to go from a class name to
a view descriptor; these are now centralized in a utility method and
sped up with a map lookup.
(Issues fixed: #17541, #17543)
Change-Id: I67c450f28eab07b3575e510420b7faf4410085e3
Tor Norbye [Fri, 10 Jun 2011 18:19:59 +0000 (11:19 -0700)]
Fix refresh issue in the resource chooser
When you switch between Framework and Project resources in the
resource chooser, the icon preview would not get updated since
apparently no selection event is fired. This fixes that issue.
Change-Id: I431ba3be4fbc01594232deb1a2f3949894cd8899
Tor Norbye [Fri, 10 Jun 2011 18:17:16 +0000 (11:17 -0700)]
Fix excludes in the change layout/widget refactoring dialogs
Change-Id: Ib1564f7528d36182071427b795f9e15da64ffc7a
Tor Norbye [Fri, 10 Jun 2011 00:53:39 +0000 (17:53 -0700)]
Merge "Fix build"
Tor Norbye [Fri, 10 Jun 2011 00:52:53 +0000 (17:52 -0700)]
Fix build
Change-Id: Ie72e6f7b2c66dd25066b3c53b8d59ca4e2130e9a
Josiah Gaskin [Fri, 10 Jun 2011 00:25:01 +0000 (17:25 -0700)]
Merge "Disable PostComp in ADT except on Export or Debug"
Xavier Ducrohet [Fri, 10 Jun 2011 00:23:00 +0000 (17:23 -0700)]
Merge "Revert ScreenLayoutSize to ScreenSize."
Josiah Gaskin [Wed, 8 Jun 2011 01:05:42 +0000 (18:05 -0700)]
Disable PostComp in ADT except on Export or Debug
This patch adds a check in PostCompilerBuilder so if a flag is
not explicitly set (as is done by ExportHelper and Launch) then
it will skip and not do packaging. This should speed up the incremental
build on file save at the cost of slightly longer builds when pushing
to the debugger.
Change-Id: I2993f91a9b53e767e77da82de61b2699dd1127a4
Xavier Ducrohet [Fri, 10 Jun 2011 00:18:41 +0000 (17:18 -0700)]
Revert ScreenLayoutSize to ScreenSize.
I hadn't noticed that LayoutLib actually uses ScrenSize
through the tools-common-prebuilt.jar, so this API is (somewhat*)
frozen.
* Somewhat because LayoutLib.jar actually only uses Density and
ScreenSize but not the other enums (yet?) so the rename of DockMode
is not a problem.
Change-Id: Ida3360b0111abd96d2a27c16833b282706774fb6
Xavier Ducrohet [Thu, 9 Jun 2011 23:21:43 +0000 (16:21 -0700)]
Merge "Renamed some resource enum/qualifiers to be more consistent with the platform."
Xavier Ducrohet [Thu, 9 Jun 2011 22:42:31 +0000 (15:42 -0700)]
Renamed some resource enum/qualifiers to be more consistent with the platform.
Change-Id: I9c5ea5183e115582e0b805ca3ec75aad70e4a65c
Xavier Ducrohet [Thu, 9 Jun 2011 21:34:49 +0000 (14:34 -0700)]
Merge "Add support for the new width/height resource qualifiers."
Xavier Ducrohet [Thu, 9 Jun 2011 21:07:57 +0000 (14:07 -0700)]
Add support for the new width/height resource qualifiers.
Also add Television to the dock mode (which is really UI Mode).
Change-Id: I97e3fbea1806a32d8267d8e462211add2b122ed0
Tor Norbye [Thu, 9 Jun 2011 21:19:23 +0000 (14:19 -0700)]
Merge "Fix various warnings"
Tor Norbye [Thu, 9 Jun 2011 18:46:40 +0000 (11:46 -0700)]
Fix various warnings
I ran the latest version of findbugs on our codebase and fixed some
(not all!) of the warnings.
I also ran with Eclipse 3.7 RC3 and updated our compiler warning
settings for the new warnings that are available.
I also fixed some DOS line endings in some files (formatted with CRLF
instead of LF).
Change-Id: I9a9d34a9b60f2cb609245793815d96a4587007b0
Tor Norbye [Thu, 9 Jun 2011 18:17:41 +0000 (11:17 -0700)]
Merge "Hide ClassNotFoundExceptions from the error console."
Tor Norbye [Thu, 9 Jun 2011 18:17:31 +0000 (11:17 -0700)]
Merge "Suggest similar class names or missing pkgs in the error console"
Tor Norbye [Thu, 9 Jun 2011 00:40:07 +0000 (17:40 -0700)]
Hide ClassNotFoundExceptions from the error console.
When a class is not found during rendering, the name of the class (all
by itself, with no other explanation) will show up in the error
console. That's because we include all the render errors there.
However, class loading failures is handled specially in the project
callback, where the names of missing and broken classes are recorded
and later presented in a special way with hyperlinks. Therefore, we
don't need this first error listing of the missing class, especially
since it's confusing since it just lists the class name all by itself.
This changeset simply hides ClassNotFoundExceptions from the error
console since they will be listed in a cleaner way by the separate
mechanism.
NOTE: The exception *will* go to the IDE log as before, it just won't
appear in the user-visible error console shown below the layout
editor.
Change-Id: I34e90ba26ee77f8b3c56f528aaaf7fddca6620ad
Tor Norbye [Thu, 9 Jun 2011 00:19:20 +0000 (17:19 -0700)]
Suggest similar class names or missing pkgs in the error console
If the layout XML file contains typos, the rendering will fail and the
canvas will list the missing classes along with hyperlinks to create a
new class, configure the build path etc.
This changeset looks for "typos" in the view names and if it finds a
similar real view class, either among the Android views or among the
custom views in the current project, then it will add a hyperlink
suggestion to fix the XML by editing the name to the correct spelling.
It also handles the scenario where you have typed in a custom view
class name correctly, but have forgotten to include its package.
In a followup changeset this functionality will be available from the
XML editing quick assistant as well.
Change-Id: Iaefd3f503795e25e6eb38353c60c645061d4814e
Tor Norbye [Wed, 8 Jun 2011 21:23:02 +0000 (14:23 -0700)]
Merge "Code completion improvements inside custom views"
Tor Norbye [Wed, 8 Jun 2011 21:07:10 +0000 (14:07 -0700)]
Merge "Improve error handling for missing and broken custom view classes"
Tor Norbye [Wed, 8 Jun 2011 21:07:03 +0000 (14:07 -0700)]
Merge "Custom sort property sheet categories"
Tor Norbye [Fri, 3 Jun 2011 16:41:54 +0000 (09:41 -0700)]
Code completion improvements inside custom views
This CL fixes several issues when using code completion inside a tag
that is a custom view. In that case we don't have a valid descriptor
which specifies the allowable children, which meant completing inside
any of the children, even if they are standard Android widgets, would
not locate names and attributes. This fixes that, along with handling
dots in tag names which caused other code completion problems.
Change-Id: If0f007322c6aa00363ab32baf6191a3d3ffb9883
Tor Norbye [Wed, 8 Jun 2011 17:17:40 +0000 (10:17 -0700)]
Improve error handling for missing and broken custom view classes
When a view class cannot be found during rendering, the error log
lists the class as missing, and presents the class as a
hyperlink. Clicking the link will open the New Class wizard.
This CL changes this such that there are multiple links instead:
- "Fix Build Path": This opens the Java Build Path preference page in
the Options dialog for the current project where you can fix the
build path of the project, since a more common source of missing
classes is a problem with the class path.
- "Edit XML": This switches to the XML tab where you can edit the name
of the custom view tag: A "missing" view is often a typo in the view
name
- "Create Class": This opens the create class wizard as before.
Similarly, for broken classes (where the class is found, but cannot be
instantiated correctly) the following hyperlinks are offered:
- "Open Class", which shows the class in the editor
- "Show Error Log", which will open the IDE error log where you
typically can find a full stack trace from the failed invocation.
In addition, this CL fixes
14546: Creating a custom view from the error output of the layout
editor creates it in gen
by ensuring that the gen/ folder is not one of the fragment roots
presented to the New Class wizard.
Change-Id: I06b8969800caaea719e4b52608a7ed130c91837d
Tor Norbye [Wed, 8 Jun 2011 15:43:43 +0000 (08:43 -0700)]
Merge "17466: Strip Whitespace from Project Name to Activity"
Tor Norbye [Wed, 8 Jun 2011 05:36:11 +0000 (22:36 -0700)]
17466: Strip Whitespace from Project Name to Activity
Also moved the capitalize() method from DescriptorsUtils
to the AdtUtils method with the other general string
utilities.
Change-Id: Iffdbd906c5a4ecbd89c2f037d95f007e44733513
Tor Norbye [Wed, 8 Jun 2011 02:33:31 +0000 (19:33 -0700)]
Merge "Handle fragment tags in included contexts"
Tor Norbye [Fri, 27 May 2011 01:55:26 +0000 (18:55 -0700)]
Handle fragment tags in included contexts
This changeset fixes the support for rendering user-chosen layouts in
<fragment> tags in a couple of scenarios:
- where the fragment is part of a layout that "surrounds" the current
layout (e.g. "show included in")
- where the fragment is part of a layout that is included from the
edited layout
In both cases, the fragment is read from a layout that is parsed with
a plain pull parser rather than the full XML node model used for
edited layouts, so to fix this the ContextPullParser now looks
specially for <fragment> tags and handles these specially.
In the second scenario, the parser is constructed by layoutlib, so we
have to use the project callback to anticipate requested parsers and
supply our own fragment-capable pull parsers instead.
Change-Id: I8aba253ac0c1a0d5dad7bc6efb9def5f20c75144
Tor Norbye [Wed, 8 Jun 2011 02:19:11 +0000 (19:19 -0700)]
Custom sort property sheet categories
The property sheet is hardcoded to sort property categories
alphabetically.
Unfortunately, this means that for most widgets, the first properties
listed in the property sheet is "Deprecated" !
This changeset adds a custom sorter to the propertysheet, and sorts
the deprecated category to the bottom. It also sorts the "Misc"
category second to last, which means that you'll usually see the type
of the widget (e.g. "Button" or "EditText") at the top.
Change-Id: Ib2c8ec81cae82650a8a41e533e3803a1f6582fa7
Xavier Ducrohet [Wed, 8 Jun 2011 00:08:30 +0000 (17:08 -0700)]
Merge "Add proper styleable support."
Xavier Ducrohet [Tue, 7 Jun 2011 23:25:12 +0000 (16:25 -0700)]
Add proper styleable support.
Change-Id: I2dc79e71521f93d798fd4a9b33aa59979bef379d