Commit f48bde52 authored by Tor Norbye's avatar Tor Norbye
Browse files

Validate user edits in XML files

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
parent 0be1d50d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment