22 comments


U?ytkownik "Rhett Guthrie" <rhett@bytecrafters.com> napisa? w wiadomo?ci
news:2895689.1046495041101.JavaMail.javamailuser@localhost...

Scrappy is a scrapbook environment like we used to have in Smalltalk and

VisualAge/Java environments.
>

http://www.intellij.org/twiki/bin/view/Main/IdeaScrappy

>

Why unit test it when you can scrap it? ;)

>

Thank you Rhett. I just love this little plugin. I missed this feature
compared to VAJ.
Then I installed BeanShell plugin but this was too much. I needed just
IdeaScrappy.
Even the name is kinda yummy....

I can't wait for improvements. Do you think it's possible to highlight Java
code the same way as in
code window? or use other Idea features like completion?


0

Where did you download this plugin from?

I cannot find any download links on the plugin page
mentioned below.

Marius


Michal Szklanowski wrote:

U?ytkownik "Rhett Guthrie" <rhett@bytecrafters.com> napisa? w wiadomo?ci
news:2895689.1046495041101.JavaMail.javamailuser@localhost...

>>Scrappy is a scrapbook environment like we used to have in Smalltalk and


VisualAge/Java environments.

>>http://www.intellij.org/twiki/bin/view/Main/IdeaScrappy
>>
>>Why unit test it when you can scrap it? ;)
>>


Thank you Rhett. I just love this little plugin. I missed this feature
compared to VAJ.
Then I installed BeanShell plugin but this was too much. I needed just
IdeaScrappy.
Even the name is kinda yummy....

I can't wait for improvements. Do you think it's possible to highlight Java
code the same way as in
code window? or use other Idea features like completion?


0

Very sweet. I've never used an IDE with a scrapbook before, but it seems very handy indeed. I'm sure you've already considered lots of possible enhancements,most of which probably boil down to "make Scrappy frames work like IDEA editor frames". One thing I would like to see, though, is support for something like the Java import statement. It's pretty clunky to write

com.mycompany.myClass foo = new com.mycompany.myClass();

when what you would really want is

import com.mycompany.*;
myClass foo = new myClass();

A very cool plugin.

--Dave

0

http://byteCrafters.com/Scrappy.jar

Eugene

"Marius Scurtescu" <mscurtescu@healthmetrx.com> wrote in message
news:3E67B3D8.9070504@healthmetrx.com...

Where did you download this plugin from?

>

I cannot find any download links on the plugin page
mentioned below.

>

Marius

>
>

Michal Szklanowski wrote:

U?ytkownik "Rhett Guthrie" <rhett@bytecrafters.com> napisa? w wiadomo?ci
news:2895689.1046495041101.JavaMail.javamailuser@localhost...

>
>>Scrappy is a scrapbook environment like we used to have in Smalltalk and
>

VisualAge/Java environments.

>
>>http://www.intellij.org/twiki/bin/view/Main/IdeaScrappy
>>
>>Why unit test it when you can scrap it? ;)
>>
>
>

Thank you Rhett. I just love this little plugin. I missed this feature
compared to VAJ.
Then I installed BeanShell plugin but this was too much. I needed just
IdeaScrappy.
Even the name is kinda yummy....

>

I can't wait for improvements. Do you think it's possible to highlight

Java

code the same way as in
code window? or use other Idea features like completion?

>
>

>


0

It probably reflects more on my state of mind than your choice of plugin name, but when I first glanced at this plugin's name I misread the capitalization...and I know Idea is definitely not crappy!

Very handy plugin, BTW.

0

Rhett Guthrie wrote:

VisualAge/Java environments.
http://www.intellij.org/twiki/bin/view/Main/IdeaScrappy


I love it - it's one of the (few) features of VisualAge that I actually
liked ;)
But - it doesn't work under Linux: for some reason I don't get a popup menu.
Under Windows it works fine...

CU,
Edwin

0

Rhett Guthrie wrote:

Scrappy is a scrapbook environment like we used to have in Smalltalk and VisualAge/Java environments.

http://www.intellij.org/twiki/bin/view/Main/IdeaScrappy

Why unit test it when you can scrap it? ;)

Enjoy!

-rg


Which classpath does it have? Can i access classes i have written
in the current project?

Stefan

0

Very nice! I've been waiting some time for a really cool plugin to show up and here we go!

A question: If I do
java.awt.Frame f = new java.awt.Frame();
f.setSize(200,200);
f.show();

it gives me a new little window, but then I don't have any handle to it. I guess the Frame isn't GCd, because some way the jre has a handle to it. Is it possible to get a new handle to the Frame or could Scrappy have a feature where it saves objects for later use?

Bye,
Dag.

0

Hello,

