[ANN] IdeaScrappy 1.1

Adds:

1) ability to execute code without selecting text
2) ability to define imports.

Enjoy,
-rg

9 comments

Rhett, just two comments:
- the imports are not saved (that is an important bug)
- when I rename the JAR (e.g. to Scrappy.1.1.jar to remember the version)
and try to compile something, I get that class IScrappy cannot be found
error.
(the original file name is OK)
But thanks for the no-select-execution.

r.

"Rhett Guthrie" <rhett@bytecrafters.com> wrote in message
news:3250652.1047615126118.JavaMail.jrun@is.intellij.net...

Adds:

>

1) ability to execute code without selecting text
2) ability to define imports.

>

Enjoy,
-rg



0

(Running Build #696 / Linux)

This one works for me - thanks!
Still no popup-menu, but the rest of the functionality seems ok!

CU,
Edwin

0

Great job on the features, but sadly I can't get it to work. I'm getting errors whenever I try to do-it/print-it/inspect-it. Always prints out "Compile failed". Here's a stack trace.

2003-03-14 09:48:39,346 INFO - bytecrafters.scrappy.Scrappy -
java.lang.NullPointerException
at java.util.Arrays$ArrayList.]]>(Unknown Source)
at java.util.Arrays.asList(Unknown Source)
at com.intellij.openapi.projectRoots.a.a.b(a.java:193)
at com.intellij.openapi.projectRoots.a.y.getFullClassPath(y.java:32)
at bytecrafters.scrappy.intellij.IntellijClassContext.getClassPath(IntellijClassContext.java:55)
at bytecrafters.scrappy.intellij.IntellijClassContext.getContextClassLoader(IntellijClassContext.java:34)
at bytecrafters.scrappy.ExecuteIt.createScrap(ExecuteIt.java:98)
at bytecrafters.scrappy.ExecuteIt.executeIt(ExecuteIt.java:51)
at bytecrafters.scrappy.Scrappy$5.actionPerformed(Scrappy.java:67)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.AbstractButton.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased(Unknown Source)
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.t.a(t.java:7)
at com.intellij.ide.t.dispatchEvent(t.java:74)
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

Dave - this looks like an Intellij bug. I am loading the classpath from Intellij, and deep inside it's bowels it is throwing an NPE. Not sure what is causing it as I do not have visibility to their code, but maybe this project has nothing in the classpath?

I'll take a look at my source tonight and see if there is anything I can do, but I doubt it.

-rg

0

- imports: yes, i totally forgot to add that. that is an easy thing to add so i can get a fix out this weekend.

-renaming jar: don't do that. :) i need that name to remain the same so that i can load the scrappy classes. if you want to know the current version, look at the about screen. you can rename the old ones if you like.

-rg

0

Rhett Guthrie wrote:

-renaming jar: don't do that. :) i need that name to remain the same so that i can load the scrappy classes. if you want to know the current version, look at the about screen. you can rename the old ones if you like.


You know you can find out from which jar the current class was loaded?
Then you don't need to hard-code the jar filename.

ClassLoader loader = clazz.getClassLoader();
URL classUrl = loader.getResource(clazz.getName().replace('.', '/') +
".class");

That URL will be a jar:// URL from which you can then get the filename.

Ciao,
Gordon

--
Gordon Tyler (Software Developer)
Quest Software <http://java.quest.com/>
260 King Street East, Toronto, Ontario M5A 4L5, Canada
Voice: 416-643-4846 | Fax: 416-594-1919

0

Don't worry about it. It seems to have been magically fixed in 807. Thanks

0

Good news. I was at a loss. :)

-rg

0

Please sign in to leave a comment.