roana0229 / android-xml-sorter

Android Studio & IntelliJ Plugin for sort xml by name="xxx".
Apache License 2.0
103 stars 12 forks source link

Added detection for non-resources xml file to prevent errors #13

Closed mariotaku closed 7 years ago

mariotaku commented 7 years ago

Hi, it's me again 😸 , thanks for this awesome plugin!

This PR adds detection for non-resources xml file, and hides menu entry for them.

For AndroidManifest.xml and so on: image

For strings.xml, arrays.xml and so on: image

roana0229 commented 7 years ago

Hi, thank you as always! 😄 I will confirm soon.

roana0229 commented 7 years ago

I Compiled this branch. And not found XMLInputFactory.newFactory() method. 😢 I found XMLInputFactory.newInstance(). But, XMLInputFactory.newInstance() is deprecated.

I am using environment this.

IntelliJ IDEA 2016.3.5
Build #IC-163.13906.18, built on March 6, 2017
JRE: 1.8.0_112-release-408-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

@mariotaku Please teach your environment and setting. 🙏

mariotaku commented 7 years ago

Sorry, maybe it's an incompatible method. I'll check tomorrow. How to print out our development environment by the way?

roana0229 commented 7 years ago

I'll check tomorrow

Thank you 😃

I copied this way. IntelliJ IDEA Menu > About IntelliJ IDEA > Copy to Clipboard (show when hover mouse on environment)

mariotaku commented 7 years ago

My environment seems identical

IntelliJ IDEA 2016.3.5
Build #IC-163.13906.18, built on March 6, 2017
JRE: 1.8.0_112-release-408-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

...While project SDK is Android Studio AI-143.2821654

mariotaku commented 7 years ago

@roana0229 Done! I guess this problem was fixed, to make sure this works we could run it and try.

roana0229 commented 7 years ago

👀 I will confirm tonight.

roana0229 commented 7 years ago

Awesome 👍