[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jedit-devel
Subject:    Re: [ jEdit-devel ] EditBus messages, folding, and perspectives
From:       "Alan Ezust" <alan.ezust () gmail ! com>
Date:       2007-06-28 3:13:19
Message-ID: f377591c0706272013x3de65de5r60525cc6728c49d2 () mail ! gmail ! com
[Download RAW message or body]

On 6/27/07, Shlomy Reinstein <sreinst1@gmail.com> wrote:
>
>
> > The way I discover what an EditBus message does is by checking the API
> docs.
> >
> > http://www.jedit.org/api/org/gjt/sp/jedit/EBMessage.html
> >
> > The EBMessage has a number of derived classes, and you can see them
> > all from the API docs under "Direct Known Subclasses". Then you can
> > click on one and see its docs and when it is being used. If there are
> > any API docs that are not clear, I'd be happy to update them.
> >
> > If we were to create another document that explained what EBMessages
> > were and when they were thrown, I'd think it should be partially
> > generated from what is in the API docs.
> >
>
> It's these API docs whose link you pasted here that are unclear. For
> example, EditPaneUpdate.BUFFER_CHANGED - what does this exactly mean? Does
> it mean that the contents of the buffer changed?

You can determine when a buffer becomes dirty by listening to
BufferUpdate messages.

Or maybe a marker was
> added?

BufferUpdate.MARKERS_CHANGED is for markers added.

> Or the folding was changed?

I don't see that anywhere. I'm not sure if it should be an EditPane or
a TextArea message, but it's not in either right now.


> Or maybe the buffer that's currently in
> the EditPane has been replaced by another?

Yes, that's it.


>  I think the description for each
> type of message should make clear which events cause this message to be
> sent.

I think for the most part, they are, but I clarified that one.

> And by extending the plugin development guide with these messages, I meant
> that several common scenarios would be explained in regard to messages. E.g.
> when the user clicks File->Open and selects a file, which messages are sent
> (in which order),

I think someone oughta write a plugin that just prints out each
EBMessage and what it is, to some file, so we can observe it
ourselves.


> or when the user switches between buffers using the buffer
> selector, buffer tabs or some other means, which messages exactly are sent.

When the EditPane changes buffers, we should see an EditPaneUpdate
message, of type BufferChanging. That's a relatively recent addition
to the jEdit API so the older plugins do not throw it. They should
though.

> I don't think such a document can be generated from the API docs.

True enough. There is an "editbus" section in the plugin development
pages which is rather minimalistic. Nothing in it is wrong, and there
are some good pointers to the API docs, but I suppose some scenarios
could be explained there.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
-- 
-----------------------------------------------
jEdit Developers' List
jEdit-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic