OSDN Git Service

android-x86/sdk.git
12 years agoMerge "Add a new XML formatter, new options, and format on save"
Tor Norbye [Tue, 2 Aug 2011 21:43:03 +0000 (14:43 -0700)]
Merge "Add a new XML formatter, new options, and format on save"

12 years agoMerge "Add clipart support to the asset set wizard"
Tor Norbye [Tue, 2 Aug 2011 21:25:29 +0000 (14:25 -0700)]
Merge "Add clipart support to the asset set wizard"

12 years agoAdd clipart support to the asset set wizard
Tor Norbye [Fri, 29 Jul 2011 02:33:36 +0000 (19:33 -0700)]
Add clipart support to the asset set wizard

This changeset adds clipart support to the asset set wizard. There is
only one placeholder clipart image now but the code reads the
available images from the jar dynamically.

This changeset also adds "file exists - replace yes, no, always,
never" handling for the generated icons.

Change-Id: I38d0c40957eff4a9e844e29d61f2c57493bd10f0

12 years agoMerge "Fix ADT on Windows: don't use private FontData fields."
Raphael Moll [Tue, 2 Aug 2011 20:39:17 +0000 (13:39 -0700)]
Merge "Fix ADT on Windows: don't use private FontData fields."

12 years agoFix ADT on Windows: don't use private FontData fields.
Raphael Moll [Tue, 2 Aug 2011 20:17:27 +0000 (13:17 -0700)]
Fix ADT on Windows: don't use private FontData fields.

Most FontData fields must NOT be accessed directly
as they are platform-dependent.

Change-Id: I26ad9b40b9d2040931551c6f08fa033ef3c24386

12 years agoMerge "ADT Resource Repo stores IDs and Called Once"
Josiah Gaskin [Tue, 2 Aug 2011 20:02:07 +0000 (13:02 -0700)]
Merge "ADT Resource Repo stores IDs and Called Once"

12 years agoAdd a new XML formatter, new options, and format on save
Tor Norbye [Fri, 29 Jul 2011 20:04:31 +0000 (13:04 -0700)]
Add a new XML formatter, new options, and format on save

This changeset adds a custom XML formatter for the Android XML
editors.

There is an option for turning off this formatter and using the
standard XML formatter instead.

The new custom formatter offers the following features:

* By default, it formats files following the Android conventions for
  XML formatting. This means not only that it indents with 4 space
  characters (instead of the Eclipse default of one tab character),
  but it places attributes on a line of their own, it adds blank
  lines in certain places, and so on.

* It sorts attributes (logically, alphabetically, or none)

* It formats files with different styles depending on the context.
  For example, in layout files it always places a single blank line
  between view elements, whereas in manifest files it only places
  blank lines between elements of different types such that for
  example the <uses-permission> elements all form a logical group,
  separated from <uses-sdk> and so on.

  The fact that strings.xml and layout.xml are usually formatted with
  different flavors is one of the reasons setting up the old Eclipse
  XML formatter to do the right thing was not possible.

In addition, there are various user options added to the Editors
preference page where you can tweak the behavior of the formatter,
such as turning off blank lines completely, controlling whether there
is a space before the > or /> closing characters, and you can also
tell the formatter to use Eclipse's indentation setting (indentation
size and whether to use spaces or tabs).

Finally, there is a new "Format on Save" option which behaves just
like Format on Save for Java files: when you press Ctrl-S to save a
file, the XML content will be formatted before the file is saved.

Change-Id: Ic6f05c768ab063b09f6f0248f60fbe8722fb149d

12 years agoADT Resource Repo stores IDs and Called Once
Josiah Gaskin [Mon, 18 Jul 2011 23:54:43 +0000 (16:54 -0700)]
ADT Resource Repo stores IDs and Called Once

This change makes ADT parse out @+id declarations from layout and
menu files and store them in its ResourceRepository. This eliminates
the need to merge in IDs from the generated R.java in order to have
a complete repository of resources.

In order to do this, a new type of ResourceFile is created:
IdGeneratingResourceFile which is used for xml files in menu/ and layout/.
Also includes an IdResourceParser which finds all the declared IDs in an XML.

This change also includes a change to the ResourceMananger to process
raw deltas that can be provided either from the PreCompilerBuilder or from
the GlobalProjectManager. This is to avoid duplicate deltas being passed
to ResourceManager when autobuilding.

Change-Id: I1c705a5f5a01ce7daa3eb76f14bd6cb9e11b5248

12 years agoMerge "New plug-in supporting NDK with CDT"
Xavier Ducrohet [Mon, 1 Aug 2011 23:15:46 +0000 (16:15 -0700)]
Merge "New plug-in supporting NDK with CDT"

12 years agoMerge "SDK Manager2 revamp of package display"
Raphael Moll [Mon, 1 Aug 2011 21:10:26 +0000 (14:10 -0700)]
Merge "SDK Manager2 revamp of package display"

