Authors:
Dave Kriewall
free software

Rearranger

Products: IntelliJ IDEA

Vendor: Dave Kriewall

Email: dave.kriewall at gmail.com

Website: http://java.net/projects/rearranger

Description:

Rearranges (reorders) class and class member declarations according to a user-specified order and/or method call hierarchy; generates section-marking comments; provides several controls for spacing within and between methods and classes; and permits the user to manually rearrange items.
Downloads: 58544
Rating:
Participated in rating: 25
Version Since Build Until Build File/URL Size (Kb) Date Details
5.5. 110.365. . Download 422.61 2011-11-19 05:31:18 details
5.4. 107.105. . Download 422.66 2011-05-21 11:40:42 details
5.3. 80.8500. . Download 433.75 2010-03-13 01:38:50 details
4.7. 50.4267. . Download 457.95 2007-02-14 21:41:50 details
4.3.1. 40.3431. . Download 448.64 2005-10-29 22:08:26 details
4.0.2. 40.3265. . Download 410.34 2005-03-26 23:18:47 details
4.0.1. 40.3229. . Download 410.29 2005-03-26 21:12:31 details
3.9.1. 40.2253. . Download 409.76 2005-02-23 23:26:23 details
3.8.1. 40.2250. . Download 392.25 2005-01-28 00:57:45 details
3.6. 40.2233. . Download 379.04 2004-08-08 01:47:09 details
3.5. . . Download 378.69 2004-06-30 23:10:13 details
. .
17 updates are hidden show all updates

Recent change notes:

1) (Version 5.5) Recompiled for IDEA 11. Thanks to Denis Zhdanov at IJ for the necessary patches.

Comments:

123>
anton.rudeshko
Rated:
2013-01-23 15:54:54
.
DThielke
Rated:
2012-01-03 22:27:42
Thanks to the author for helping me sort out my issue and for maintaining this plugin. Great work!
.
mmadson
Rated:
2011-11-24 04:59:50
The check box "Move Extracted methods below first usage" was messing me up, unchecked and everything is working as expected. Fantastic plugin, keep up the good work!
.
mmadson
Rated:
2011-11-24 04:43:25
Not sure if i'm running into a bug or just not using it appropriately. I have a moderately complex class and I'm trying to create an ordering as follows:

public static final field
public static field
public field
protected static final field
protected static field
protected field
...etc package, private

then again for methods, same pattern.

In each of these groups i'd like them to be sorted by type in the case for fields and name (alphabetically) in the case for methods.

After configuring the rules as above and hitting ctrl + alt + shift + R in my class, I still see protected methods occurring before public methods. Not sure what I'm doing wrong. I'm using v5.4, IntelliJ IDEA 10.5 Ultimate. The only thing I can think that might be throwing it off is that I typically use the final modifier for all my parameters, maybe that's confusing it?

.
madjack
Rated:
2011-09-21 22:39:37
Defaults rules were too complicated with all the comments, etc. All I really wanted was grouping by static/instance/inner and sorted by visibility/name.

Fortunately, the rule editor was a breeze to use.

I love it!
.
blabno
Rated:
2011-07-12 11:35:48
Very useful tool. Helps to apply standards and order quickly. Very useful when you write code with others.
.
Dave Kriewall
2011-05-31 09:35:27
Be sure you're using version 5.4 with IDEA 10.5. The problem is fixed in that version.
.
Anonymous
2011-05-30 18:55:15
I have the same exception..

Error during dispatching of java.awt.event.KeyEvent[KEY_PRESSED,keyCode=82,keyText=R,keyChar=Undefined keyChar,modifiers=Ctrl+Alt+Maj,extModifiers=Ctrl+Alt+Maj,keyLocation=KEY_LOCATION_STANDARD,rawCode=82,primaryLevelUnicode=114,scancode=19] on frame0: com.intellij.psi.PsiClass.getLBrace()Lcom/intellij/psi/PsiJavaToken;
java.lang.NoSuchMethodError: com.intellij.psi.PsiClass.getLBrace()Lcom/intellij/psi/PsiJavaToken;
at com.wrq.rearranger.entry.ClassEntry.parseRemainingClassContents(ClassEntry.java:200)
at com.wrq.rearranger.entry.PsiFileEntry.parseFile(PsiFileEntry.java:91)
at com.wrq.rearranger.rearrangement.Parser.parseOuterLevel(Parser.java:60)
at com.wrq.rearranger.RearrangerActionHandler.rearrangeDocument(RearrangerActionHandler.java:191)
at com.wrq.rearranger.RearrangerActionHandler$rearrangerTask.run(RearrangerActionHandler.java:241)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:108)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:91)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:79)
at com.wrq.rearranger.RearrangerActionHandler.runWriteActionRearrangement(RearrangerActionHandler.java:160)
at com.wrq.rearranger.RearrangerActionHandler$1.run(RearrangerActionHandler.java:118)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:841)
at com.wrq.rearranger.RearrangerActionHandler.execute(RearrangerActionHandler.java:111)
at com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:77)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:115)
at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:88)
at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:63)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$3.performAction(IdeKeyEventDispatcher.java:524)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.java:564)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.d(IdeKeyEventDispatcher.java:444)
at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.java:197)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:500)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:410)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
.
Anonymous
Rated:
2011-05-20 15:34:08
In 10.5 the following exception is thrown:

