10 comments

Hi Dave,

On 2003/11/04 01:44, Dave Kriewall wrote:

Version 0.7 fixes a few configuration persistence problems.


I just installed IDEA #963 and now 0.7 of the Rearranger gives me the
following exception. You posted that version 0.6 was working with build
963, so I assume this is a new issue that was introduced in 0.7. I
didn't see this error with build #957...

Thanks,
Bas

2003-11-04 14:48:06,710 ERROR -
plication.impl.ApplicationImpl - Assertion failed: Write access is
allowed inside write-action only (see
com.intellij.openapi.application.Application.runWriteAction())
2003-11-04 14:48:06,710 ERROR -
plication.impl.ApplicationImpl - IntelliJ IDEA (Aurora) Build #963
2003-11-04 14:48:06,710 ERROR -
plication.impl.ApplicationImpl - JDK: 1.4.2
2003-11-04 14:48:06,710 ERROR -
plication.impl.ApplicationImpl - VM: Java HotSpot(TM) Client VM
2003-11-04 14:48:06,710 ERROR -
plication.impl.ApplicationImpl - Vendor: Sun Microsystems Inc.
2003-11-04 14:48:06,710 ERROR -
plication.impl.ApplicationImpl - OS: Windows 2000
2003-11-04 14:48:06,710 ERROR -
plication.impl.ApplicationImpl - Last Action: Rearranger
2003-11-04 14:48:06,710 ERROR -
plication.impl.ApplicationImpl - Current Command: Rearranger
2003-11-04 14:48:06,740 ERROR -
plication.impl.ApplicationImpl - Assertion failed: Write access is
allowed inside write-action only (see
com.intellij.openapi.application.Application.runWriteAction())
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:2)
at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:21)
at com.intellij.openapi.application.a.b.assertWriteAccessAllowed(b.java:72)
at com.intellij.openapi.editor.a.k.a(k.java:63)
at com.intellij.openapi.editor.a.k.replaceString(k.java:164)
at
com.wrq.rearranger.rearrangement.Emitter.emitRearrangedDocument(Emitter.java:100)
at
com.wrq.rearranger.RearrangerActionHandler.rearrangeDocument(RearrangerActionHandler.java:114)
at
com.wrq.rearranger.RearrangerActionHandler$rearrangerTask.run(RearrangerActionHandler.java:153)
at com.intellij.openapi.command.b.a.executeCommand(a.java:65)
at
com.wrq.rearranger.RearrangerActionHandler.runWriteActionRearrangement(RearrangerActionHandler.java:89)
at
com.wrq.rearranger.RearrangerActionHandler.execute(RearrangerActionHandler.java:62)
at
com.intellij.openapi.editor.actionSystem.EditorAction$1.run(EditorAction.java:2)
at com.intellij.openapi.command.b.a.executeCommand(a.java:88)
at
com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:21)
at
com.intellij.openapi.editor.actionSystem.EditorAction.actionPerformed(EditorAction.java:25)
at com.intellij.openapi.actionSystem.b.o$b_.actionPerformed(o$b_.java:12)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at com.intellij.openapi.actionSystem.b.o.fireActionPerformed(o.java:57)
at com.intellij.ui.a.a.h.doClick(h.java:102)
at com.intellij.ui.a.a.h.access$300(h.java:222)
at com.intellij.ui.a.a.h$a_.mouseReleased(h$a_.java:1)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.intellij.ide.s.a(s.java:43)
at com.intellij.ide.s.dispatchEvent(s.java:93)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)

0

Got an error using the rearranger. Any thoughts Dave?

org.jdom.IllegalDataException: The data "null" is not legal for a JDOM attribute: A null is not a legal XML value.

at org.jdom.Attribute.setValue(Attribute.java:486)

at org.jdom.Attribute.(Attribute.java:232) at org.jdom.Attribute.]]>(Attribute.java:255)

at org.jdom.Element.setAttribute(Element.java:1239)

at com.wrq.rearranger.settings.atomicAttributes.NameAttribute.appendAttributes(NameAttribute.java:84)

at com.wrq.rearranger.settings.attributeGroups.CommonAttributes.writeExternalCommonAttributes(CommonAttributes.java:131)

at com.wrq.rearranger.settings.attributeGroups.FieldAttributes.writeExternal(FieldAttributes.java:158)

at com.wrq.rearranger.settings.RearrangerSettings.writeExternal(RearrangerSettings.java:152)

at com.wrq.rearranger.Rearranger.writeExternal(Rearranger.java:161)

at com.intellij.openapi.components.b.a.a(a.java:82)

at com.intellij.openapi.application.a.b.f(b.java:140)

at com.intellij.openapi.application.a.b.saveSettings(b.java:208)

at com.intellij.ide.bk.b(bk.java:7)

at com.intellij.ide.bk.access$200(bk.java:36)

at com.intellij.ide.bk$2.run(bk$2.java:4)

at com.intellij.util.Alarm$1.run(Alarm.java:5)

at com.intellij.util.Alarm$2.run(Alarm.java:9)

at java.awt.event.InvocationEvent.dispatch(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at com.intellij.ide.s.a(s.java:43)

at com.intellij.ide.s.dispatchEvent(s.java:6)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

0

BTW - the exception appears to be triggered when IDEA loses focus and I move to another application.

0

Hi Bas,

Looks like some of my progress bar feaure development interfered with what I uploaded. I'm waiting (hoping) for some explanation from IDEA guys about that runWriteAction() method before I can finish that.

Anyway, I'll fix it and upload.

Sorry for the inconvenience,
-Dave

0

Thanks for the bug report. Yes, it is happening when configuration is being written to the xml file, and that happens when IDEA loses focus.

-Dave

0

Bas, Joe,

give version 0.8 a try.

-Dave

0

Fixed the losingFocuseException. Thanks.

Another request for you. The line separator comments have a feature where they only appear if the subsequent rule is matched (for instance). This enables me to title my public methods with the title "PUBLIC METHODS". However it doesn't allow me to sub-arrange underneath the public methods title and have the title show if any of the sub-arrangements are satisfied. eg.

public static methods
public non-static methods

I'd appreciate the ability to have the comment specify that it be shown if any of the following (or preceding) n rules are satisfied.

I'm getting finickety! :)

0

You mean, extend the number of rules before or after the comment that are tested? (When I was writing it, I wondered how long it would be before somebody wanted the rules enhanced!)

So then the comment logic would provide the following choices for emitting a comment:
(default 1) rules were matched 2B- if any of the last rules were matched 3A- if all of the next rules were matched 3B- if any of the next rules were matched - two of the above, both true (2A & 3A, 2A & 3B, 2B & 3A, 2B & 3B), e.g. "if any of the last 3 rules and all of the next 2 rules were matched" ]]>
Seems like that ought to suit everybody if they can just figure out how to use it to their advantage. We'll have to have a forum for exchanging Rearranger configurations so we can see what tricks others have found!

-Dave

0

that sounds like a winner. Again excellent work...

0

On 2003/11/05 01:26, Dave Kriewall wrote:

give version 0.8 a try.


Version 0.8 works great for me, thanks. I see version 0.9 is out
already, you are working fast!

Bas

0

Please sign in to leave a comment.