12 years agoMerge "SDK Manager: Fix display of Archive sizes."
Raphael Moll [Mon, 1 Aug 2011 21:10:20 +0000 (14:10 -0700)]
Merge "SDK Manager: Fix display of Archive sizes."

12 years agoSDK Manager2 revamp of package display
Raphael Moll [Fri, 29 Jul 2011 23:57:33 +0000 (16:57 -0700)]
SDK Manager2 revamp of package display

Always compute the sort-by-api and the sort-by-source
lists together. This allows the UI to change the display
whilst the underlying packages are being updated.

Change-Id: I6dc551bc27afa1b81bb4a26c236d8fcf5d910884

12 years agoSDK Manager: Fix display of Archive sizes.
Raphael Moll [Fri, 29 Jul 2011 22:57:14 +0000 (15:57 -0700)]
SDK Manager: Fix display of Archive sizes.

SDK Issue: 18875

Change-Id: I702e11cff07bded8e90d415541040fc06ceb7d49

12 years agoMerge "Make SDK Manager2 window app-modal."
Raphael Moll [Fri, 29 Jul 2011 20:50:34 +0000 (13:50 -0700)]
Merge "Make SDK Manager2 window app-modal."

12 years agoMake SDK Manager2 window app-modal.
Raphael Moll [Fri, 29 Jul 2011 19:49:38 +0000 (12:49 -0700)]
Make SDK Manager2 window app-modal.

SDK Bug: 5097338

Change-Id: I3969ac6920e70513723a6fb917be520b59ebd7f1

12 years agoMerge "Add Java Quick Assistant for Extracting Strings"
Tor Norbye [Fri, 29 Jul 2011 20:17:10 +0000 (13:17 -0700)]
Merge "Add Java Quick Assistant for Extracting Strings"

12 years agoAdd Java Quick Assistant for Extracting Strings
Tor Norbye [Thu, 28 Jul 2011 21:07:18 +0000 (14:07 -0700)]
Add Java Quick Assistant for Extracting Strings

This changeset adds a Quick Assistant to Java files in Android
projects, which proposes "Extract String" when the caret is within a
String literal.

It also moves a couple of utility methods from the Hyperlinks class to
the AdtUtils class.

Change-Id: Ica5ff40e32e3e145481d6c895178109289ed1d9b

12 years agoMerge "Add text support to asset studio wizard"
Tor Norbye [Fri, 29 Jul 2011 19:17:44 +0000 (12:17 -0700)]
Merge "Add text support to asset studio wizard"

12 years agoMerge "Add tooltip drag feedback for relative layout"
Tor Norbye [Fri, 29 Jul 2011 19:16:49 +0000 (12:16 -0700)]
Merge "Add tooltip drag feedback for relative layout"

12 years agoMerge "Back out quick-outline customization: Requires Eclipse 3.6"
Tor Norbye [Fri, 29 Jul 2011 19:15:11 +0000 (12:15 -0700)]
Merge "Back out quick-outline customization: Requires Eclipse 3.6"

12 years agoBack out quick-outline customization: Requires Eclipse 3.6
Tor Norbye [Fri, 29 Jul 2011 19:13:50 +0000 (12:13 -0700)]
Back out quick-outline customization: Requires Eclipse 3.6

Change-Id: I7c529c81dd53c8ff0ad12ada78de2961910aa336

12 years agoMerge "Customize Quick Outline for Layout and Resource editors"
Tor Norbye [Fri, 29 Jul 2011 19:10:23 +0000 (12:10 -0700)]
Merge "Customize Quick Outline for Layout and Resource editors"

12 years agoCustomize Quick Outline for Layout and Resource editors
Tor Norbye [Fri, 29 Jul 2011 18:48:40 +0000 (11:48 -0700)]
Customize Quick Outline for Layout and Resource editors

The XML editor has a Quick Outline (Cmd-O) but it only displays the
tag name. This means that you only see "Button" instead of ids to
distinguish similar widgets - and it also means that you can't filter
based on the ids or names.

This changeset adds a custom configuration for the XML quick outline
used by the layout editor and the resource editor which includes the
id or name attributes, and it also picks up the palette icons for the
various widgets.

Change-Id: I08e5d8d10f8f2ad0c2633488d3520d48da6c20cb

12 years agoMerge "Style: space after synchronized (object) {...}"
Raphael Moll [Fri, 29 Jul 2011 18:26:51 +0000 (11:26 -0700)]
Merge "Style: space after synchronized (object) {...}"

12 years agoMerge "SDK Manager2: Revamp progress bar handling."
Raphael Moll [Fri, 29 Jul 2011 18:26:16 +0000 (11:26 -0700)]
Merge "SDK Manager2: Revamp progress bar handling."

12 years agoAdd text support to asset studio wizard
Tor Norbye [Thu, 28 Jul 2011 22:18:33 +0000 (15:18 -0700)]
Add text support to asset studio wizard

