Mike Atkinson | 2 Sep 2003 02:10
Picon
Picon

Re: ProjectViewer - finding the current project and all projects.

Marcelo Vanzin wrote:

> Mike Atkinson wrote:
>
>> To do this I need to find out what projects are defined in
>> ProjectViewer and also what the current project is. After
>> finding the initial values they will need to be tracked.
>
>
>     You may want to take a look at these classes:
>
>     projectviewer.ProjectManager
>     projectviewer.ProjectViewer
>     projectviewer.event.ProjectViewer(Event,Listener)
>
>     The first holds info about what projects are available. The second 
> is the main view, and you use to register the listeners to listen for 
> ProjectViewerEvents. The events occur when projects are 
> loaded/unloaded in different jEdit views.
>
>     Read the available documentation (in the Javadocs) and send 
> messages if you have any doubts. Other plugins use the API, so you may 
> want to look at their code also.
>
>     On a side note, I'm almost finished implementing/testing a new API 
> for registering listeners / adding stuff to PV, based on jEdit 4.2's 
> API, which will make things much easier for people that want to 
> interact with PV. The best part is that it's going to be much easier 
> to add PV-based functions without adding a runtime dependency on PV. 
> You may start implementing your functions, and later use this to add 
> PV interaction. (The code is not yet in CVS, BTW.)
>
I've looked at those classes, but hoped there was some example code I 
could copy/modify.
I wish to use PV information, but not be dependent on it (as it is not 
in the core) so will have to
use reflection, which complicates things.

--
Mike Atkinson

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
--

-- 
-----------------------------------------------
jEdit Developers' List
jEdit-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jedit-devel


Gmane