com.intellij.psi.PsiClass.getLBrace()Lcom/intellij/psi/PsiJavaToken;: com.intellij.psi.PsiClass.getLBrace()Lcom/intellij/psi/PsiJavaToken;
java.lang.NoSuchMethodError: com.intellij.psi.PsiClass.getLBrace()Lcom/intellij/psi/PsiJavaToken;
at com.wrq.rearranger.entry.ClassEntry.parseRemainingClassContents(ClassEntry.java:200)
at com.wrq.rearranger.entry.PsiFileEntry.parseFile(PsiFileEntry.java:91)
at com.wrq.rearranger.rearrangement.Parser.parseOuterLevel(Parser.java:60)
at com.wrq.rearranger.RearrangerActionHandler.rearrangeDocument(RearrangerActionHandler.java:191)
at com.wrq.rearranger.RearrangerActionHandler$rearrangerTask.run(RearrangerActionHandler.java:241)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:108)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:91)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:79)
at com.wrq.rearranger.RearrangerActionHandler.runWriteActionRearrangement(RearrangerActionHandler.java:160)
at com.wrq.rearranger.RearrangerActionHandler$1.run(RearrangerActionHandler.java:118)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:841)
at com.wrq.rearranger.RearrangerActionHandler.execute(RearrangerActionHandler.java:111)
at com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:77)
at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:115)
at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:88)
at com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:63)
at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep$1.run(PopupFactoryImpl.java:506)
at com.intellij.openapi.wm.impl.FocusManagerImpl.a(FocusManagerImpl.java:503)
at com.intellij.openapi.wm.impl.FocusManagerImpl.e(FocusManagerImpl.java:492)
at com.intellij.openapi.wm.impl.FocusManagerImpl.d(FocusManagerImpl.java:476)
at com.intellij.openapi.wm.impl.FocusManagerImpl.access$200(FocusManagerImpl.java:52)
at com.intellij.openapi.wm.impl.FocusManagerImpl$7.run(FocusManagerImpl.java:407)
at com.intellij.util.ui.UIUtil.invokeLaterIfNeeded(UIUtil.java:1431)
at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:390)
at com.intellij.openapi.wm.impl.FocusManagerImpl.doWhenFocusSettlesDown(FocusManagerImpl.java:386)
at com.intellij.openapi.wm.impl.IdeFocusManagerImpl.doWhenFocusSettlesDown(IdeFocusManagerImpl.java:60)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.a(ToolWindowManagerImpl.java:223)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl.access$200(ToolWindowManagerImpl.java:82)
at com.intellij.openapi.wm.impl.ToolWindowManagerImpl$2.run(ToolWindowManagerImpl.java:141)
at com.intellij.util.Alarm$Request$1.run(Alarm.java:229)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:332)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:641)
at java.awt.EventQueue.access$000(EventQueue.java:84)
at java.awt.EventQueue$1.run(EventQueue.java:602)
at java.awt.EventQueue$1.run(EventQueue.java:600)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:611)
at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:661)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:514)
at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:410)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:368)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
.
stanft
2011-05-18 13:11:58
Any chance that there will be an updated version for IDEA 10.5?
.
Anonymous
2011-04-08 22:22:24
It did work in IDEA 10 until 10.5 EAP (build 106.396). After checking out the source code and recompiling it in latest EAP it works again for me
.
MikeNereson
Rated:
2011-03-22 17:21:53
Wish it worked in IntelliJ 10
.
cbismuth
Rated:
2011-01-03 16:37:52
Would be great to be able to rearrange before or after formatting code.

Keep up the good work!

Thank you
Chris
.
Anonymous
Rated:
2010-12-13 18:15:15
Probably my favorite plugin.

Doesn\\\\\\\'t work in IntelliJ 10.
.
fester
Rated:
2010-11-17 12:40:34
.
123>