Change-Id: I91fe21d73d642c1c5931ad346c7db7534a05262c

12 years agoMerge "Add a text rendering utility class to the Asset Studio library."
Tor Norbye [Thu, 28 Jul 2011 23:33:14 +0000 (16:33 -0700)]
Merge "Add a text rendering utility class to the Asset Studio library."

12 years agoAdd a text rendering utility class to the Asset Studio library.
Roman Nurik [Thu, 28 Jul 2011 06:39:32 +0000 (23:39 -0700)]
Add a text rendering utility class to the Asset Studio library.

Add a text rendering utility class to the Asset Studio library. Also
fix a tiny edge-case bug in image scaling. The text rendering class
allows rendering a String with some options to a BufferedImage, for
input as the sourceImage to a GraphicGenerator.

Change-Id: I8e17e9a25ac2e48fa55e2994706aeb572da54223

12 years agoAdd tooltip drag feedback for relative layout
Tor Norbye [Tue, 12 Jul 2011 21:21:08 +0000 (14:21 -0700)]
Add tooltip drag feedback for relative layout

This changeset adds tooltip drag feedback for RelativeLayout. During
dragging, the matched edge can quickly change from the left side to
the right side or the top to the bottom edge, so the tooltip support
now allows a client to specify where to align the tooltip not just at
creation but also during updates. This is particularly important for
RelativeLayout where we need to ensure that the tooltips do not
obscure the constraint feedback arrows.  And to prevent flicker, it
uses a timer to ensure that there is at least 750 ms between the
repositioning of the tooltip (but it will apply a side change
immediately if it has been 750 ms since the last time the alignment
changed).

Change-Id: I8817db67844ad13c651d343ad310d8646e34dfca

12 years agoMerge "Allow GridLayout to exist in project packages"
Tor Norbye [Wed, 27 Jul 2011 23:51:06 +0000 (16:51 -0700)]
Merge "Allow GridLayout to exist in project packages"

12 years agoAllow GridLayout to exist in project packages
Tor Norbye [Fri, 15 Jul 2011 20:04:29 +0000 (13:04 -0700)]
Allow GridLayout to exist in project packages

Change-Id: Ia455a9c9de853dcc0e5152a8b24a09192c39b3b4

12 years agoMerge "18623: Adding ImageView in xml file causes crash of Eclipse"
Tor Norbye [Wed, 27 Jul 2011 23:48:46 +0000 (16:48 -0700)]
Merge "18623: Adding ImageView in xml file causes crash of Eclipse"

12 years agoMerge "Asset Studio wizard"
Tor Norbye [Wed, 27 Jul 2011 23:48:25 +0000 (16:48 -0700)]
Merge "Asset Studio wizard"

12 years agoAsset Studio wizard
Tor Norbye [Sat, 16 Jul 2011 04:16:56 +0000 (21:16 -0700)]
Asset Studio wizard

This is an initial integration of the Android Asset Studio into
Eclipse, as a New Asset wizard. It uses the Java port of the Android
Asset Studio to generate the assets:
  https://code.google.com/a/google.com/p/android-asset-studio-java/
It only supports launcher icons, and some of the configurable
parameters (file, shape, crop).

To run it, put the AssetStudioLib.jar file into the the adt libs
directory.

There's a new "Asset Set" wizard in the New wizard, which will open up
a two page wizard; the first page lets you select the project (which
it attempts to pick up from context), as well as the type of asset to
create, and the asset output name.

In the second page there are the various widgets to tweak the code
generator, and a preview area on the right which updates as you tweak
the various controls.

The main remaining work is to support additional asset types as
they are added to the assetstudio generator library.

Change-Id: I2e556337f8e5c3bc09e84b35a342ba05110abebc

12 years agoStyle: space after synchronized (object) {...}
Raphael Moll [Wed, 27 Jul 2011 23:36:44 +0000 (16:36 -0700)]
Style: space after synchronized (object) {...}

For keywords such as if, for, while, we put a space
between the keyword and the expression. Same should
go for synchronized (object) {}.

Change-Id: I5b145912f9346e3f4d8367865c2729abea68fdbc

12 years agoMerge "Initial commit for the Asset Studio library in the SDK"
Xavier Ducrohet [Wed, 27 Jul 2011 23:31:18 +0000 (16:31 -0700)]
Merge "Initial commit for the Asset Studio library in the SDK"

12 years agoMerge "Fix undo problems in the XML editor (issue #15901)"
Tor Norbye [Wed, 27 Jul 2011 23:15:21 +0000 (16:15 -0700)]
Merge "Fix undo problems in the XML editor (issue #15901)"

12 years agoMerge "Sort XML attributes logically"
Tor Norbye [Wed, 27 Jul 2011 23:15:08 +0000 (16:15 -0700)]
Merge "Sort XML attributes logically"

12 years agoSDK Manager2: Revamp progress bar handling.
Raphael Moll [Wed, 27 Jul 2011 22:12:14 +0000 (15:12 -0700)]
SDK Manager2: Revamp progress bar handling.

Change-Id: Ic5751f5c86f7cd4cf31927d83368a7fcb432e216

12 years agoMerge changes I984ae397,I24f74378
Raphael Moll [Wed, 27 Jul 2011 20:23:08 +0000 (13:23 -0700)]
Merge changes I984ae397,I24f74378

* changes:
  SDK Man2: Clear local source caches when reloading.
  A few minor UI tweaks to SDK Manager 2.

12 years agoMerge "SDK Manager2: revamp package diff logic."
Raphael Moll [Wed, 27 Jul 2011 20:20:25 +0000 (13:20 -0700)]
Merge "SDK Manager2: revamp package diff logic."

12 years agoMerge "Fix code completion handling for text selection"
Tor Norbye [Wed, 27 Jul 2011 17:18:59 +0000 (10:18 -0700)]
Merge "Fix code completion handling for text selection"

12 years agoMerge "Fix 18539: "Extract Android String" mangles the replacement str"
Tor Norbye [Wed, 27 Jul 2011 16:42:51 +0000 (09:42 -0700)]
Merge "Fix 18539: "Extract Android String" mangles the replacement str"

12 years ago18623: Adding ImageView in xml file causes crash of Eclipse
Tor Norbye [Wed, 27 Jul 2011 02:15:32 +0000 (19:15 -0700)]
18623: Adding ImageView in xml file causes crash of Eclipse

Catch exceptions encountered during preview rendering in resource
choosers to ensure that they don't derail the chooser dialog.

Change-Id: I6a0763cea2598b609283d284967c1121b1b18fdb

12 years agoFix 18539: "Extract Android String" mangles the replacement str
Tor Norbye [Wed, 27 Jul 2011 01:44:46 +0000 (18:44 -0700)]
Fix 18539: "Extract Android String" mangles the replacement str

The refactoring could end up processing the current Java file twice -
first using the normal code path, and a second time if the "Replace in
All Java Files" checkbox was checked. This second pass would add a
second set of edits which would mangle the file.

Change-Id: I99ed50ab477af12d7fb54a7de6401689dad5d104

12 years agoFix code completion handling for text selection
Tor Norbye [Wed, 27 Jul 2011 00:43:22 +0000 (17:43 -0700)]
Fix code completion handling for text selection

This CL fixes
18607: ADT 12 problems with xml files

The bug is that if there is a text selection and you invoke code
completion and select an alternative, the wrong number of characters
is deleted as part of the replacement.

The fix is simple: remove the code which adds in the selection count
from the replacement string, since the complete replacement count is
now already computed properly without regard for the selection (we
should -always- replace the complete value token, not just the
selection).

Most of the diffs actually pertain to new unit tests for this because
the testing infrastructure needed some changes to handle references to
selection ranges rather than just caret offsets.

There are also a couple of updates to some test goldenfiles unrelated
to this fix, which updates the golden files to reflect recent changes
like the package name of GestureOverlayViews and the @attr resource
type in completion.

Change-Id: Ie4f680f201930414457a79846f722db6efc89f93

12 years agoSDK Man2: Clear local source caches when reloading.
Raphael Moll [Tue, 26 Jul 2011 17:21:00 +0000 (10:21 -0700)]
SDK Man2: Clear local source caches when reloading.

Change-Id: I984ae397ada014ff8869d5775be1bc779ef22319

12 years agoA few minor UI tweaks to SDK Manager 2.
Raphael Moll [Mon, 25 Jul 2011 22:59:37 +0000 (15:59 -0700)]
A few minor UI tweaks to SDK Manager 2.

- Make the tree filter checkboxes (new, installed, obsolete)
  work again but this time by using a proper TreeViewer filter.
- Fix missing name column icons in the TreeViewer.
- Fix display of obsolete items, trimming the duplicated platform
  name when possible.

Change-Id: I24f743788b01fe8c9c5f9a7f9b301f725e32f666

12 years agoSDK Manager2: revamp package diff logic.
Raphael Moll [Thu, 21 Jul 2011 22:53:43 +0000 (15:53 -0700)]
SDK Manager2: revamp package diff logic.

This revamps the diff algorithm used to merge
the local and remote packages found during a
repository load into the PkgItems displayed in
the tree viewer.

FYI all the Package and Archive sub-classes are getting
an equals() and hashCode() methods to make them behave
correctly when put it in a HashTable or Set. These are
the auto-generated stuff from Eclipse.

Change-Id: I1494a0ed44cd768eed252e3a81b9e74bf86d563c

12 years agoMerge "SDK Man2: New UTs for install/delete cases."
Raphael Moll [Mon, 25 Jul 2011 21:32:36 +0000 (14:32 -0700)]
Merge "SDK Man2: New UTs for install/delete cases."

12 years agoSDK Man2: New UTs for install/delete cases.
Raphael Moll [Wed, 20 Jul 2011 21:36:00 +0000 (14:36 -0700)]
SDK Man2: New UTs for install/delete cases.

