Android Studio & IntelliJ Plugin for sort xml by name="xxx".

Overview

AndroidXmlSorter

Android Studio & IntelliJ Plugin for sort xml by name="xxx".

demo

Options

  • Insert space between difference prefix ('Snake Case', 'Camel Case')
  • Insert version and encoding
  • Delete comment
  • Code indent number
  • Separate non-translatable strings

Installation

Browse Repositories

Search word xml sort.

  • On Mac: Preference > Plugins > Browse repositories
  • On Other: File > Settings... > IDE Settings > Plugins > Browse repositories

Manually

  1. Download android-xml-sorter.jar.
  2. On Mac: Preference > Plugins > Install plugin from disk...
    On Other: File > Settings... > IDE Settings > Plugins > Install plugin from disk...
  3. Select downloaded AndroidXmlSorter.jar file.
  4. Restart application.

Usage

Editor > PopupMenu(Right Click) > Refactor > Sort Xml By Name

License

Copyright 2016-2017 Kaoru Tsutsumishita

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • Crash on Android Studio 2.3 Beta 1 (macOS Sierra)

    Crash on Android Studio 2.3 Beta 1 (macOS Sierra)

    First stacktrace :

    null java.lang.NullPointerException at com.intellij.ide.SystemHealthMonitor.getActionName(SystemHealthMonitor.java:542) at com.intellij.ide.SystemHealthMonitor.countActionInvocation(SystemHealthMonitor.java:479) at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.fireBeforeActionPerformed(ActionManagerImpl.java:1190) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$2(ActionMenuItem.java:292) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:905) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:112) at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88) at com.intellij.openapi.application.TransactionGuardImpl.access$300(TransactionGuardImpl.java:40) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:113) at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:123) at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:109) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:112) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:513) at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533) at java.awt.Component.processMouseEvent(Component.java:6533) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6298) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:627) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

    Second stacktrace :

    Typeahead request blocked: Time: 30015 com.intellij.openapi.wm.impl.FocusManagerImpl$8: Time: 152227 at com.intellij.openapi.wm.impl.FocusManagerImpl.typeAheadUntil(FocusManagerImpl.java:750) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.typeAheadUntil(IdeFocusManagerImpl.java:80) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:283) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:112) at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88) at com.intellij.openapi.application.TransactionGuardImpl.access$300(TransactionGuardImpl.java:40) at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:113) at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:123) at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:109) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:112) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:513) at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533) at java.awt.Component.processMouseEvent(Component.java:6533) at javax.swing.JComponent.processMouseEvent(JComponent.java:3324) at java.awt.Component.processEvent(Component.java:6298) at java.awt.Container.processEvent(Container.java:2236) at java.awt.Component.dispatchEventImpl(Component.java:4889) at java.awt.Container.dispatchEventImpl(Container.java:2294) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) at java.awt.Container.dispatchEventImpl(Container.java:2280) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4711) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:731) at java.awt.EventQueue$4.run(EventQueue.java:729) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:627) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

    bug 
    opened by GBouerat 18
  • Wrong line separators in v. 1.0.6

    Wrong line separators in v. 1.0.6

    In Android Studio 2.3 on Windows 7 I getting the AssertionError: Wrong line separators.

    Steps to reproduce:

    1. Right mouse click - Refactor - Sort XML By Name
    2. Dont change the settings, just click Sort in the window

    Expectations:

    The strings will be sorted

    Reality:

    AssertionError: Wrong line separators in Android Studio event log.

    Example of my string file:

    <?xml version="1.0" encoding="UTF-8"?>
    <resources>
        <string name="activation_01">App activation</string>
        <string name="activation_02">The app is activated</string>
        <string name="activation_03">A wrong promo code</string>
        <string name="activation_04">The app was activated earlier</string>
    
        ....
    
    </resources>
    

    Trace stack:

    Wrong line separators: '...one=\"no\"?>\r\n<resourc...' at offset 54
    java.lang.AssertionError: Wrong line separators: '...one=\"no\"?>\r\n<resourc...' at offset 54
    	at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:72)
    	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:129)
    	at com.intellij.openapi.util.text.StringUtil.assertValidSeparators(StringUtil.java:2679)
    	at com.intellij.openapi.editor.impl.DocumentImpl.assertValidSeparators(DocumentImpl.java:618)
    	at com.intellij.openapi.editor.impl.DocumentImpl.replaceString(DocumentImpl.java:543)
    	at com.intellij.openapi.editor.impl.DocumentImpl.access$500(DocumentImpl.java:56)
    	at com.intellij.openapi.editor.impl.DocumentImpl$6.run(DocumentImpl.java:1008)
    	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:122)
    	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:100)
    	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:86)
    	at com.intellij.openapi.editor.impl.DocumentImpl.setText(DocumentImpl.java:1015)
    	at org.roana0229.android_xml_sorter.XmlSorterAction$1.run(XmlSorterAction.java:117)
    	at com.intellij.openapi.command.WriteCommandAction$Simple.run(WriteCommandAction.java:167)
    	at com.intellij.openapi.application.RunResult.run(RunResult.java:35)
    	at com.intellij.openapi.command.WriteCommandAction$2.run(WriteCommandAction.java:113)
    	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:129)
    	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:100)
    	at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:108)
    	at com.intellij.openapi.command.WriteCommandAction.execute(WriteCommandAction.java:83)
    	at org.roana0229.android_xml_sorter.XmlSorterAction.actionPerformed(XmlSorterAction.java:119)
    	at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:197)
    	at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
    	at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:156)
    	at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:211)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$2(ActionMenuItem.java:304)
    	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:905)
    	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284)
    	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:112)
    	at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
    	at com.intellij.openapi.application.TransactionGuardImpl.access$300(TransactionGuardImpl.java:40)
    	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:113)
    	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:123)
    	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:109)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:112)
    	at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:513)
    	at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
    	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
    	at java.awt.Component.processMouseEvent(Component.java:6533)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    	at java.awt.Component.processEvent(Component.java:6298)
    	at java.awt.Container.processEvent(Container.java:2236)
    	at java.awt.Component.dispatchEventImpl(Component.java:4889)
    	at java.awt.Container.dispatchEventImpl(Container.java:2294)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    	at java.awt.Container.dispatchEventImpl(Container.java:2280)
    	at java.awt.Window.dispatchEventImpl(Window.java:2746)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    	at java.awt.EventQueue$4.run(EventQueue.java:731)
    	at java.awt.EventQueue$4.run(EventQueue.java:729)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:627)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    Caused by: com.intellij.openapi.diagnostic.Logger$EmptyThrowable
    	... 72 more
    
    opened by nkuznetsow 12
  • Added detection for non-resources xml file to prevent errors

    Added detection for non-resources xml file to prevent errors

    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

    opened by mariotaku 8
  • Plugin Error: AndroidXmlSorter threw an uncaught NullPointerException

    Plugin Error: AndroidXmlSorter threw an uncaught NullPointerException

    The error was thrown when I tried sorting my strings.xml with about 100 string resources. Unfortunately I can't share the strings.xml because it's from our commercial project at work.

    OS: macOS Sierra (Version 10.12.6)

    Android Studio: Android Studio 3.0.1 Build #AI-171.4443003, built on November 9, 2017 JRE: 1.8.0_152-release-915-b08 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.12.6

    Sorter: Version: 1.1.0

    opened by MaksimDmitriev 7
  • XML entities are replaced with corresponding character

    XML entities are replaced with corresponding character

    I'm not sure if it's intended, but XML entities are replaced with their corresponding charachter during rearrangement.

    For example, I substituted an en dash in my strings.xml with &#8211; to prevent confusion with the normal dash.

    Before rearrangement:

    <string name="timePeriod">27.09.2017, 10:00 &#8211; 27.09.2017, 11:00</string>

    After rearrangement:

    <string name="timePeriod">27.09.2017, 10:00 โ€“ 27.09.2017, 11:00</string>

    Can you please include an option in the popup dialog to disable this behaviour if this is actually intended.

    Thanks!

    opened by TobiasUhmann 3
  • Assigning a keyboard shortcut raises EmptyThrowable

    Assigning a keyboard shortcut raises EmptyThrowable

    I assigned a keyboard shortcut to the "Sort Xml By Name" action (^L, to be exact), so that I can execute it faster. However, every invocation of the action using the shortcut triggers an EmptyThrowable:

    10:20:42 Plugin Error: AndroidXmlSorter threw an uncaught EmptyThrowable. Disable Plugin
    10:20:42 EmptyThrowable: cannot share data context between Swing events; initial event count = 117962; current event count = 118157
    

    The action still completes successfully, and I see that my XML was indeed sorted, but there is a popup message indicating the error.

    bug 
    opened by mannodermaus 3
  • Add option to separate non-translatable strings

    Add option to separate non-translatable strings

    This pull request adds feature requested in #22 to group strings by "translatable" attribute.

    image


    When selected all strings that have "translatable" attribute set to "false" will be placed after all of the other strings like here:

    image

    opened by Tunous 2
  • Stop working in Android Studio 2.3

    Stop working in Android Studio 2.3

    Since update to Android Studio 2.3 the plugin stops working.

    Steps:

    1. Open xml file (strings.xml in my case)
    2. Press right mouse button
    3. Select Refactor > Sort Xml By Name

    Result: Nothin heppend. The plugin window not showing.

    The exception stack, possible associated with this issue:

    null
    java.lang.NullPointerException
    	at com.intellij.ide.SystemHealthMonitor.getActionName(SystemHealthMonitor.java:542)
    	at com.intellij.ide.SystemHealthMonitor.countActionInvocation(SystemHealthMonitor.java:479)
    	at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.fireBeforeActionPerformed(ActionManagerImpl.java:1190)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$2(ActionMenuItem.java:292)
    	at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:905)
    	at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:124)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:284)
    	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:112)
    	at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
    	at com.intellij.openapi.application.TransactionGuardImpl.access$300(TransactionGuardImpl.java:40)
    	at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:113)
    	at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:123)
    	at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:109)
    	at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:112)
    	at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:513)
    	at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:45)
    	at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:533)
    	at java.awt.Component.processMouseEvent(Component.java:6533)
    	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    	at java.awt.Component.processEvent(Component.java:6298)
    	at java.awt.Container.processEvent(Container.java:2236)
    	at java.awt.Component.dispatchEventImpl(Component.java:4889)
    	at java.awt.Container.dispatchEventImpl(Container.java:2294)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
    	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    	at java.awt.Container.dispatchEventImpl(Container.java:2280)
    	at java.awt.Window.dispatchEventImpl(Window.java:2746)
    	at java.awt.Component.dispatchEvent(Component.java:4711)
    	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
    	at java.awt.EventQueue.access$500(EventQueue.java:97)
    	at java.awt.EventQueue$3.run(EventQueue.java:709)
    	at java.awt.EventQueue$3.run(EventQueue.java:703)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
    	at java.awt.EventQueue$4.run(EventQueue.java:731)
    	at java.awt.EventQueue$4.run(EventQueue.java:729)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
    	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
    	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795)
    	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:627)
    	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387)
    	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    
    opened by nkuznetsow 2
  • Eliminates line breaks before/after xliff tag

    Eliminates line breaks before/after xliff tag

    xliff is a placeholder tag for localization files: https://developer.android.com/distribute/tools/localization-checklist.html

    This code change eliminates line breaks before/after that tag, which is a huge improvement for code style.

    <- Before | After ->

    image

    opened by mariotaku 2
  • Doesn't seem to work on localizable strings

    Doesn't seem to work on localizable strings

    Hi @roana0229, I'd like to thank you for your time to make this awesome plugin. However, upon my testing, it doesn't seem to work on localizable strings (strings-in.xml, strings-de.xml, etc) and only works on strings.xml. When I try to reformat the file, I got the following error.

    screen shot 2016-11-25 at 16 21 03

    Here's the stacktrace: null java.lang.NullPointerException at XmlSorterAction$NodeComparator.compare(XmlSorterAction.java:129) at XmlSorterAction$NodeComparator.compare(XmlSorterAction.java:119) at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) at java.util.TimSort.sort(TimSort.java:234) at java.util.Arrays.sort(Arrays.java:1512) at java.util.ArrayList.sort(ArrayList.java:1454) at java.util.Collections.sort(Collections.java:175) at XmlSorterAction.actionPerformed(XmlSorterAction.java:70) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:595) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:646) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.java:485) at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:215) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:631) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:386) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

    help wanted 
    opened by nicholaslie90 2
  • [FEATURE] Add hook on VCS commit. Group by translatable.

    [FEATURE] Add hook on VCS commit. Group by translatable.

    I'm using this nice plugin these days, and wonder if this action could be automatically performed when I commit changes on xml files. And I added some string resources marked as translatable="false", can it group those string form others ?

    Well, I know a little bit about IDEA's plugin development, maybe someday I'll send you a pull request.

    opened by DevDengChao 1
  • The plugin does not work in intellij idea 2019.3

    The plugin does not work in intellij idea 2019.3

    I installed the plugin on the latest version of idea. The "refactor" menu does not display the new item "Sort Xml by name". In the hotkey settings the "Sort xml by name" item is displayed but the hotkeys do not sort the code.

    idea64_UrEfXljiWF

    opened by seregagl 0
  • Problem with sorting on Italian string resources

    Problem with sorting on Italian string resources

    null java.lang.NullPointerException at org.roana0229.android_xml_sorter.CommentedNode$Comparator.compare(CommentedNode.java:56) at org.roana0229.android_xml_sorter.CommentedNode$Comparator.compare(CommentedNode.java:26) at java.util.TimSort.countRunAndMakeAscending(TimSort.java:360) at java.util.TimSort.sort(TimSort.java:234) at java.util.Arrays.sort(Arrays.java:1512) at java.util.ArrayList.sort(ArrayList.java:1456) at java.util.Collections.sort(Collections.java:175) at org.roana0229.android_xml_sorter.XmlSorterAction.execute(XmlSorterAction.java:94) at org.roana0229.android_xml_sorter.XmlInstantSorterAction.actionPerformed(XmlInstantSorterAction.java:21) at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:220) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:237) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.lambda$actionPerformed$0(ActionMenuItem.java:301) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:307) at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.runOnOwnContext(IdeFocusManagerImpl.java:104) at com.intellij.openapi.actionSystem.impl.ActionMenuItem$ActionTransmitter.actionPerformed(ActionMenuItem.java:291) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$0(ActionMenuItem.java:111) at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88) at com.intellij.openapi.application.TransactionGuardImpl.lambda$submitTransaction$1(TransactionGuardImpl.java:111) at com.intellij.openapi.application.TransactionGuardImpl.submitTransaction(TransactionGuardImpl.java:120) at com.intellij.openapi.application.TransactionGuard.submitTransaction(TransactionGuard.java:122) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:111) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:528) at com.intellij.ui.plaf.beg.BegMenuItemUI.access$300(BegMenuItemUI.java:48) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:548) at java.awt.Component.processMouseEvent(Component.java:6548) at javax.swing.JComponent.processMouseEvent(JComponent.java:3325) at java.awt.Component.processEvent(Component.java:6313) at java.awt.Container.processEvent(Container.java:2237) at java.awt.Component.dispatchEventImpl(Component.java:4903) at java.awt.Container.dispatchEventImpl(Container.java:2295) at java.awt.Component.dispatchEvent(Component.java:4725) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4889) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4526) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4467) at java.awt.Container.dispatchEventImpl(Container.java:2281) at java.awt.Window.dispatchEventImpl(Window.java:2746) at java.awt.Component.dispatchEvent(Component.java:4725) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764) at java.awt.EventQueue.access$500(EventQueue.java:98) at java.awt.EventQueue$3.run(EventQueue.java:715) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90) at java.awt.EventQueue$4.run(EventQueue.java:737) at java.awt.EventQueue$4.run(EventQueue.java:735) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80) at java.awt.EventQueue.dispatchEvent(EventQueue.java:734) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:759) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:423) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

    opened by aleripe 4
  • Sorter replaces the reference to values from DOCTYPE resources

    Sorter replaces the reference to values from DOCTYPE resources

    I'm setting some values using this mechanism to allow concatenation inside my xml.

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    
    <!DOCTYPE resources [
        <!ENTITY email_link_host "abc.com">
        ]>
    <resources>
        <string name="email_url">https://&email_link_host;/someurl</string>
       <string name="other_url">https://&email_link_host;/otherurl</string>
    </resources>
    

    But after formatting the using the sorter it removes DOCTYPE and inject the variables into the resource string. After sort the output is:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <resources>
        <string name="email_url">https://abc.com/someurl</string>
       <string name="other_url">https://abc.com/otherurl</string>
    </resources>
    

    Please look into this issue.

    opened by umarhussain15 1
  • Spaces between two xliff placeholder tags are trimmed during sort

    Spaces between two xliff placeholder tags are trimmed during sort

    Before:

    <xliff:g id="name">%2$s</xliff:g> <xliff:g id="time_with_preposition">%3$s</xliff:g>
    

    After:

    <xliff:g id="name">%2$s</xliff:g><xliff:g id="time_with_preposition">%3$s</xliff:g>
    <!--                            ^^ HERE                                         -->
    

    I'll create a pull request to this if possible. Thanks for your plugin!

    opened by mariotaku 1
