|
From: celeriac t. l. <if...@ya...> - 2002-02-28 21:02:52
|
mike dillon wrote:
> buffers = jEdit.getBuffers(); // Or however else you get a list
>
> for (int i = 0; i < buffers.length; i++)
> {
> buffers[i].setDirty(true);
> }
totally sweet.
just had to change it to actually -declare- buffers and it worked just
fine:
Buffer[] buffers = jEdit.getBuffers();
for (int i = 0; i < buffers.length; i++)
{
buffers[i].setDirty(true);
}
you did the smart thing and forced me to actually look at the jEdit
javadoc for getBuffers(). i didn't know what i was looking for before
myself. teach a man to fish.
i find this incredibly useful. mind if i stick this macro up on
community.jedit.org and give you most all of the credit? or would you
want to do so yourself? it might seem like a trivial macro to you. but
to me some of the simplest macros (like Go_To_Text_Area.bsh) are the
most useful.
btw, i should have said -javastyle- before and not jstyle. i should at
least get the name right if i'm going to praise it.
regards,
chris calloway
|