Scripting: API Changes

From Freeplane - free mind mapping and knowledge management software
Revision as of 23:00, 11 May 2016 by Boercher (talk | contribs)

The Scripting API, which is defined by the org.freeplane.plugin.script.proxy.Proxy interface and is documented as JavaDoc, will evolve over time but Freeplane's developers will do whatever possible to keep new API versions downward compatible. On the other hand there might be changes in parts of the Freeplane code that are not part of the official API but on which some scripts might depend nevertheless. This mostly applies to the utility classes.

Changes to the API are indicated per method by version numbers in the JavaDoc of the Proxy class.

Here a list of changes from 1.3 to 1.5:

  • node.attributes.containsKey(String)
  • node.attributes.optimizeWidths()
  • c.select(Collection<Node>)
  • c.getOpenMaps()
  • node.icons.addAll(Collection<String>)
  • node.icons.addAll(otherNode.icons)
  • node.link.remove()
  • node.sortChildrenBy{ Closure }
  • support units like mm, cm, pt for lengths and dimensions

Clones

  • c.pasteAsClone()
  • node.appendAsCloneWithSubtree(NodeRO toBeCloned)
  • node.appendAsCloneWithoutSubtree(NodeRO toBeCloned)
  • node.getCountNodesSharingContent()
  • node.getCountNodesSharingContentAndSubtree()
  • node.getNodesSharingContent()
  • node.getNodesSharingContentAndSubtree()