Releases(v1.1.1)
Owner
Kaoru Tsutsumishita
iOS, Android App Developer
Kaoru Tsutsumishita
IntelliJ Idea Astor Plugin is a plugin that integrates Astor in Intellij Idea

IntelliJ Idea Astor Plugin IntelliJ Idea Astor Plugin is a plugin that integrates Astor in Intellij Idea. It communicates with a local/remote program

null 4 Aug 28, 2021
Intellij-platform-plugin-template - IntelliJ Platform Plugin Template

IntelliJ Platform Plugin Template TL;DR: Click the Use this template button and

null 0 Jan 1, 2022
Kirill Rakhman 4 Sep 15, 2022
A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.

ADB Idea A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development. The following commands are provided: Uninst

Philippe Breault 2k Dec 28, 2022
IntelliJ / Android Studio plugin for Android Holo Colors

This project is not maintained anymore. Holo Colors doesn't make sense since the introduction of Material Design and the ability to set the primary co

Jรฉrรดme Van Der Linden 644 Nov 10, 2022
Android Studio plug-in for generating ButterKnife injections from selected layout XML.

ButterKnifeZelezny Simple plug-in for Android Studio/IDEA that allows one-click creation of Butterknife view injections. How to install in Android Stu

Avast 3.4k Dec 14, 2022
An Android Studio / IntelliJ plug-in help you upload your apk or listing to Google Play.