Change-Id: I1f1e95592f4946ab61ad512f187f87be60ea5834

12 years agoMerge "Fix possible NPE in prop page if ProjectState is null."
Xavier Ducrohet [Thu, 21 Jul 2011 19:52:13 +0000 (12:52 -0700)]
Merge "Fix possible NPE in prop page if ProjectState is null."

12 years agoMerge "Add support for aapt CrunchCache in ADT and Ant"
Josiah Gaskin [Thu, 21 Jul 2011 16:51:17 +0000 (09:51 -0700)]
Merge "Add support for aapt CrunchCache in ADT and Ant"

12 years agoAdd support for aapt CrunchCache in ADT and Ant
Josiah Gaskin [Tue, 7 Jun 2011 23:06:06 +0000 (16:06 -0700)]
Add support for aapt CrunchCache in ADT and Ant

This change lets ADT and Ant use the crunch cache system
set up in change I58271fb2. This commit is separate because
sdk and framework are separate git repositories.

Change-Id: If2828d157acad0b5adb812001e777c199e3c62fe

12 years agoMerge "Add support to Ant for packaging dependency checks"
Josiah Gaskin [Thu, 21 Jul 2011 16:48:04 +0000 (09:48 -0700)]
Merge "Add support to Ant for packaging dependency checks"

12 years agoFix possible NPE in prop page if ProjectState is null.
Xavier Ducrohet [Thu, 21 Jul 2011 00:24:19 +0000 (17:24 -0700)]
Fix possible NPE in prop page if ProjectState is null.

If default.prop is not present then ProjectState is null,
but the property page is required to set the target (to create
the file)...

Change-Id: I8bb9337476c4de1d20feca946a6f2361dc8c9af3

12 years agoMerge "Fix to avoid NPE in ADT PreCompiler"
Josiah Gaskin [Wed, 20 Jul 2011 23:00:22 +0000 (16:00 -0700)]
Merge "Fix to avoid NPE in ADT PreCompiler"

12 years agoFix to avoid NPE in ADT PreCompiler
Josiah Gaskin [Wed, 20 Jul 2011 22:52:56 +0000 (15:52 -0700)]
Fix to avoid NPE in ADT PreCompiler

This change removes the possibility of throwing an NPE when calling
AAPT from the PreCompilerBuilder.

Change-Id: I521e4088d1f0942e575d6edff91049c78d9c1eb8

12 years agoMerge "SDK Manager 2: incremental sort when sorting by source + UT"
Raphael Moll [Wed, 20 Jul 2011 20:41:23 +0000 (13:41 -0700)]
Merge "SDK Manager 2: incremental sort when sorting by source + UT"

12 years agoMerge "Add support to Ant for dependency checking"
Josiah Gaskin [Wed, 20 Jul 2011 17:14:30 +0000 (10:14 -0700)]
Merge "Add support to Ant for dependency checking"

12 years agoMerge "Adding support to ADT and ant for smart R.java gen"
Josiah Gaskin [Wed, 20 Jul 2011 17:14:15 +0000 (10:14 -0700)]
Merge "Adding support to ADT and ant for smart R.java gen"

12 years agoMerge "Properly unload the target data when unloading an sdk."
Xavier Ducrohet [Wed, 20 Jul 2011 00:21:13 +0000 (17:21 -0700)]
Merge "Properly unload the target data when unloading an sdk."

12 years agoProperly unload the target data when unloading an sdk.
Xavier Ducrohet [Tue, 19 Jul 2011 18:35:23 +0000 (11:35 -0700)]
Properly unload the target data when unloading an sdk.

Change-Id: I927071585db46de12635b483b3a466e671a3bff6

12 years agoMerge "Add 7" tablets to device list used in the layout editor."
Xavier Ducrohet [Wed, 20 Jul 2011 00:15:45 +0000 (17:15 -0700)]
Merge "Add 7" tablets to device list used in the layout editor."

12 years agoMerge "Android project's output for JDT is now bin/classes/"
Xavier Ducrohet [Tue, 19 Jul 2011 00:18:33 +0000 (17:18 -0700)]
Merge "Android project's output for JDT is now bin/classes/"

12 years agoAndroid project's output for JDT is now bin/classes/
Xavier Ducrohet [Tue, 25 Jan 2011 18:34:09 +0000 (10:34 -0800)]
Android project's output for JDT is now bin/classes/

This matches the bin structure of the Ant build system where
the javac output is in bin/classes/ and the Android specific files
are in bin/
Also, this will allow us better control of android output files
as they won't conflict with javac's output.

New projects are created with this setup and existing projects
are converted as they are opened.

Change-Id: I83339906b0d43d7a988a75927c60b664c183d27f

12 years agoAdd support to Ant for packaging dependency checks
Josiah Gaskin [Fri, 24 Jun 2011 21:58:32 +0000 (14:58 -0700)]
Add support to Ant for packaging dependency checks

This change adds in support for making aapt generate a dependency
file for the .ap_ package generated during resource packaging. Ant
will then check this dependency file before calling aapt again and
will only repackage resources if the dependencies have been modified
in some way.

Change-Id: I56462163c5dd064c1416bc43913f044df8ee9be1

12 years agoAdd support to Ant for dependency checking
Josiah Gaskin [Wed, 22 Jun 2011 21:32:09 +0000 (14:32 -0700)]
Add support to Ant for dependency checking

This change adds dependency checking to the Ant generation of
R.java. If no resources have been changed or added since the
last generation of R.java then that call to aapt will be skipped.

Change-Id: I262b94111316496fac54da8030a6d474dc30b584

12 years agoAdding support to ADT and ant for smart R.java gen
Josiah Gaskin [Thu, 9 Jun 2011 22:45:04 +0000 (15:45 -0700)]
Adding support to ADT and ant for smart R.java gen

This change lets ADT and ant make use of the new
--extra-packages flag in aapt to allow for all the R.java
files to be generated using only one call rather than one call
per library.

Change-Id: Ibc060b1218010cfbae108f4f1aba2c25fe69a964

12 years agoMerge "More features for adb bash_completion"
Kenny Root [Mon, 18 Jul 2011 23:57:32 +0000 (16:57 -0700)]
Merge "More features for adb bash_completion"

12 years agoMerge "Various fixes to the DDMS Native heap panel."
Xavier Ducrohet [Mon, 18 Jul 2011 22:57:08 +0000 (15:57 -0700)]
Merge "Various fixes to the DDMS Native heap panel."

12 years agoVarious fixes to the DDMS Native heap panel.
Xavier Ducrohet [Mon, 18 Jul 2011 22:54:39 +0000 (15:54 -0700)]
Various fixes to the DDMS Native heap panel.

Change-Id: I468be358b937f63adca3528fb66aa5d70e2e6827

12 years agoMore features for adb bash_completion
Kenny Root [Fri, 15 Jul 2011 23:30:56 +0000 (16:30 -0700)]
More features for adb bash_completion

* Aborts early if "adb" isn't in the path.

* Clean up formatting to be more friendly to vim's syntax highlighter.

* Add vim mode line

* Adds these adb commands:
    install
    uninstall
    push
    pull
    reboot

* Rename "adb" to "adb.bash" so we can filter out more effectively.

Change-Id: I76cff06a12cd827ba1d901ac3005059635454822

12 years agoMerge "Read the default skin from sdk.properties."
Xavier Ducrohet [Sun, 17 Jul 2011 21:28:40 +0000 (14:28 -0700)]
Merge "Read the default skin from sdk.properties."

12 years agoRead the default skin from sdk.properties.
Xavier Ducrohet [Sun, 17 Jul 2011 21:19:56 +0000 (14:19 -0700)]
Read the default skin from sdk.properties.

Change-Id: Ifad6f2186e499f579df1608055dda4eca1084830

12 years agoSDK Manager 2: incremental sort when sorting by source + UT
Raphael Moll [Thu, 14 Jul 2011 04:49:51 +0000 (00:49 -0400)]
SDK Manager 2: incremental sort when sorting by source + UT

Also fixes some edge cases with the sort-by-api and ensure
switching between sorts doesn't mess too much with the
packages shown.

Change-Id: I7da43915f4e48bd6cd80760a6a15d657777fa0f7

12 years agoInitial commit for the Asset Studio library in the SDK
Roman Nurik [Fri, 15 Jul 2011 23:39:34 +0000 (16:39 -0700)]
Initial commit for the Asset Studio library in the SDK

Change-Id: I8f0aa6283af03c64c3563530defcf57ee2238bd8

12 years agoMerge "Add new InsertType for widget moves within the same layout"
Tor Norbye [Sat, 16 Jul 2011 01:12:34 +0000 (18:12 -0700)]
Merge "Add new InsertType for widget moves within the same layout"

12 years agoMerge "Fix to build dependencies during delayed PostComp"
Josiah Gaskin [Fri, 15 Jul 2011 22:15:14 +0000 (15:15 -0700)]
Merge "Fix to build dependencies during delayed PostComp"

12 years agoMerge "Adjust API level for phone comparator"
Tor Norbye [Fri, 15 Jul 2011 22:09:24 +0000 (15:09 -0700)]
Merge "Adjust API level for phone comparator"

12 years agoMerge "Add bash_completion scripts for adb"
Kenny Root [Fri, 15 Jul 2011 19:34:15 +0000 (12:34 -0700)]
Merge "Add bash_completion scripts for adb"

12 years agoAdd bash_completion scripts for adb
Kenny Root [Fri, 15 Jul 2011 17:49:53 +0000 (10:49 -0700)]
Add bash_completion scripts for adb

