OSDN Git Service

Fix Extract as Include
authorTor Norbye <tnorbye@google.com>
Wed, 9 Feb 2011 03:13:12 +0000 (19:13 -0800)
committerTor Norbye <tnorbye@google.com>
Wed, 9 Feb 2011 03:13:12 +0000 (19:13 -0800)
commitcf42cc1545c7f105e7a91c64531962646d4ae00b
tree64f1e7539d4a3a4f40155d32f583d3fc9fc8e1ae
parente379564c77c2870689782e7101f51ab82a767238
Fix Extract as Include

Two fixes for Extract as Include:

(1) After extracting the view fragments from the source layout, save
    the layout file. This is necessary in order to make the "Show
    Included In" functionality work on the newly extracted fragment,
    since the include-finder which identifies candidates for inclusion
    is triggered by file saves, not buffer edits, and secondly even
    the Show Included In facility itself requires the outer buffer to
    be a saved file, not an edited buffer since the parser reads from
    disk.

(2) Insert a space after the closing quote in the include string; this
    could lead to broken XML in some instances.

Change-Id: I10ede72ef40dc0afaa93322637397245ac9a54ee
eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/editors/layout/gle2/ExtractIncludeAction.java