DroidLane An Android Studio / IntelliJ plug-in help you upload your apk or listing to Google Play. Installation Open Android Studio or IntelliJ IDEA O

Jintin 24 Jul 26, 2021
eventbus-intellij-plugin 3.8 0.0 L1 Java Plugin to navigate between events posted by EventBus.

eventbus-intellij-plugin Plugin to navigate between events posted by EventBus. Post to onEvent and onEvent to Post Install There are two ways. Prefere

Shinnosuke Kugimiya 315 Aug 8, 2022
IntelliJ Plugin for Android Parcelable boilerplate code generation.

IntelliJ/Android Studio Plugin for Android Parcelable boilerplate code generation This tool generates an Android Parcelable implementation based on fi

Michaล‚ Charmas 2.1k Dec 27, 2022
IntelliJ plugin that provides some useful utilities to support the daily work with Gradle.

IntelliJ Gradle Utilities Plugin This IntelliJ plugin provides some useful utilities to support the daily work with Gradle. It's available on the offi

Marcel Kliemannel 6 Jul 29, 2022
IntelliJ-based IDEs Protobuf Language Plugin that provides Protobuf language support.

IntelliJ Protobuf Language Plugin Reference Inspired by protobuf-jetbrains-plugin and intellij-protobuf-editor. Descriptor IntelliJ-based IDEs Protobu

