From: Patrick Wright <jedit_devel@pd...> - 2004-05-10 12:23:23
JEdit 4.2pre12, Java 1.4.2_03, Win2K
I am working on a plugin to view 'subsets' of files one is working on,
based on certain criteria (e.g. all java files that import java.sql). I
would like to bind this list as a tree node in ProjectViewer, but am
having problems getting the binding to work.
Currently, I have a node that extends VPTNode, and am using a macro to
initialize it, then
get handle to PV dockable
get the root for the current project
call PV.insertNodeInto(myNode, root)
then a call to PV static method that nodes have changed (something like
nodeStructureChangedFlat(), sorry, don't have the code in front of me)
This causes odd display behavior--either the node does not show, display
with expansion toggle and no text, or else causes PV to hang when opened
in a doc--all nodes are displayed, grayed out, and not editable + graphic=
garbage all around until the doc is closed.
Note that this node itself is just a stub--it's not integrated with my ow=
plugin at this point.
Also, in the macro I get the list of children from root, and my node is
So, how do I bind new nodes dynamically to PV? The docs hint this is
Patrick Wright wrote:
> I am working on a plugin to view 'subsets' of files one is working on,
> based on certain criteria (e.g. all java files that import java.sql). I
> would like to bind this list as a tree node in ProjectViewer, but am
> having problems getting the binding to work.
Indeed PV has code that allows other plugins/macros to bind their own
nodes to PV. The only problem is that I've never tested this code
thoroughly, so I don't know if it works as it should or not. :-)
If you could send me your code I'll try to take a look at it and see
where the problem is. I haven't been able to work on PV lately, but I
think I can find some time later this week.
"Life is too short to drink cheap beer"