aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/scripts
diff options
context:
space:
mode:
authorTor Norbye <tnorbye@google.com>2011-09-30 21:01:06 -0700
committerTor Norbye <tnorbye@google.com>2011-10-05 11:21:34 -0700
commit6ede5b20916fcdca7be60facf4592d302772d0e7 (patch)
tree9beccc536ff699689a97ff6507bca034e1b84311 /eclipse/scripts
parent644764ce5452f9534aedf94857055a361f97e6f3 (diff)
downloadsdk-6ede5b20916fcdca7be60facf4592d302772d0e7.zip
sdk-6ede5b20916fcdca7be60facf4592d302772d0e7.tar.gz
sdk-6ede5b20916fcdca7be60facf4592d302772d0e7.tar.bz2
Fix XML formatting from outside the editor (Source > Format). DO NOT MERGE.
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: I05c617ca8e879d2a46de9def9f97f3f7a79884ce
Diffstat (limited to 'eclipse/scripts')
-rwxr-xr-xeclipse/scripts/build_plugins.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/eclipse/scripts/build_plugins.sh b/eclipse/scripts/build_plugins.sh
index 5796a6c..f46eb47 100755
--- a/eclipse/scripts/build_plugins.sh
+++ b/eclipse/scripts/build_plugins.sh
@@ -178,6 +178,10 @@ if [ ! -f "$BUILDFILE" ]; then
exit 1
fi
+#
+# Ensure that the src dir exists since it's empty
+#
+mkdir -p $PWD/plugins/com.android.ide.eclipse.adt.overlay/src
#
# -- Print configuration used and actually execute the build --