Plugin development

  • Christian Foltin

    Hi Roo,

    you are somewhat right, but the problem is, that you can call methods not suitable to be called directly.

    The rule is the following:

    Plugins may *only* call methods provided by the interface "MindMapActions". They are implemented in the ControllerAdapter. So, in your case (adding a new child), take the command:

        /** Another variant of addNew. If the index of the new node as a child of parent is known,
         * this method is easier to use. Moreover, it does not automatically start an editor.
         * @param newNodeIsLeft here, normally parent.isLeft() or null is used.
         * @return returns the new node. */
        MindMapNode addNewNode(MindMapNode parent, int index, freemind.main.Tools.BooleanHolder newNodeIsLeft);

    An example is provided in "".

    What do you plan to do exactly?

    Have fun, Chris

    • Roo Reynolds

      Roo Reynolds - 2004-11-17

      Hi Chris

      Ahh. Thanks for your help. That's a lot better!

      I'm not entirely sure what I want my first plugin to do yet. I see a lot of power here, and I'm currently just trying out the interfaces and seeing what's possible.

      One thing I've noticed is that folded nodes can't be added to. Let's say I have a plugin that adds a new child node to the plugin-hooked node every second. This works fine, until I fold the tree anywhere above the hooked node. Now getController().addNewNode(), with an argument of a folded node, returns null. I think I could programatically unfold the nodes I need to, but it would be nice if Freemind allowed a plugin to manipulate and add children to folded nodes.

      Or am I simply doing something wrong?

      Many thanks

    • Hugh Cowan

      Hugh Cowan - 2004-11-26

      Hi Chris,

      Is there any place that one can get more information about how to create plug-ins?  Is there a scripting language for plugins, or are they written in Java?



    • Christian Foltin

      Hi Hugh,

      sorry, you have to look into the code to get more information.  But, there are a lot of examples there, which demonstrate the most common actions.
      Do you have a plan, what to implement?



Log in to post a comment.