[ANN] Intention Power-Pack 0.7 released


Announcing the release of version 0.7 of the Intention Power-Pack plugin. You can get it via the plugin manager, or at http://www.intellij.org/twiki/bin/view/Main/IntentionPowerPack.

Changes in version 0.7

"Flip method" intention now works on any commutative method, not just "equals" and "equalsIgnoreCase". For instance, you can now flip "compareTo" or "isAssignableFrom". (thanks to Debabrata Dash for the idea and code for this).

Handling of negations improved. For instance: applying
"Change && to ||" on

if(foo!=bar && baz<barangus)

would previously produce

if(!(!(foo!=bar) || !(baz<barangus)))

but now produces the much cleaner

if(!(foo==bar || baz>=barangus))

Performance improvements
Bugfixes
Much code cleanup

Let me know if there are any issues.

--Dave

2 comments

ipp v0.7

File A.java
class A {
public static class Inner {
}
}

File B.java
class B {
public void method(A.Inner a) {}
}

ipp offered to auto-import A.Inner, and I auto-accepted :)

java.lang.NullPointerException
at com.intellij.psi.impl.p.createImportStatement(p.java:249)
at
com.siyeh.ipp.fqnames.ReplaceFullyQualifiedNameWithImportIntention.addImport
IfNecessary(ReplaceFullyQualifiedNameWithImportIntention.java:80)
at
com.siyeh.ipp.fqnames.ReplaceFullyQualifiedNameWithImportIntention.invoke(Re
placeFullyQualifiedNameWithImportIntention.java:53)
at com.intellij.codeInsight.intention.a.x$8.run(x$8.java:2)
at com.intellij.openapi.application.a.b.runWriteAction(b.java:7)
at com.intellij.codeInsight.intention.a.x$11.run(x$11.java:2)
at com.intellij.openapi.command.b.a.executeCommand(a.java:88)
at com.intellij.codeInsight.intention.a.x$0.run(x$0.java:0)
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

Got the same exception when I had a java.util.List]]> and IPP
wanted to import java.util.List.

Note that I already had the following imports:

import java.awt.*;
import java.util.*;
import java.util.List;



java.lang.NullPointerException
at com.intellij.psi.impl.q.createImportStatement(q.java:16)
at
com.siyeh.ipp.fqnames.ReplaceFullyQualifiedNameWithImportIntention.addImportIfNecessary(ReplaceFullyQualifiedNameWithImportIntention.java:80)
at
com.siyeh.ipp.fqnames.ReplaceFullyQualifiedNameWithImportIntention.invoke(ReplaceFullyQualifiedNameWithImportIntention.java:53)
at com.intellij.codeInsight.intention.b.x$8.run(x$8.java:0)
at com.intellij.openapi.application.b.b.runWriteAction(b.java:31)
at com.intellij.codeInsight.intention.b.x$11.run(x$11.java:2)
at com.intellij.openapi.command.b.a.executeCommand(a.java:58)
at com.intellij.codeInsight.intention.b.x$0.run(x$0.java:3)
at com.intellij.util.LaterInvokator$FlushQueue.run(LaterInvokator.java:7)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at com.intellij.ide.r.b(r.java:5)
at com.intellij.ide.r.a(r.java:109)
at com.intellij.ide.r.dispatchEvent(r.java:22)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

0

Please sign in to leave a comment.