I tried it on Solaris, and it didn't work either.
It is a very nice feature, and I would like to try it, if only it can work on multi-platforms :(

Best Regards,
MH

0

Hey, glad you like Scrappy. I would love to tie into Idea's code-completion and syntax highlighting features for the Idea plugin version of Scrappy (IdeaScrappy). However, I have not seen an Idea API for doing this. Does anyone on this list know how to do this? I tinkered with the Idea Editor and Document classes but did not get very far in the limited time I had, that's why I just used a basic JTextArea.

There has to be an open source Java syntax highlighting Swing component out there. Anyone know of one?

-rg

0

Yes, you are right. I need to do something about the import awkwardness. I was thinking that at the top of the Scrappy pane there would be a label and a text area:
_______________________
imports: |_______________________|

where you type in a list like:

com.mycompany;java.io;java.util

and that these imports would apply to all tabs. It is more flexible for each tab to have it's own imports, but I wonder how often people would need that flexibility. I bet it is more common that people would want one set of imports for the whole project.

I have also thought about putting check boxes for the common packages, java.io, java.util, javax.ejb, javax.swing, but am not sure how well that would work.

Thoughts?

-rg

0

Sorry about that. I am using plain vanilla swing components, so I do not know why it doesn't work for you or for the gentleman using Solaris.

Consider using the hotkeys instead. After a while you would probably do it this way anyhow. CtrlD will DoIt, CtrlI will InspectIt, Ctrl+P will PrintIt.

Hope that works.

-rg

0

Yes, just make sure to fully-qualify your classes. Also, you have to manually make your projects before you can access the latest version of the classes. I would like to hook into the IDE to get it to make the project automatically. Maybe some day.

-rg

0

I do not understand what you mean by 'handle'. Please clarify your question.

You can, of course, execute that code with an InspectIt and then you can inspect the frame. Just make sure your code ends in an expression that evaluates to your frame. For example:

java.awt.Frame f = new java.awt.Frame();
f.setSize(200,200);
f.show();
f

Adding 'f' as the last line will allow you to print it or inspect it.

Regarding saving objects. That is a neat feature. I had not thought about that. Question though, how would you use this feature?

-rg

0

After I've executed my piece of code, I got a new window, but there is no way IFAIK to get rid of it! Why? Because I don't have any reference ("handle") to it anymore! 'f' is not known anymore.

Maybe there's a proprietary sun.awt.xxxx-method to get a list of active frames...? But a list of saved objects would also help!

Bye,
Dag.

0

Dag Welinder wrote:

Maybe there's a proprietary sun.awt.xxxx-method to get a list of
active frames...?


There's even a non-proprietary one: Frame.getFrames().

0


Sounds like overkill, compared to just supporting import statements. It looks like you're munging the scrapped text into some anonymous class which you then compile using Pizza, load with a custom loader and execute. Stripping out import statements and putting them at the top of your munged class sounds cheap and easy. Your suggestion is slightly more powerful, but loses for intuitiveness compared to import statements. "Standard is better than better", after all.

0

(Running IDEA #696 on linux)

I tried using the keyboard-shortcuts, (because I don't get a popup menu - no
biggie), but I still have problems:

This is the result of Ctrl-D :

System.out.println("hi!");
/*
COMPILE FAILED:
scrap line 0: cannot access class IScrap; file
bytecrafters/scrappy/IScrap.class not found
scrap line 0: cannot access class ScrapResult; file
bytecrafters/scrappy/ScrapResult.class not found
2 errors
*/

Is there any way I can squeeze more (debug)info out of the plugin?

CU,
Edwin

0

I think the version of IDEA is the problem here. One user was on a beta of 3.0 and was getting this very problem. Once he upgraded to a production version it went away.

Scrappy writes some info to the IDEA system log so you might check there. But this is definitely a classpath problem - I really think your version of IDEA does not handle classpaths the same way the version I built Scrappy on does.

-rg

0

Also, I do not know where System.out.println() goes. Instead of running DoIt on a System.out.println() run a PrintIt on the expression you want to print. E.g., type "hi!", select it, and Ctrl+P.

I know, that is not very obvious. I may try to do some trickery to get redirect System.Out to a popup window if someone writes to it...


-rg

0

Rhett Guthrie wrote:

I think the version of IDEA is the problem here. One user was on a beta of
3.0 and was getting this very problem. Once he upgraded to a production


Build #696 is the current production version of the IDEA 3.0.x series, so I
don't think that's the problem. Could there be some subtle
platform-dependency problem in the way you build up the classpath?

Scrappy writes some info to the IDEA system log so you might check there.


Well, there's lots there, but nothing that I can relate to Scrappy.

Also, I do not know where System.out.println() goes. Instead of running


ah, ok, so my sample code was ill-chosen, anyway. 8-)
fwiw, I get the same behaviour with this:

java.util.Date date = new java.util.Date();
/*
COMPILE FAILED:
scrap line 0: cannot access class IScrap; file
bytecrafters/scrappy/IScrap.class not found
scrap line 0: cannot access class ScrapResult; file
bytecrafters/scrappy/ScrapResult.class not found
2 errors
*/

I know, that is not very obvious. I may try to do some trickery to get
redirect System.Out to a popup window if someone writes to it...


Why not just dump it in the panel itself, like you do with the errors? I
think this is the way VAJ used to work - seemed quite sensible.

If there's anything else I can do to help debug, please let me know - this
is a very useful plugin...

CU,
Edwin

0

Rhett,
I thought I saw somewhere idea to assume everything being selected if
nothing is selected for
CtrlD, CtrlI or CtrlP. Since I don't see it anywhere now, I'd like to put
some emphasis on this
feature that IMHO could speed up the usage and improve user's experience.

r.

"Rhett Guthrie" <rhett@bytecrafters.com> wrote in message
news:2895689.1046495041101.JavaMail.javamailuser@localhost...

Scrappy is a scrapbook environment like we used to have in Smalltalk and

VisualAge/Java environments.
>

http://www.intellij.org/twiki/bin/view/Main/IdeaScrappy

>

Why unit test it when you can scrap it? ;)

>

Enjoy!

>

-rg

>


0

Please sign in to leave a comment.