classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view


Dimitry Polivaev
This mail is a copy of my post

I am going to implement clones in Freeplane.
I think how to do it as easy as possible.
Node with multiple parents should appear an different places with its complete subtree multiple times in the map.

We can keep existing NodeModel and just replace one single parent by collection of parents.
It should not implement TreeNode and MutableTreeNode any more.
Method getParentNode shall be declared obsolete. It should always return the first parent but it should not be used any more.

Folding should be saved in relation for each parent separately.
However if a node has only one parent node but it belongs to a cloned subtree the node folding state is shared between all subtrees.

All parents can be saved in node hook format to keep basic format compatibility with FreeMind.
However unlike FreeMind clones should not be saved in a redundant way.
Whenever a map is serialized each node with its children is completely saved when its first occurrence is found.
All following occurrences are saved in format <node ID="ID_12345" TEXT="Clone" FOLDED="true"/> without any additional elements or attributes.

So maps with clones should be properly displayed only by Freeplane.