OSDN Git Service
Add newline inside new root elements, and some move code around
Tweak the "New XML File" creation code to insert a new line inside the
created root element, indent, and place the cursor there. This means
that you end up with:
<LinearLayout>
|
</LinearLayout>
instead of (where | denotes the initial caret position):
|<LinearLayout>
</LinearLayout>
This means you can instantly press Ctrl-Space to complete on the
elements, etc., and is similar to how Eclipse creates new method
bodies from templates, adding newlines such that you can instantly
write code there instead of having to "open them up".
All the diffs for this are in NewXmlFileWizard.java; the other
modifications in this changeset are simple move refactoring
operations as described next:
The second change in this changeset is moving some code around such
that common utility methods live in more natural places rather than
where they were first needed.
In particular:
Hyperlinks.openUrl => AdtPlugin
Hyperlinks.openJavaClass => AdtPlugin
Hyperlinks.openFile => AdtPlugin
AndroidContentAssist.getAndroidXmlEditor => AndroidXmlEditor
ResourceChooser.canCreateResource => ResourceHelper
ResourceChooser.createResource => ResourceHelper
Hyperlinks.parseResource => ResourceHelper
ResourceNameValidator.isValueBasedResourceType => ResourceHelper
ResourceNameValidator.isFileBasedResourceType => ResourceHelper
Change-Id: If7690df9ce59c709c1d909ffd9f74c2684f3dd46
14 files changed: