| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Also add XML editor quickfix to set the attribute on
an API violation.
Change-Id: Ife95d73659656e98a6fb1a322354f5fcfcef1888
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL updates the various refactorings to properly handle layout
refactoring such that it not only updates custom views, but also
updates fragment references, tool:context references etc. It also
fixes missing manifest updates (such as replacing the
parentActivityName attributes).
Most importantly, it also fixes bugs where the wrong elements in the
manifest could get updated. There are a lot of diffs in this CL
because I basically replaced the old refactoring code (which had a lot
of custom text change and document manipulation code) with code based
on the new resource refactoring, where there is a single iteration of
the XML documents. This also improves the emitted refactoring elements
such that it only lists each file once.
Also updated the unit tests to check additional scenarios; adding a
second activity with the same prefix as the first is what revealed the
broken document handling in the old code.
Change-Id: I7c5959ca6b046ce3dab566663988cdd0389b0e5b
|
|
|
|
| |
Change-Id: Iaefb640f35bdad1dc5d4be8565c2cafdc02e8324
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
AVD have a root ini file in .android/avds/name.ini
with a "path" absolute path to the avd config directory.
This does 2 things:
- force the file to use ISO-8859-1 (aka Latin1) encoding.
- add a "path.rel" key with a relative path to the .android
folder if the avd directory is at its typical location.
The loading logic is:
- try to use the "path" key if it points to an existing
directory (as an absolute path).
- otherwise use the "path.rel" key as a path relative
to the .android folder if present.
SDK Bug: 40498
Change-Id: I2364c2ee69f48816f3e6f6f33c9fa43170e05587
|
|
|
|
| |
Change-Id: Ie99e3e7b75f1ac8cf6447c70afc5901437e2d600
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds support for a tools:locale attribute in
resource files where you can declare which language is actually
the default. This is used both by the missing translation
detector (such that it won't complain if for example values-en-rUS
is intended to supplement res/values/), as well as the typo
detector (to allow you to specify which language's dictionary
should be used to look for typos in the default resource file.)
This addresses 33845: lint is wrong about translation regions
Change-Id: Icb16cf11407c333845b56b6d105c99a8661430b0
|
|
|
|
| |
Change-Id: I9cc31e8b3094f830e785b96b46f384206074703c
|
|\ |
|
| |
| |
| |
| | |
Change-Id: Ib6b09a1ff85c45b4fc6c407e3404a8a58c6f84ea
|
|/
|
|
| |
Change-Id: I2d2542a1044b3b1d1682b125b45e223aa3d921fa
|
|
|
|
|
|
|
|
| |
Also looks at style declarations and attributes on include
tags to allow elements to either pick up sizes from styles
or from the including context.
Change-Id: I91a944805d8a906ff63b5a22f2faa876e7292c19
|
|
|
|
|
|
|
|
| |
Extend the missing prefix checker such that it doesn't only look at
layout files, but also complains in manifest files, menu files,
drawable files, etc.
Change-Id: Ifbd7635e3b73d662aa6c7a4e03e4c2894c6fe204
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix bug in switching to preview configurations
* Don't draw drop shadows for thumbnails in Dialog themes
* Move the preview title labels to sit above each preview
thumbnail
* Make error thumbnails include rendering error messages
(and wrap if necessary), plus tweak appearance
* Make switch animation show rectangles animating in
both directions
Change-Id: I0995617fa277b48419a88c5203abf5b1d49af711
|
|
|
|
|
|
|
| |
As requested in
38022: Lint should warn when menus don't have a title
Change-Id: I34688d7733d98ba9fa8cc10202a5470040962117
|
|
|
|
| |
Change-Id: I3b131872cc9938ceb5df271ab10ec60644d44b26
|
|
|
|
|
|
|
| |
These icons should not use color (and in the case of notification
icons, be white).
Change-Id: I32b9422735830a01bb069b90a5ad5a76d7aeb5de
|
|
|
|
|
|
|
| |
I ran lint over some large projects and manually verified the report;
this uncovered a couple of false positives.
Change-Id: I006d64a03119c6badc40e33df9ab4079e07dc7c5
|
|
|
|
| |
Change-Id: If02d0b97c294d9821a1c914547782a08b1d256fb
|
|
|
|
|
|
|
|
|
|
|
| |
When a clean action happen, the order of compilation of
the project isn't dictated by the dependencies between the
project. It is therefore important to detect changed in R.txt
for each library and recompile the project when that happens.
Also fixed a potential NPE when building libraries!
Change-Id: I6a87e9c3a4984e5aa6401270cf83eaea74044c9f
|
|
|
|
|
|
|
|
|
|
| |
Keep sets of applicable issues for each scope set. This
should make incremental lint slightly more efficient.
Also add a check that icon file extensions match the
actual file format.
Change-Id: I4a7f5e19b91aa3613480aa831ec42065528f02d3
|
|
|
|
|
|
| |
Plus a few other minor tweaks/bug fixes
Change-Id: Ic02db9123674ebfbc8977a94d1da4826ec13fb9b
|
|
|
|
|
|
| |
Fixes http://code.google.com/p/android/issues/detail?id=37779
Change-Id: I8c1671d24caed3156b98dcb36d345c0eb1f573d7
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I3b79bef6981d880fe6a545429754e03bd384645c
|
|\ \ |
|
| |/
| |
| |
| | |
Change-Id: Ia6f5c55e07c7f60712472c8e850b7c4595c46671
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Around ADT 15 or so we introduced a bunch of optimizations to run AAPT
much less frequently, since with large projects it can take a long
time, and end up blocking the UI if you try to save twice.
Unfortunately, one side effect of this change is that if you edit only
the *value* of an attribute, we will not re-run aapt, which means
that if you set the value to a bogus value, you will get no error
message until the next time AAPT runs (usually when you try to run).
This changeset fixes this. We already have the attribute metadata
which aapt uses, so now, when an XML file is changed and saved, we
process it with an XML pull parser, and validate all the Android
namespace attributes. If any are found to not be correct, then we
request a full AAPT process, which will then display errors as
appropriate.
Change-Id: I374c19648e29c27c6d82616b3ee602cb2343cd3a
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the user enters an activity title like "Android's Tools" in the new
template wizard, an invalid strings.xml file is generated, since the
apostrophe is not properly escaped.
To fix this, there's a new string conversion method in the template
engine, "escapeXmlString", which will perform all the necessary
conversions.
It also adds two other XML escaping functions: one to escape text to
be suitable for XML attribute values, and one to be suitable for XML
text values.
Finally, when verifying this, I discovered that if I inserted
ampersands in the MasterDetail template, I ended up with errors in
various places there a filename was derived from the input string. To
help make this work better, there's also a new "extractLetters" method
which pulls all the characters out of a string (effectively stripping
whitespace and punctuation).
In addition to the above 4 new string conversion methods, the
templates have been updated to use them, and the template format
documentation updated.
Change-Id: I4d4e854ab78d63bc86b8eb0fb9d92246534615e7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset improves the SourceRevealer for certain types of
stacktraces:
(1) Constructors. If your class initializes fields using code, these
are logically grouped into the constructor, but the linenumbers do
not fit the constructor source range. Before this CL, this would
cause the revealer to show the constructor method rather than the
field initialization line.
(2) Class initializers. If you clicked on a class initializer method,
the IDE would throw an NPE. There's now some special handling to
deal with these.
Change-Id: Ibb3b7dcf13a69018f75fd12648d1f6b5c45625cc
|
|
|
|
| |
Change-Id: If2b905197d5d81c6f98315a0d48ff37091e8282b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset changes the "reuse" behavior of the layout editor to no
longer reuse the same layout editor when you are switching between
alternate layout files for the same layout resource, such as
layout/foo.xml and layout-land/foo.xml. This lets you more quickly
switch back and forth and inspect differences between the layouts,
etc. There is also an option in the Android > Editors panel to turn on
single editor sharing again.
The biggest part of the changeset, by far, is a cleanup of the
ConfigurationComposite class and associated code. This was necessary
not just to support the above feature (where we need to "back out" UI
changes when you've made a configuration edit which results in a
different file getting opened), but it's also an important preparation
for multi configuration editing, where we need to be able to switch
configuration settings in and out of a single configuration editor,
etc.
The configuration data itself is now in a separate Configuration
class; the UI is in ConfigurationChooser, and the configuration
matching code is in ConfigurationMatcher. There's also a new Locale
class to track language/region pairs instead of using 2-element
ResourceQualifier arrays. The various menu listeners are also in
separate UI classes now. While there are new classes, most of the
configuration matching algorithm is unchanged, just moved to a new
class and the UI syncing and configuration data lookup replaced.
Bitmasks are used to handle configuration changes, such that updating
multiple related attributes (e.g. a rendering target change also
causes a theme change if say Holo isn't available) can now be processed
just once with a single change call.
(Various other cleanup too.)
Change-Id: I04ac969f46824321be3db0c487ef077c03cc6012
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset moves most constants into the SdkConstants
class, and gets rid of AndroidConstants and LintConstants.
It also migrates all non-ADT specific constants from
AdtConstants into SdkConstants. It furthermore moves various
other constants (such as those in XmlUtils and ValuesDescriptors)
into the constants class. It also fixes the modifier order
to be the canonical modifier order (JLS 8.x).
Finally, it removes redundancy and combines various constant
aliases such that we don't have both NAME_ATTR and ATTR_NAME
pointing to "name", etc.
Change-Id: Ifd1755016f62ce2dd80e5c76130d6de4b0e32161
|
|
|
|
|
|
|
|
| |
Some extras have just a single "sample" directory
instead of having a samples/<sample_name> directory.
Support this and list them as valid samples.
Change-Id: I25bc59db0b9853d98385cca98f70bf261558fd8b
|
|
|
|
|
|
|
|
|
|
|
| |
Eclipse 3.8/4.2 requires that any method which overrides another
method with a @NonNull parameter (see
https://bugs.eclipse.org/bugs/show_bug.cgi?id=381443).
This changeset adds @NonNull on various overriding methods in newly
added code such that Eclispe 4.2 doesn't show errors.
Change-Id: Ice4a4b4dc31ba68c4e0911bb37c15da090076a0d
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The goal is to later migrate all existing code to this
new logger and get rid of all our duplicates.
Also did a misc fix in AndroidLocation.
Change-Id: Ia33a782b57c91b4e3d5fd2c0660e040be11b9cbb
|
|/
|
|
|
|
|
| |
Also fix a bug in a custom ant task where minSdkVersion and targetApi
were swapped.
Change-Id: Id9bac802377a04270e76def42eaf6a8fb4b3f874
|
|
|
|
|
|
|
| |
Move stuff out of sdklib into common and ide_common.
Remove androidprefs and move the one class into common.
Change-Id: I71d126a13cf2ba413692e29616f4968a37d7b33a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move resources and com.android.util.Pair into layoutlib_api
where they belong since layoutlib depends on them and we need
to control the API.
Made a copy of Pair to stay in common.jar but moved it to
com.android.utils.Pair (the one in com.android.util.Pair is
marked as deprecated to prevent usage where applicable).
Also moved XmlUtil and PositionXmlParser to com.android.utils
to match Pair.
Change-Id: I21d7057d3f2ce604f86a3bb1fa3c130948c93b89
|
|
|
|
| |
Change-Id: I20592372d41235b36227a0d36014d77c23c7fc58
|
|
|
|
| |
Change-Id: I09f308a3187d93abfda23c63ed72ba906b65ebc9
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds a new typo detector. There
are also some lint infrastructure fixes to better
handle positions within text nodes, and to allow
Eclipse lint quickfixes to supply multiple fixes
for a single issue (such as multiple misspelling
alternative replacements.)
Change-Id: Ie26f0bafc571e02ae09ff27a7f4b221fe0c2ea5b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Eclipse 4.2 includes analysis support for @Nullable and @NonNull
annotations. However, it requires these annotations to be *repeated*
on every single method implementing or overriding a superclass or
interface method (!).
This changeset basically applies the quickfixes to inline these
annotations. It also changes the retention of our nullness
annotations from source to class, since without this Eclipse believes
that a @NonNull annotation downstream is a redefinition of a @Nullable
annotation.
Finally, the null analysis revealed a dozen or so places where the
nullness annotation was either wrong, or some null checking on
parameters or return values needed to be done.
Change-Id: I43b4e56e2d025a8a4c92a8873f55c13cdbc4c1cb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ManifestMerger library needs to look up the prefix to use for the
Android namespace, and the Document.lookupPrefix method is not
implemented by the Eclipse DOM implementation (which throws an
exception). However, we have an implementation of this in the ADT
plugin.
This changeset creates a new XmlUtils class in the common/ library
(which is accessible by both ADT and the manifest merger, and the
anttasks where the manifest merger is used), and moves the namespace
prefix lookup code in there. It also moves the XML escape methods
into that class. It also adds a new method to the ManifestMerger for
merging directly from documents (rather than files), and makes sure
that all the merging code goes via the prefix utility method rather
than calling the document.lookupPrefix method.
Finally, it moves the various string constants associated with XML
namespaces into the single XmlUtils class, since these were spread
across several different classes before (and many of them are needed
in the XmlUtils class).
The vast majority of the diffs in this changeset are related to simple
import statement changes to reflect the new locations of these
constants.
Change-Id: Ib8f3d0e5c89e47e61ea509a23925af7b6580abee
|
|
|
|
|
|
|
|
| |
Failure to read the manifest (sometimes due to out of sync
resources) could fail to put a marker on the file or project,
making the build fail with no feedback.
Change-Id: Ib75e0b72e202e14de556ba30f23a6879e3dfc2c8
|
|
|
|
|
|
|
|
| |
This is a first step where we setup the info. Next step
is to actually use the info when calling
ResourceRepository.getConfiguredResources
Change-Id: I03c20ad0ec7a53ec8219316cc4af7a59155ef34a
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This changeset adds support for suppressing in XML files:
(1) Lint will ignore errors found in attributes and elements if the
element (or any surrounding parent elements) specifies a
tools:ignore="id-list" attribute where the id-list matches the id
of the reported issue (or "all"). The "tools" prefix can be any
prefix bound to the namespace "http://schemas.android.com/tools"
(2) There's a new quickfix shown for XML lint warnings which offers to
add a lint suppress attribute for a given lint warning (setting
the id to the id of the warning, and adding the tools namespace
binding if necessary).
(3) The XML formatter now handles namespaces a bit better: after the
preferred attributes (id, name, style, layout params, etc) have
been handled, attributes are sorted by namespace prefix before
they are sorted by local name -- which effectively will sort any
new tools:ignore attributes to the end.
Change-Id: Id7474cde5665d9bd29bdd4e0d0cc89ed4d422aea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Lint API specifies that columns should be 0-based (like line
numbers), but in a number of places this was not the case; it was
1-based instead (both in the detector code and in the output code,
which is why things looked okay). This changeset cleans this up such
that the columns are properly 0-based (and adds unit tests for it).
The Location API has a mechanism to search in the source code for
tokens, which is useful for bytecode detectors where we only have line
numbers. This changeset adds tokens to the API detectors such that it
identifies the corresponding method, class or field reference in the
source, not just the corresponding line. It also improves the pattern
search to also look backwards a few lines, since some bytecode
references appear a few lines later than the source code reference (at
the nearest executable code; this is the case for parameter local
variables for example).
Change-Id: I3adac20d5f0075e0a919be15dfb68658d5b7bb11
|