diff options
author | Tor Norbye <tnorbye@google.com> | 2011-09-30 21:01:06 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2011-10-03 14:35:27 -0700 |
commit | 153c1190728b752c81c2f2f836fdd397e037938a (patch) | |
tree | f8b561aebe2def6d4fce7eb879ef14134d00aef3 /eclipse/buildConfig | |
parent | 0ceec0d0fb84c9fa00fb7971998e9adbbceae657 (diff) | |
download | sdk-153c1190728b752c81c2f2f836fdd397e037938a.zip sdk-153c1190728b752c81c2f2f836fdd397e037938a.tar.gz sdk-153c1190728b752c81c2f2f836fdd397e037938a.tar.bz2 |
Fix XML formatting from outside the editor (Source > Format)
This changeset fixes this issue:
20450: Source->Format for XML files in Project Explorer in 14-preview
applies old XML rules instead of new Android-aware ones
Basically, the Eclipse XML support does not consult the
StructuredTextViewerConfigurationXML configuration when formatting
files. To work around this, this changeset overrides the format
processor defined for XML files and redirects to the ADT custom
formatter when the option to use a custom formatter is set.
Unfortunately, setting the formatProcessor in the ADT plugin does not
work, because it turns out that the WTP code to process layer
registrations processes plugins in alphabetical order of plugin names
(rather than say plugin dependency order), and as a result, the WTP
registration is processed later than the ADT one (because org.eclipse
> com.android) and it clobbers our registration.
To work around this, this changeset adds a *new* plugin, an overlay
for ADT which is named "overlay.com.android.eclipse.(etc)" which sorts
alphabetically later than org.eclipse. The plugin is basically empty
(it just provides a registration of the ADT format processor), and it
is registered as just a part of the ADT plugin so it should not be
exposed to users directly.
Change-Id: I2af2bc1e61e758c36243e4ac7236f676266cc665
Diffstat (limited to 'eclipse/buildConfig')
-rw-r--r-- | eclipse/buildConfig/allElements.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/eclipse/buildConfig/allElements.xml b/eclipse/buildConfig/allElements.xml index 303c53d..da4a57d 100644 --- a/eclipse/buildConfig/allElements.xml +++ b/eclipse/buildConfig/allElements.xml @@ -34,6 +34,11 @@ <property name="id" value="com.android.ide.eclipse.traceview" /> </ant> + <ant antfile="${genericTargets}" target="${target}"> + <property name="type" value="feature" /> + <property name="id" value="com.android.ide.eclipse.adt.xml" /> + </ant> + <antcall target="buildInternalFeatures"/> </target> @@ -70,6 +75,10 @@ <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/> </target> + <target name="assemble.com.android.ide.eclipse.adt.xml"> + <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/> + </target> + <target name="assemble.com.android.ide.eclipse.ddms"> <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/> </target> |