Adds rudimentary support for bash_completion using adb. It supports all
the optional arguments for adb, completion of individual commands, and
support for calling into the "shell" function and filename completion
within the shell.

Change-Id: I8e5ca53f3988140dc169a2e353dd92ff0438d6b7

12 years agoFix undo problems in the XML editor (issue #15901)
Tor Norbye [Fri, 15 Jul 2011 03:16:52 +0000 (20:16 -0700)]
Fix undo problems in the XML editor (issue #15901)

We've had a recurring problem where in difficult-to-reproduce
circumstances the Undo button doesn't seem to work: After making some
edits like dropping a button, each press of the Undo button will each
individual edit of the compound operation, such as undoing each
attribute set, each element add, and so on -- just as if the entire
edit operation did not run under an undo lock.

This changeset fixes this issue - or at least one scenario of it
(tracked in http://code.google.com/p/android/issues/detail?id=15901 )

It turns out that Eclipse in some cases decides to "cancel" the current
Undo operation. This is done in reaction to selection changes, and the
logic for that is related to a user using a form editor to switch
between various attribute fields, and expecting each text field edit
to be separate. In the above issue I've listed a thread dump which
shows one such cancellation which is definitely not desirable.

To fix this bug we add a workaround: In our code which sets up the
undo recording, we call "beginRecording" -repeatedly- (say 4 times).
Since undo units are allowed to be nested, this means we're nesting
our own undos 4 times, and when we're finished with the editing
operation we simply call endRecording a corresponding number of
times. This means that when the offending code comes around and calls
StructuredTextUndoManager.forceEndOfPendingCommand it will subtract
the command count by one, but we'll still be in one of our nested
contexts (and the editor does allow extra endRecording calls to be
called).

Change-Id: Ic4dde029efcb18def3c9daa5d3676c49a815d804

12 years agoSort XML attributes logically
Tor Norbye [Thu, 14 Jul 2011 22:35:14 +0000 (15:35 -0700)]
Sort XML attributes logically

This changeset modifies the layout editor such that it writes
attributes in a certain order:

* id
* style
* layout_width
* layout_height
* other layout_ attributes, sorted alphabetically
* other attributes, sorted alphabetically

The layout editor will produce attributes in this order when
- New widgets are dragged into the layout
- Widgets are moved in the layout
- It will also insert attributes in the right place when they are set
  as the result of (for example) using the context menu actions.

Note that this ordering is applied unconditionally - there is no user
setting to turn it off. However, note that the current behavior is
random - moving a view for example will scramble the attributes (in an
order which is related to hashkeys in a map), so the option would be
"sort attributes logically" versus "sort attributes randomly"; if we
want an option to "leave attribute order alone" that will need to be
implemented.

Limitations:
- This does not yet modify the formatter to reorganize attributes.
  Thus, Ctrl-Shift-F to reformat the XML will not change attribute
  order.
- It does not fix the problem that the XML model updater does not
  respect the formatting settings (such as one newline per attribute)
  when manipulating attributes.

This will be addressed/worked around in subsequent CLs.

Implementation Note:
The Eclipse XML model updater will unconditionally *append* any new
attributes. We take advantage of this to perform attribute sorting by
ensuring that we always insert new attributes in the right order. We
also check for existing attributes and any which fall
lexicographically later than the new attributes are removed and
reinserted in the right sequence. In order to avoid performing these
removals and additions repeatedly on a node when we set multiple
attributes, and to avoid flushing attribute changes *immediately*
(which was the case until this), we now queue up all pending attribute
values in the nodes and apply them at the end when all attribute
changes for a given node are known.
Change-Id: If39f8c29f26e281f7c6622a31e11ba49724d274a

12 years agoAdd new InsertType for widget moves within the same layout
Tor Norbye [Thu, 14 Jul 2011 18:26:45 +0000 (11:26 -0700)]
Add new InsertType for widget moves within the same layout

For some layouts, such as LinearLayout, when you drag widgets into the
layout, we automatically adjust the widths and heights of some
widgets, such as text fields (to make them fill the full width in a
vertical linear layout, and so on).

However, this was also done when dragging a widget from one place to
another within that same layout. In that case, we should leave the
dimensions and weights alone, since the user may have deliberately
changed these.

This requires splitting the InsertType.MOVE into two, since we still
want to apply default sizing when you move a widget from a different
layout into this one. The InsertTypes are now MOVE_INTO and
MOVE_WITHIN, and we only apply default size styling if we are not
moving within the same layout.

Change-Id: I73ace89aff8111417bd6635e13397e7f027bab0a

12 years agoAdd 7" tablets to device list used in the layout editor.
Xavier Ducrohet [Thu, 14 Jul 2011 01:40:58 +0000 (18:40 -0700)]
Add 7" tablets to device list used in the layout editor.

Change-Id: Ib46d23c1ad85e2b0b4b77040cd3498051c79e926

12 years agoMerge "SdkManager: fix issue with double-packages on reload."
Raphael Moll [Wed, 13 Jul 2011 23:48:23 +0000 (16:48 -0700)]
Merge "SdkManager: fix issue with double-packages on reload."

12 years agoAdjust API level for phone comparator
Tor Norbye [Wed, 13 Jul 2011 23:29:22 +0000 (16:29 -0700)]
Adjust API level for phone comparator

Change-Id: Ia8220aca9c4bb338d8a26d9878f56449060cd51d

12 years agoMerge "Adjust the match position description to be relative to the layout"
Tor Norbye [Wed, 13 Jul 2011 23:24:39 +0000 (16:24 -0700)]
Merge "Adjust the match position description to be relative to the layout"

12 years agoSdkManager: fix issue with double-packages on reload.
Raphael Moll [Fri, 8 Jul 2011 21:12:56 +0000 (17:12 -0400)]
SdkManager: fix issue with double-packages on reload.

Rewrote the merge in place + sort of packages by API.
Did some refactoring + added some unit tests.

Change-Id: I168b306853185866606ed76c324a8db6051b15bb

12 years agoAdjust the match position description to be relative to the layout
Tor Norbye [Wed, 13 Jul 2011 15:53:12 +0000 (08:53 -0700)]
Adjust the match position description to be relative to the layout

Currently the matches displayed for absolute X and Y locations will
list the coordinates relative to the entire screen, not to the
surrounding GridLayout. This CL changes the feedback to be relative to
the GridLayout bounds.

Also fix a bug in updating tooltips/messages which would call tooltip
flicker (because the message update method was called too early,
before the message object was ready, causing the tooltip to be
removed, then reshown.)

Change-Id: I665586dbcb1f3f6cdcb3a3f475cf363cd258bf83

12 years agoMerge "Fix android.bat for Windows SDK."
Raphael Moll [Wed, 13 Jul 2011 02:38:34 +0000 (19:38 -0700)]
Merge "Fix android.bat for Windows SDK."

12 years agoMerge "Support XML closed elements"
Tor Norbye [Wed, 13 Jul 2011 02:38:03 +0000 (19:38 -0700)]
Merge "Support XML closed elements"

12 years agoMerge "Properly support spaces in ant project directories."
Raphael Moll [Wed, 13 Jul 2011 02:23:18 +0000 (19:23 -0700)]
Merge "Properly support spaces in ant project directories."

12 years agoMerge "Fix resize feedback for cell spanning mode"
Tor Norbye [Wed, 13 Jul 2011 01:28:25 +0000 (18:28 -0700)]
Merge "Fix resize feedback for cell spanning mode"

12 years agoMerge "Describe GridLayout matches in drag tooltip"
Tor Norbye [Wed, 13 Jul 2011 01:28:18 +0000 (18:28 -0700)]
Merge "Describe GridLayout matches in drag tooltip"

12 years agoSupport XML closed elements
Tor Norbye [Tue, 12 Jul 2011 22:32:26 +0000 (15:32 -0700)]
Support XML closed elements

When you create new elements (by for example dragging a view into a
layout), ADT would *always* create an open element, e.g.
    <Button ...></Button>

This CL uses the element descriptors to create closed elements like
this:
    <Button .../>

For elements that support children it will continue to create open
elements:
    <LinearLayout ...></LinearLayout>

Change-Id: I885fc4bb2611e20d511a3a40c81e202de00b7ac2

12 years agoFix resize feedback for cell spanning mode
Tor Norbye [Tue, 12 Jul 2011 18:11:04 +0000 (11:11 -0700)]
Fix resize feedback for cell spanning mode

When resizing in a GridLayout you can toggle whether you are resizing
the widget or the cell bounds with the Shift key (and the resize
feedback tells you this).

However, the drawn resize feedback was always showing the widget
bounds. This CL fixes this such that when you are resizing the cell
bounds, the current cell bounds are displayed instead.

(Also contains a simple fix to ensure feedback is drawn when you
click and hold (without dragging yet) on a resize handle.)

Change-Id: I7cf24f4508aa5bbafd45f36b13be41e66ecbc6cc

12 years agoDescribe GridLayout matches in drag tooltip
Tor Norbye [Tue, 12 Jul 2011 17:59:59 +0000 (10:59 -0700)]
Describe GridLayout matches in drag tooltip

This CL adds a description of the current best match (horizontal and
vertical) in a drag tooltip, such as "Insert into bottom of row 5" or
"Align right at x=120".

Change-Id: I08d6b158c5e48d1881ec946037389609d8be9d83

12 years agoProperly support spaces in ant project directories.
Raphael Moll [Tue, 12 Jul 2011 02:11:32 +0000 (22:11 -0400)]
Properly support spaces in ant project directories.

After applying https://review.source.android.com/24515 for
the dalvik/dx change, this allows ant project to build
correctly on Windows if there's a space in their directory
path.

Change-Id: I4c6d5f87fae2dcf2955698633a16a0bde501694f