Difference between revisions of "Scripting: API Changes"

From Freeplane - free mind mapping and knowledge management software
Line 7: Line 7:
 
* node.attributes.containsKey(String)
 
* node.attributes.containsKey(String)
 
* node.attributes.optimizeWidths()
 
* node.attributes.optimizeWidths()
* c.select(Collection<Node>)
 
* c.getOpenMaps()
 
 
* node.icons.addAll(Collection<String>)
 
* node.icons.addAll(Collection<String>)
 
* node.icons.addAll(otherNode.icons)
 
* node.icons.addAll(otherNode.icons)
Line 14: Line 12:
 
* node.sortChildrenBy{ Closure }
 
* node.sortChildrenBy{ Closure }
 
* support units like mm, cm, pt for lengths and dimensions
 
* support units like mm, cm, pt for lengths and dimensions
 +
* c.select(Collection<Node>)
 +
* c.getOpenMaps()
 +
* textUtils.setClipboardContentsToHtml()
  
 
Clones
 
Clones

Revision as of 23:03, 11 May 2016

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 possibly incomplete list of changes from 1.3 to 1.5:

  • node.attributes.containsKey(String)
  • node.attributes.optimizeWidths()
  • 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
  • c.select(Collection<Node>)
  • c.getOpenMaps()
  • textUtils.setClipboardContentsToHtml()

Clones

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