Plugin development
From Freeplane - free mind mapping and knowledge management software
Create a new Plugin
A simple tool helps to get started with the development of plugins. It's an Ant Task named 'create-plugin' that is available from the freeplane_framework/ant directory. The task reads all required parameters from the command line. (If you want to do it non-interactively you have to create your own Ant task like this:
<target name="create-plugin-batch"> <create-plugin baseDir="." pluginname="helloworld" hasAction="true" extensionName="world" /> </target>
The following transcript shows input and output of a create-plugin invocation:
../1_0_x/freeplane_framework/ant $ ant create-plugin Buildfile: build.xml create-plugin: [create-plugin] => Please enter required plugin name: helloworld [create-plugin] => Optional: Does this plugin contribute to the GUI? (yes, no) yes [create-plugin] => Optional: name of a new extension to define (xml element like 'icon')? world [create-plugin] New plugin created in C:\devel\freeplane-bazaar-repo\1_0_x\freeplane_plugin_helloworld [create-plugin] What next? [create-plugin] * import plugin into Eclipse via Import... -> Existing Projects into Workspace [create-plugin] * add required external jars to C:\devel\freeplane-bazaar-repo\1_0_x\freeplane_plugin_helloworld\lib [create-plugin] * add required external jars and required Freeplane projects to classpath [create-plugin] * search for "TODO" in the project and fill the gaps [create-plugin] * add the following element to freeplane_framework/ant/build.xml: [create-plugin] <antcall target="makePlugin" inheritall="false"> [create-plugin] <param name="anttarget" value="dist"/> [create-plugin] <param name="targetdir" value="plugins"/> [create-plugin] <param name="plugindir" value="freeplane_plugin_helloworld"/> [create-plugin] <param name="pluginname" value="org.freeplane.plugin.helloworld"/> [create-plugin] </antcall>
Follow the suggestions in the printed message.