Kanro 72 Dec 7, 2022
Plugin for IntelliJ-based IDEs folding root files in the ProjectView

Foldable ProjectView The Foldable ProjectView is a plugin for the IntelliJ-based IDEs that lets you fold files located in the root of your project. Av

Jakub Chrzanowski 47 Dec 13, 2022
IntelliJ plugin that provides a modern and powerful byte code analyzer tool window.

IntelliJ Byte Code Analyzer Plugin This IntelliJ plugin provides a modern and powerful byte code analyzer tool window. Its supports Java, Kotlin, Groo

Marcel Kliemannel 29 Nov 9, 2022
โœˆ๏ธ IDE plugin for the IntelliJ platform which adds GitHub Copilot support. (VERY WIP)

JetBrains Copilot GitHub Copilot support for the IntellIJ Platform. Installation Download the latest release. Select the Install Plugin from Disk opti

Koding 155 Dec 10, 2022
A plugin that adds support for rs2asm files to IntelliJ.

Rs2Asm This plugin adds some simple features when interacting with rs2asm files. Features Syntax highlighting Autocompletion for label names and instr

Joshua Filby 3 Dec 16, 2021
IntelliJ Platform Plugin Template

IntelliJ Platform Plugin Template is a repository that provides a pure template to make it easier to create a new plugin project (check the Creating a repository from a template article).

null 0 Nov 8, 2021
IntelliJ IDEA / PhpStorm InertiaJS Plugin

PhpStorm and IntelliJ IDEA Inertia.js Plugin Provides support in PhpStorm and IntelliJ IDEA Ultimate for Inertia.js. ?? GitHub Issues: feature request

Matthew Hailwood 16 Dec 18, 2022
A playground to development intellij plugin

pluginExporlor Template ToDo list Create a new IntelliJ Platform Plugin Template project. Get familiar with the template documentation. Verify the plu

Woody Hu 0 Nov 23, 2021
Developer ToolBox IntelliJ Plugin

developer-toolbox Template ToDo list Create a new IntelliJ Platform Plugin Template project. Get familiar with the template documentation. Verify the

canarin 0 Dec 11, 2021