OSDN Git Service
Raphael Moll [Thu, 17 Mar 2011 20:59:51 +0000 (13:59 -0700)]
Merge "Disable the "unecessary else" warning."
Raphael Moll [Thu, 17 Mar 2011 20:43:40 +0000 (13:43 -0700)]
Merge "Remove xml content type binding from ExportEditor."
Tor Norbye [Thu, 17 Mar 2011 20:35:01 +0000 (13:35 -0700)]
Merge "Add Quickfix and Quick Assistant for creating resources"
Raphael Moll [Wed, 16 Mar 2011 22:22:39 +0000 (15:22 -0700)]
Remove xml content type binding from ExportEditor.
This was added by mistake when we were investigating the
issue of bug 15003. The contentTypeBinding seems to be
unused by Eclipse when selecting the proper editor, but
it's still wrong to have it set on XML For the ExportEditor.
since this one uses export.properties files.
Change-Id: I82396debe6bcb4571f150b929aa5e0287f4e9dea
Tor Norbye [Tue, 15 Mar 2011 04:15:57 +0000 (21:15 -0700)]
Add Quickfix and Quick Assistant for creating resources
This changeset adds two related features:
- A "marker resolution" which adds a quickfix to aapt errors for
nonexistent resources. This means that you can right click on the
error in the Problems view to create the associated missing
resource.
- A "quick assistant" which looks for a missing resource on the
current line and if found adds a fix handler for it, similar to the
quickfix above.
When a fix is invoked, it will create the new file or value, and open
it in the editor with the relevant value section selected.
The quick assistant can be invoked by the normal Ctrl-1 (Cmd-1). The
quickfix must be invoked from the Problems view; the Java editor seems
to add an extra level of integration with a lightbulb in the editor
margin but we don't get that in XML.
The quickfixes work for all value-based resources, as well as some
file-based ones (in particular, those supported by the New XML File
wizard, which it reuses.)
This changeset also adds unit tests for quickfixes along with a few
infrastructure changes to support it.
Change-Id: I962bcf6c98934685e4d74389469d0903115a75e3
Tor Norbye [Thu, 17 Mar 2011 19:42:40 +0000 (12:42 -0700)]
Merge "XML code completion improvements"
Raphael Moll [Wed, 16 Mar 2011 22:15:34 +0000 (15:15 -0700)]
Disable the "unecessary else" warning.
This can be a matter of personal taste, but I find it a lot
more readable to write an if {} else {} sometimes, and it's
perfectly valid, so really it shouldn't be marked as a warning.
Change-Id: Iac1b9bd5f9602b5018f7432422e0a083f4836490
David Turner [Wed, 16 Mar 2011 12:36:43 +0000 (05:36 -0700)]
Merge "Removing emulator/opengl from the sdk.git"
Jacky Romano [Wed, 16 Mar 2011 12:31:38 +0000 (14:31 +0200)]
Removing emulator/opengl from the sdk.git
This project code is moving to live under development.git/tools/emulator
Change-Id: I3f7673bc17681a0ffa14bb0b4d0880977b77f24d
Tor Norbye [Tue, 15 Mar 2011 19:05:36 +0000 (12:05 -0700)]
Merge "ConcurrentModificationException in AbstractPropertiesFieldsPart"
Xavier Ducrohet [Tue, 15 Mar 2011 18:28:42 +0000 (11:28 -0700)]
Merge "Add specifc warnings config for most sdk eclipse projects."
Tor Norbye [Tue, 15 Mar 2011 03:57:35 +0000 (20:57 -0700)]
ConcurrentModificationException in AbstractPropertiesFieldsPart
I ran into a ConcurrentModificationException when creating an XML file
using the plain XML wizard (not the Android XML wizard - because I
wanted to create an XML drawable which is not supported by the new
Android XML wizard.)
Change-Id: Id2ae606e9da47e6f7d42cf6a0dea61eb3e9ca15d
Tor Norbye [Tue, 15 Mar 2011 04:03:56 +0000 (21:03 -0700)]
XML code completion improvements
This changeset contains a number of improvements to the code
completion in XML files.
(1) Add suffix completion in attribute values. For dimensional
attributes, this will add in (or complete prefixes of) units like
"dp", "sp", etc. For fractional attributes, the % and %p suffixes
are completed. (In both cases, there is also a tooltip message
provided shown in the completion documentation popup). In
addition, for flag values, when completing at the end of a flag,
then the separator character (|) along with the other flag values
(except those already set) are offered.
(2) Handle completion when the caret is not at the end. For example,
if you have the following source:
layout_w^idth="wrap_content" (^ = caret position)
then if you invoke code completion you will also be offered the
attribute layout_weight, and selecting it will -replace- the
layout_width attribute with layout_height, it will not insert
layout_weight in the middle of layout_width. This handling is done
not just for attribute names as shown here but for attribute
values and element tag names as well.
(3) Improve @resource/ completion sorting. When completing resources,
consider which attribute is being completed, and use that
information to sort the resources. For example, if completing a
"text" attribute then @string/, and @android:string/ resources
will be listed first. For attributes like margins @dimen will be
first, for include layout the @layout attributes will be listed
first, and so on. Also, the resources are sorted alphabetically
as the second sort key.
(4) Hide some builtin Eclipse code completion items. In particular,
the default code completion provider for Eclipse will always add
the current attribute value as a completion. This is extremely
confusing since if you have a typo, code completion will tell you
that what you have is okay. I personally witnessed this confusing
a user who had typed something from memory and code completion
seemed to him to "confirm" that he had it right.
To fix this, the code which installs completion providers, will
identify the builting WST completion provider, and when found,
replace it with a "filtering" wrapper. This completion provider
delegates all its calls to the WST completion provider, but it
recognizes a few patterns, in particular the above attribute value
completion proposal as well as some namespace and schema ones, and
removes these.
(The reason we only filter out these items instead of removing it
completely is that the completion provider also appears to be
responsible for inserting code templates defined by the user, and
we don't want to neuter those if defined by the user.)
(5) Fix a bunch of corner cases - flags could only have a single
separator (|), resource attribute completion items were missing
icons, and completion in some positions was not working.
(6) Unit tests. There are now comprehensive unit tests for code
completion. Each unit test points to a particular source file
and a particular position within the source file, and code completion
is invoked for that position. A set of unit tests dump out the
allowed completion items for each such position, and these are
compared against golden files. A second set of unit tests then
specify a particular code completion item among the choices to
be applied, and then applies that completion item to the document.
This, along with the caret position (indicated as ^) is written
into a golden file and used for comparisons. To make it easy
to see what these tests do, the golden file is actually recorded
as a diff, so in the test you will see something like this:
Code completion in completion1.xml for android:gravity="left|b^ottom"
selecting bottom:
< android:gravity="left|bottom"
---
> android:gravity="left|bottom^"
(6) There are some other misc changes. We had some code which used
"dip" for device indepdendent pixels (such as the AbsoluteLayout
handler). Since "dp" seems to be preferred, the code will now
use that instead.
Change-Id: I8bd5c8336d8747dac1f10a9269ea4197f304cb70
Xavier Ducrohet [Wed, 9 Mar 2011 22:06:37 +0000 (14:06 -0800)]
Add specifc warnings config for most sdk eclipse projects.
Change-Id: I9837714c5673d43fa7108b16ab264f1017c4bd3d
David 'Digit' Turner [Mon, 14 Mar 2011 16:41:43 +0000 (09:41 -0700)]
Merge "Prepare for moving platform-specific emulator modules to development.git"
Tor Norbye [Sat, 12 Mar 2011 01:23:41 +0000 (17:23 -0800)]
Merge "XML code completion improvements"
Tor Norbye [Thu, 10 Mar 2011 20:16:22 +0000 (12:16 -0800)]
XML code completion improvements
First, fix code completion for @android: resources such that if you
type @android: the various resource types (@android:drawable/,
@android:layout/, etc) are offered.
Second, fix completion for the @android: token itself such that if you
type "@a" then "@android:" is offered as a completion.
Finally, make resource name completion work even for attributes that
aren't marked in the metadata as allowing resource references. This
will not be done for empty completion context, but if the user
-explicitly- types a "@" in the value field, then resource completion
will work. This is necessary for some attributes where our metadata is
wrong, such as android:minHeight, where code completion currently
refuses to complete a @dimen/ completion prefix.
Change-Id: I175c8f7230d56987b9a945a2b791a2eb3e018a7c
Tor Norbye [Sat, 12 Mar 2011 00:25:06 +0000 (16:25 -0800)]
Merge "Extract as Include support for configuration variations"
Tor Norbye [Mon, 7 Mar 2011 22:16:48 +0000 (14:16 -0800)]
Extract as Include support for configuration variations
First, add support for the "Extract as Include" refactoring to update
all identical code fragments in configuration variations of the same
file. For example, if you have a particular subtree of XML elements
in a file that you have then duplicated into say a landscape mode,
then applying the Extract as Include refactoring will locate the same
code fragment in both files, and replace *both* code fragments with an
include (and this is optional with a checkbox in the wizard
dialog). This only happens when the extracted code fragment is
"identical" in both files. The code fragments can vary in terms of XML
formatting and attribute order (and namespace prefix choice), but the
element hierarchy order, names, attributes defined and attribute
values must be identical.
Second, make fixes to the Change Layout and Change Widget Type
refactorings such that when the id of the converted element is
changed, then references to that id are updated as well.
Third, ensure that the refactorings are enabled even when there is no
text selection; in that case the refactoring will apply to the element
containing the caret.
Some test infrastructure improvements.
Change-Id: Idb4ba40f4217dba2b13881b3d06e269c80ba4b97
Tor Norbye [Sat, 12 Mar 2011 00:05:35 +0000 (16:05 -0800)]
Merge "Underline the error range for aapt errors"
Tor Norbye [Fri, 11 Mar 2011 16:52:18 +0000 (08:52 -0800)]
Underline the error range for aapt errors
Currently, aapt errors only show up as an error icon in the left hand
margin, and the user has to figure out from the error message where on
the line the error occurred.
This changeset uses information in the error message to identify the
specific range of text on the line that is affected, and underlines
it.
Change-Id: I322a8193af4e90bb972276aee80124771b6a46cd
Tor Norbye [Fri, 11 Mar 2011 21:50:10 +0000 (13:50 -0800)]
Merge "Add drop-support for include tags"
David 'Digit' Turner [Fri, 11 Mar 2011 14:59:18 +0000 (15:59 +0100)]
Prepare for moving platform-specific emulator modules to development.git
We need to move the platform-specific modules to development.git to
avoid some clashes. This patch uses a guard Make variable to ensure that
each module is only built once.
The plan is to simply copy these modules to development.git, then remove
the current ones from sdk.git. The guard variable is here to ensure that
the transition happens smoothly, i.e. if a build contains modules in
both directories, only one of them will be built.
Change-Id: I4bc58741a18488f18a4b17e8a1edc4a4a5a93cbc
Raphael Moll [Fri, 11 Mar 2011 03:05:15 +0000 (19:05 -0800)]
Merge "Avoid repeating manifest element names."
Raphael Moll [Fri, 11 Mar 2011 00:40:19 +0000 (16:40 -0800)]
Avoid repeating manifest element names.
In the manifest form tree, avoid repeating element names
in the tree labels. E.g. "MyActivity (Activity)" can just
be "MyActivity".
Change-Id: I8de481aabcbc33e830e18c528cb10a0b2a14138a
Xavier Ducrohet [Fri, 11 Mar 2011 01:45:10 +0000 (17:45 -0800)]
Merge "Guard against badly configured projects in aidl processor."
Xavier Ducrohet [Fri, 11 Mar 2011 00:33:47 +0000 (16:33 -0800)]
Guard against badly configured projects in aidl processor.
The project could have source folders that don't exist.
Change-Id: Ie8f9e35580918d9fade5074ca90d295c49e6cae4
Xavier Ducrohet [Thu, 10 Mar 2011 23:04:29 +0000 (15:04 -0800)]
Merge "A bit more refactoring around the resource repository."
Xavier Ducrohet [Thu, 10 Mar 2011 22:18:28 +0000 (14:18 -0800)]
A bit more refactoring around the resource repository.
- Move Configurable in the same package as FolderConfiguration.
- Move ResourceManager.getConfig in FolderConfiguration.
- Move ResourceMaanger.processFolder in ResourceRepository.
- Move ResourceManager.processFile in ResourceFolder.
- Rename some misc methods.
Change-Id: Ifa557c7db22c3fb82327a68f4365c08d152d9cf4
Raphael Moll [Thu, 10 Mar 2011 20:32:21 +0000 (12:32 -0800)]
Merge "Deactive the logging code used for issue 15003."
Xavier Ducrohet [Thu, 10 Mar 2011 20:06:37 +0000 (12:06 -0800)]
Merge "Make inline ResourceItem able to generate ResourceValue"
Xavier Ducrohet [Thu, 10 Mar 2011 18:55:52 +0000 (10:55 -0800)]
Make inline ResourceItem able to generate ResourceValue
This change fix the issue that since the simplification of
the resource repository, the resource item for inline ID values
would not be called to generate a ResourceValue since their
list of source file was empty.
This moves the creation of the ResourceValue to the ResourceItem
so that InlineResourceItem can override it.
This required moving findMatchingConfigurable into FolderConfiguration
which is a much better place for it anyway.
Change-Id: I36d6b148528c593ea432c9fd0ac8d542cbe2a26e
Xavier Ducrohet [Thu, 10 Mar 2011 00:30:00 +0000 (16:30 -0800)]
Merge "ADT: fix unittests."
Tor Norbye [Wed, 9 Mar 2011 21:18:34 +0000 (13:18 -0800)]
Add drop-support for include tags
Add the include tag back into the palette, and add special drop
support for it such that when it is drop, a resource chooser pops up
and asks you which layout to include. A new validator prevents any
layouts from being chosen that would result in a cyclic
dependency.
This requires some infrastructure changes: First, drop handlers must
distinguish between a view getting created as part of a previewing
operation and getting created interactively. Second, in order to
support cancel removing an inserted include if the user decides not to
set an include, the node wrappers need to support removing an element.
Also, use the metadata originally intended for the preview icon
factory to also bypass palette drag previews for widgets that don't
have UI.
Change-Id: I1bdd1766ca4cfa2fdbca25b77c50c74e9c332cbd
Xavier Ducrohet [Wed, 9 Mar 2011 23:51:38 +0000 (15:51 -0800)]
ADT: fix unittests.
Change-Id: I258d393b5297d916b58ed3574b77f521968a13c0
Raphael Moll [Wed, 9 Mar 2011 21:11:24 +0000 (13:11 -0800)]
Merge "Fix potential NPE in AvdCreationDialog"
Raphael Moll [Wed, 9 Mar 2011 21:10:43 +0000 (13:10 -0800)]
Deactive the logging code used for issue 15003.
This doesn't quite remove the logging code,
just deactivate it for right now.
Change-Id: I9a471926f6575bce117bf6079200f7939457fb57
Raphael Moll [Wed, 9 Mar 2011 21:09:48 +0000 (13:09 -0800)]
Merge "Deactive BinaryXml ContentType."
Xavier Ducrohet [Wed, 9 Mar 2011 21:08:53 +0000 (13:08 -0800)]
Merge "Resource management refactoring and clean-up."
Bill Napier [Wed, 9 Mar 2011 17:11:56 +0000 (09:11 -0800)]
Merge "- Fix a NPE when arguments are not properly understood by MonkeyRunner - Add the ability to pass Boolean types for Intent extras (extras={'a':True, 'b':False}) - Fix an improper flag being passed to am start - Pass the key and value to am start instead of just the value."
Vijay Yellapragada [Wed, 9 Mar 2011 16:01:18 +0000 (10:01 -0600)]
- Fix a NPE when arguments are not properly understood by MonkeyRunner
- Add the ability to pass Boolean types for Intent extras (extras={'a':True, 'b':False})
- Fix an improper flag being passed to am start
- Pass the key and value to am start instead of just the value.
Change-Id: Ifd0c69ccb4c2755a49efca2d3f8b3befa212a69f
Raphael Moll [Wed, 9 Mar 2011 07:31:27 +0000 (23:31 -0800)]
Deactive BinaryXml ContentType.
This breask the BinaryXml Editor feature.
However it fixes the issue 15003, which is more important:
http://code.google.com/p/android/issues/detail?id=15003
Change-Id: Iac0fb6ef38b7d6e60da1c8526ce9f58db2e7994b
Raphael Moll [Wed, 9 Mar 2011 02:05:49 +0000 (18:05 -0800)]
Fix potential NPE in AvdCreationDialog
Change-Id: Ic71e0242b34979f621e291c808b6a0ee35b711ff
Xavier Ducrohet [Tue, 1 Mar 2011 00:49:37 +0000 (16:49 -0800)]
Resource management refactoring and clean-up.
- (I)ResourceRepository is now a common class instead of an
interface. This contains most of the code to control
a repository (which was extracted from ProjectResources)
ProjectResources extends it adding minor features such as
library support, and inline ID definition.
FrameworkResources extends it adding support for public
resources (which used to be duplicated and dispersed
in weird places).
Changed the way resources are reloaded on resource change event.
Instead of marking the resources as modified (using
Resource.touch()), the resources are now parsed as the files are
processed during the resource delta visitor. This makes more sense
as there are now other listeners to the resource changes (hyperlinks)
that access the resource list in their listeners, which wouldn't work
previously.
This also makes the code cleaner as the previous method had to query
the repo for items and return a list of new ones, which was kinda
crappy. The new code is much simpler, as is the post update process.
- ResourceItem is now the base class for resource items. It includes
all the small methods that were added by all the child classes or
interfaces.
Project/ConfigurableResourceItem are merged into the based class.
IIdResourceItem and IdResourceItem are gone and replaced by a
simpler InlineResourceItem.
FrameworkResourceItem is a simple override for framework resources.
- Also improved the API of a bit for the resource repository, making
more use of unmodifiable lists and emptyList/Map()
Change-Id: Ie3ac1995213fed66153c7e7ecbdd170ec257be62
Xavier Ducrohet [Wed, 9 Mar 2011 01:12:44 +0000 (17:12 -0800)]
Merge "Make the feature require Eclipse 3.5"
Xavier Ducrohet [Wed, 9 Mar 2011 00:31:02 +0000 (16:31 -0800)]
Make the feature require Eclipse 3.5
Change-Id: Idcc1ae2566e41656327190053e8e0ea22264d31d
Raphael Moll [Wed, 9 Mar 2011 00:14:03 +0000 (16:14 -0800)]
Merge "ADT: differentiate icons in from editors."
Raphael Moll [Sat, 5 Mar 2011 18:23:12 +0000 (10:23 -0800)]
ADT: differentiate icons in from editors.
In ElementDescriptor, provide 2 icon methods:
- getIcon() returns a generic icon whatever the descriptor.
This is used by the XML content assist.
- getFormIcon() return an icon specific to the descriptor.
This is used by the form editor in the block/detail tree.
The icons are the same auto-generated stuff than before.
A changeset with specific 'pretty' icons would be more than welcome.
Change-Id: Ib0ff8298101462a7dd7e8e92f671eb0171e46c48
Xavier Ducrohet [Tue, 8 Mar 2011 00:35:56 +0000 (16:35 -0800)]
Merge "Add more logging to ADT for file open and binary XML."
Xavier Ducrohet [Tue, 8 Mar 2011 00:29:16 +0000 (16:29 -0800)]
Merge "Add logging to precompiler builder."
Xavier Ducrohet [Tue, 8 Mar 2011 00:16:05 +0000 (16:16 -0800)]
Add logging to precompiler builder.
There are some reports of NPE in the builders on mDerivedProgressMonitor
which means startupOnInitialize would fail to finish.
This adds a log in the method should an exception be thrown.
Change-Id: I90170b0dcc3c97a772b5d72111db9dbbbf2ee277
Raphael Moll [Tue, 8 Mar 2011 00:22:08 +0000 (16:22 -0800)]
Add more logging to ADT for file open and binary XML.
Also in the plugin.xml, associate our editors to the "pure"
XML contentType. This should prevent Eclipse from trying
to use our editors for an invalid unsupported type.
It doesn't fix the fact the contentType isn't properly discovered.
Change-Id: Ife053c74a936d105537c49b54f3abc987001bca7
Raphael Moll [Mon, 7 Mar 2011 21:39:32 +0000 (13:39 -0800)]
Merge "ADT Manifest: fix XML attribute completion."
Raphael Moll [Mon, 7 Mar 2011 16:59:20 +0000 (08:59 -0800)]
Merge "DISABLED 2 lines that break the SDK build (bios.bin in sdk/tools.atree)"
Raphael Moll [Mon, 7 Mar 2011 16:47:42 +0000 (08:47 -0800)]
DISABLED 2 lines that break the SDK build (bios.bin in sdk/tools.atree)
Change-Id: I7d589782bf898d1ce09d0e29108566f7560019f1
Raphael Moll [Sat, 5 Mar 2011 18:21:49 +0000 (10:21 -0800)]
ADT Manifest: fix XML attribute completion.
XML completion wasn't done properly for attributes for element
that had a dash (-) in them.
Change-Id: I433f3711e1991246d099246847c7204e04ae3e40
Raphael Moll [Fri, 4 Mar 2011 21:48:29 +0000 (13:48 -0800)]
Merge "Don't erase SDCard when editing existing AVD."
Raphael Moll [Mon, 28 Feb 2011 22:11:44 +0000 (14:11 -0800)]
Don't erase SDCard when editing existing AVD.
SDK Bug 14162
Change-Id: I22493443e706bda830916ed0fc09741a1d6d1f15
Tor Norbye [Fri, 4 Mar 2011 21:30:43 +0000 (13:30 -0800)]
Merge "Add logging to help track down issue #15003 in the wild"
Tor Norbye [Fri, 4 Mar 2011 21:20:04 +0000 (13:20 -0800)]
Add logging to help track down issue #15003 in the wild
Change-Id: I3b7fb370e7e4b018d02b3986d81b14e89086c191
Raphael Moll [Fri, 4 Mar 2011 20:55:56 +0000 (12:55 -0800)]
Merge "Fix NPE in SdkManager: parsed props can be null."
David Turner [Fri, 4 Mar 2011 19:38:40 +0000 (11:38 -0800)]
Merge "Add qemu emulator bios files"
Raphael Moll [Fri, 4 Mar 2011 19:34:14 +0000 (11:34 -0800)]
Fix NPE in SdkManager: parsed props can be null.
Change-Id: Ia1b873fc48e87173148572b123d3c0346542f4d9
David 'Digit' Turner [Fri, 4 Mar 2011 19:21:41 +0000 (11:21 -0800)]
Merge "Fix Windows SDK build."
David 'Digit' Turner [Fri, 4 Mar 2011 19:20:08 +0000 (20:20 +0100)]
Fix Windows SDK build.
Change-Id: If9f7d3fc61b5969d84a2cda68dc1ad948c21ae88
David Turner [Fri, 4 Mar 2011 16:30:43 +0000 (08:30 -0800)]
Merge "x86 and arm emulators have distinct paths"
Tor Norbye [Fri, 4 Mar 2011 00:30:16 +0000 (16:30 -0800)]
Merge "Make XML code completion case insensitive"
Tor Norbye [Fri, 4 Mar 2011 00:30:10 +0000 (16:30 -0800)]
Merge "Add palette variations of widgets"
Tor Norbye [Fri, 4 Mar 2011 00:10:06 +0000 (16:10 -0800)]
Make XML code completion case insensitive
If you've typed "android:textsi" on a TextView, you currently get no
matches. This changeset makes the code completion case insensitive
(the way it is in Java) such that it for example will match
"android:textSize".
Change-Id: I0f698c2a4ee983d6c0fbcce272b851b2710c9a61
Bill Napier [Fri, 4 Mar 2011 00:01:16 +0000 (16:01 -0800)]
Merge "Remove trailing comma that was causing compile problems."
Bill Napier [Fri, 4 Mar 2011 00:00:22 +0000 (16:00 -0800)]
Remove trailing comma that was causing compile problems.
Change-Id: Ia80bd2c25b5898a6ad99b9404b89c1b41c8290ba
Bill Napier [Thu, 3 Mar 2011 23:00:04 +0000 (15:00 -0800)]
Merge "Allow loading MonkeyImages from a local filesystem."
Tor Norbye [Mon, 31 Jan 2011 04:52:05 +0000 (20:52 -0800)]
Add palette variations of widgets
This changeset adds new items to the palette which are just variations
of an existing widget but with different initial attributes. In
particular:
* Instead of just LinearLayout there are two versions of it:
LinearLayout (Vertical) and LinearLayout (Horizontal)
* The ProgressBar has 3 variations: Large, Small, and Horizontal. The
horizontal ProgressBar looks like the SeekBar, without at thumb, so
the SeekBar is moved next to the progress bar.
* There is a new palette category, "Text Fields", which contains a
number of different initializations of the EditText's "inputType"
attribute - for textual and numeric passwords, for names and e-mail
and postal addresses, for phone numbers, for negative and decimal
numbers, etc.
* Since LinearLayout is so common, the outline handles it specially to
ensure that we show a horizontal or a vertical icon depending on the
orientation attribute of the specific element rather than the
generic descriptor icon.
There are various changes to the palette icon preview and drag preview
etc to handle these changes. In particular, the category
initialization code had to be rewritten to be able to handle
variations (since for example the text field appears in multiple
categories, so the old assumption that each view had an assigned
category was no longer true.)
This changeset also extracts a constant for the "android:" literal
used in many places in the code, and renames the existing "android"
namespace constant.
Change-Id: Ibbc3dbd34c551594421c3de034cdccea6a66eba0
Tor Norbye [Thu, 3 Mar 2011 02:51:05 +0000 (18:51 -0800)]
Merge "More refactoring work: Convert hierarchy, and change type"
Tor Norbye [Wed, 2 Mar 2011 19:23:00 +0000 (11:23 -0800)]
Merge "Add drop-down menu button to the palette control"
Tor Norbye [Tue, 1 Mar 2011 21:13:27 +0000 (13:13 -0800)]
Add drop-down menu button to the palette control
Add a menu button to the palette label line, as is done in most
Eclipse windows, which brings up the context menu for the
palette. This makes the palette modes etc a bit more discoverable.
(I played with adding a few dedicated toggle buttons there as well,
but it looked a bit odd because the palette toolbar is a few pixels
higher than the layout actions bar in the canvas, so visually things
looked misaligned; we'll need to address that before adding proper
action buttons in the palette title panel.)
Change-Id: I18906ee7c2ebede96f167925ee27a7064715fa8b
Tor Norbye [Tue, 1 Mar 2011 20:47:24 +0000 (12:47 -0800)]
Merge "Fix Palette preview image scaling on Windows"
Xavier Ducrohet [Tue, 1 Mar 2011 19:37:17 +0000 (11:37 -0800)]
Merge "AVD and ADT eclipse plugin to support processor-specific platform images and emulators."
Johnnie Birch [Fri, 4 Feb 2011 02:56:59 +0000 (18:56 -0800)]
AVD and ADT eclipse plugin to support processor-specific platform images and emulators.
This is a first (and largest) patch in a series of patches over the next month to extend the
AVD and ADT eclipse plugin to support processor-specific platform images and emulators. This
patch is intended to co-exist with patches to create x86 emulator environments and overall
SDK support.
There is an overall expectation that the sdk building process will be updated to meet the
following expectations... It is not in the scope of these UI patches to change the overall
sdk building structure.
expectation #1:
tools/emulator[.exe] -- ARM
tools/emulator-x86[.exe] -- x86
tools/emulator-foo[.exe] -- an arbitrary additional architecture (extensible)
expectation #2:
platforms/android-XXX/images/arm - location of kernel/images for ARM
platforms/android-XXX/images/x86 - location of kernel/images for x86
platforms/android-XXX/images/foo - location of kernel/images for arbitrary architecture
expectation #3
In the event that add-ons are in the SDK,
add-ons/addon_XXX/images/arm - location of kernel/images for ARM
add-ons/addon_XXX/images/x86 - location of kernel/images for x86
add-ons/addon_XXX/images/foo - location of kernel/images for arbitrary architecture
NOTE: For "earlier"/legacy api levels, it is assumed that it is ARM only and the images will
be in platforms/android-XXX/images and add-ons/addon_XXX/images
When an API level is chosen in AVD, it scans the appropriate API directories and determines
if the image directory is "legacy" or if it has subdirectories. In the latter case, it
populates the list of potential processors using these directory names (and some
prettyprinting for well known architectures)
tested using "android" command line to start AVD on linux and windows
tested using Eclipse plugin AVD integration on linux and windows
REMINDER: You need to change the directory layout of images and add the right
emulator-XXX[.exe] to test it
If one uses the "android" command line to create an AVD from the command line, the
processor type is assumed to be arm today. A future patch will be needed to add
command line processor type selectivity
Change-Id: Ifd7c39bf93c6e926f62407bfed024d2789efb41a
Tor Norbye [Tue, 1 Mar 2011 02:50:51 +0000 (18:50 -0800)]
Fix Palette preview image scaling on Windows
When using palette previews with a scaling factor (e.g. the small or
tiny palette modes), the preview images look bad on Windows. This
appears to be because SWT on Windows has a different set of defaults
for antialiasing and interpolation.
This checkin turns on antialiased high interpolation for image
painting in the palette (when the palette is scaled) to address the
first issue listed in 15071: Layout editor rendering issues in ADT 10
Change-Id: Ie3c619d9105d9d30b1bbe5fb91c195c0f65fee97
Tor Norbye [Fri, 18 Feb 2011 00:53:34 +0000 (16:53 -0800)]
More refactoring work: Convert hierarchy, and change type
A lot of work on the "Change Layout" refactoring to improve conversion
to a Relative Layout. First, add a "Flatten Hierarchy" option which
can take an entire hierarchy of layout widgets and flatten it down to
a single top level RelativeLayout where the constraints attempt to
reflect the original layout. (This isn't always possible, since some
layout managers offer features not possible to express in
RelativeLayout, such as a LinearLayout with multiple different
weights) but it often works or is at least a good start. (This work
is ongoing, but since my changeset is getting large I want to check in
this snapshot since the functionality is better than what is in the
trunk.)
This changeset also adds a new refactoring: Change Widget Type. This
can be applied to a selection of elements, and it will convert the
widget type to the new target widget type. It will also remove any
attributes that are not valid for the new layout.
It also improves the wizards which display the possible target types.
For Change Widget Type, it will first offer "related" widgets, so for
an AnalogClock it will first offer Digital Clock, for a checkbox it
will offer a checked text view and a radio button, etc.
In addition, it will list Views and Layouts that it finds in any
library jars (except for the builtin Android ones), and any custom
view classes in the project.
There is also now some preliminary support for refactoring unit
tests. These tests must be run as Eclipse plugin tests, since they
utilize the XML model (and the XML model cannot be mocked). The test
infrastructure reads source XML files, applies the refactoring change
list to them, and diffs the output with the known expected output
(also stored as result XML files in the test project).
Finally, there are a number of fixes and improvements to the shared
refactoring code.
Change-Id: I0974653e530dfb4feb625e0eef8257c29d50614b
Bill Napier [Wed, 16 Feb 2011 21:55:36 +0000 (13:55 -0800)]
Allow loading MonkeyImages from a local filesystem.
Change-Id: I995ac65f1e376b01312d66f82441043971acd16c
Xavier Ducrohet [Mon, 28 Feb 2011 18:54:12 +0000 (10:54 -0800)]
Merge "Move FolderTypeRelationship to common.jar"
Xavier Ducrohet [Mon, 28 Feb 2011 18:53:16 +0000 (10:53 -0800)]
Merge "Change the FolderTypeRelationship and ResourceFile API to return list."
Xavier Ducrohet [Mon, 28 Feb 2011 18:53:09 +0000 (10:53 -0800)]
Merge "Move ResourceFolderType into common."
Xavier Ducrohet [Mon, 28 Feb 2011 18:53:04 +0000 (10:53 -0800)]
Merge "Rename AndroidConstants -> AdtConstants."
Xavier Ducrohet [Fri, 25 Feb 2011 22:57:16 +0000 (14:57 -0800)]
Merge "Move the sdk io classes to common.jar"
Xavier Ducrohet [Fri, 25 Feb 2011 18:34:06 +0000 (10:34 -0800)]
Move FolderTypeRelationship to common.jar
Change-Id: I3a151d2fadd1c1e34177cb729fe5545fa754849a
David Turner [Fri, 25 Feb 2011 16:23:05 +0000 (08:23 -0800)]
Merge "Emugen : A tool to generate wire protocol code"
Jacky Romano [Thu, 10 Feb 2011 09:04:25 +0000 (11:04 +0200)]
Emugen : A tool to generate wire protocol code
Emugen is a tool that can be used to generate code that
deals with marshaling/unmarshaling request to/from a wire-protocol.
Its input is an API defintion files and its output is C++ source
code for the client (caller) and the server (callee) sides.
See README file for more details.
Change-Id: I45beea6657fae0887d2b4d92933213ecc20d2525
Xavier Ducrohet [Fri, 25 Feb 2011 05:00:43 +0000 (21:00 -0800)]
Change the FolderTypeRelationship and ResourceFile API to return list.
This is better as we can return unmodifiable list instead of
arrays that could be overriden.
Change-Id: Id473925ee6355b2bedeb2d2575bc4ca4f949acb3
Xavier Ducrohet [Fri, 25 Feb 2011 04:27:07 +0000 (20:27 -0800)]
Move ResourceFolderType into common.
Moved some constants from sdklib (which is not a dependency
of common but instead depends on common) into common.
Change-Id: I6fdfbad4e77813a9f2a2ca9ea0d740692d8bce5b
Xavier Ducrohet [Fri, 25 Feb 2011 04:13:52 +0000 (20:13 -0800)]
Rename AndroidConstants -> AdtConstants.
These are constants specific to ADT.
There'll be an AndroidConstants class in common.jar with
more generic android constant values.
Change-Id: I8368920f92c28cbfb87098087bf01f2d2cdee095
Xavier Ducrohet [Fri, 25 Feb 2011 03:41:49 +0000 (19:41 -0800)]
Move the sdk io classes to common.jar
Change-Id: I59a7b770071707ed058aa104bab8a16aa8950d56
Xavier Ducrohet [Fri, 25 Feb 2011 02:09:42 +0000 (18:09 -0800)]
Merge "Move ninepatch tests from layoutlib to sdk where ninepatch lives."
Xavier Ducrohet [Thu, 24 Feb 2011 21:43:41 +0000 (13:43 -0800)]
Move ninepatch tests from layoutlib to sdk where ninepatch lives.
Change-Id: I6d23c6495622214f94502a73ebf80def0fb55e1a
Xavier Ducrohet [Thu, 24 Feb 2011 20:48:51 +0000 (12:48 -0800)]
Merge "Make the sdklib/sdkuilib tests built by the build system."
Raphael Moll [Thu, 24 Feb 2011 20:48:31 +0000 (12:48 -0800)]
Merge "Add min-platform-tools-rev to the tools source.properties"
Xavier Ducrohet [Thu, 24 Feb 2011 20:24:10 +0000 (12:24 -0800)]
Make the sdklib/sdkuilib tests built by the build system.
Change-Id: I9ec9175e0734a5b07fa5b3879cdf7b1ef0056d27
Xavier Ducrohet [Thu, 24 Feb 2011 18:47:33 +0000 (10:47 -0800)]
Merge "Remove some non needed asserts."