Difference between revisions of "Scripting: API Changes"

From Freeplane - free mind mapping and knowledge management software
m (Text replacement - "freeplane.sourceforge.net" to "www.freeplane.org")
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
The [[Scripting_API|Scripting API]], which is defined by the [http://freeplane.sourceforge.net/doc/api/org/freeplane/plugin/script/proxy/Proxy.html org.freeplane.plugin.script.proxy.Proxy] interface and is [http://freeplane.sourceforge.net/doc/api/ 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 [[Scripting:_Freeplane_Utility_Classes|utility classes]].
+
The [[Scripting_API|Scripting API]], which is defined by the [http://www.freeplane.org/doc/api/org/freeplane/plugin/script/proxy/Proxy.html org.freeplane.plugin.script.proxy.Proxy] interface and is [http://www.freeplane.org/doc/api/ 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 [[Scripting:_Freeplane_Utility_Classes|utility classes]].
  
Changes to the API are indicated per method by version numbers in the [http://freeplane.sourceforge.net/doc/api/org/freeplane/plugin/script/proxy/Proxy.html JavaDoc of the Proxy class].
+
Changes to the API are indicated per method by version numbers in the [http://www.freeplane.org/doc/api/org/freeplane/plugin/script/proxy/Proxy.html JavaDoc of the Proxy class].
  
 
Here a possibly incomplete list of changes from 1.3 to 1.5:
 
Here a possibly incomplete list of changes from 1.3 to 1.5:
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

Latest revision as of 19:24, 18 November 2018

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()