> sweet! just started trying these changes out, and
> they look like a great step in the right direction! i
> hope to see support integrated into JCompiler and the
> File System Browser, among other things.
JCompiler is first on my list. ;)
File System Browser?!? I dunno. It's in the core. The core should not depend
on any plugin, and Sessions is not a candidate for the core.
> i'm an IBM employee,and i've created a relatively
> simple plugin for our internal version control system,
> CMVC. i would like to incorporate the new sessions
> support into it when i get a chance. where can i find
> out how to
> 1) set up session option panes,
> 2) listen for session change events, and
> 3) access the "basedir" and "mode" properties?
> should i just look at the source code?
Yes, please. Sorry I didn't find the time to write decent doc-booked
documentation, but some of the key methods are javadoc-ed.
Ad 1): Look at how the Sessions plugin itself registers its own option pane
in SessionsPlugin.java: the method handleMessage() listens for
Your own option pane must be derived from SessionPropertyPane. You get the
current Session instance from the constructor. Use Session.get/setProperty()
to set your own property, just as you would do in an jEdit option pane. There
are some convenience methods for int,long,float,double properties, and I'll
add some for Colors and Fonts later.
Ad 2): Register yourself on EditBus and listen for either
SessionPropertyChanged/SessionPropertyRemoved messages (these are sent for every single
property that is added/changed/removed) or for SessionPropertiesChanged messages
(this one is sent after the session option dialog has been applied).
Ad 3): Use
Hope this helps,
GMX - Die Kommunikationsplattform im Internet.