But note that these internal interfaces might change without further notice between two stable Freeplane versions (but probably not between minor versions). For most scripts this should not be necessary but especially add-on writers may need more than the scripting API. The existence of a comprehensive API doesn't prohibit access to internal interfaces. The same holds for tails which also has a HTML string value but it's tDetails(Object) and node.getDetails() returns a Convertible.node.note has a HTML string but tNote() accepts an Object and node.getNote() returns a Convertible for the plain text note.Other attributes are still String valued but their setters accept other Objects as well. Attribute values are not restricted to String (anymore).Better use the attribute node.object which is symmetric in getter and setter types. It's tText(Object) although node.getText() returns an String.Some attributes have been changed from type String to Object which avoids ugly conversions back and forth between Strings, Dates and Number: returns all values if there are no duplicated keys.node.text returns the raw text, ainText is the same as node.to.plain.If you need that use these methods/attributes instead: This will work even with Maps imported from a data type agnostic FreeMind.Ĭonvertible can get in your way sometimes if all what you want is the raw string (e.g. For instance node.to.date will return a date even if the node object is a String "" instead of a Date. ConvertibleĪ very important usability improvement, not only for formula writers, is the introduction of the class Convertible that is returned now by some methods/properties:Ī Convertible tries everything possible to convert an object to the requested target type. In formulas and Groovy scripts all methods and properties of the node variable are directly available so you can write children.size() instead of (). The following utility classes that also are listed in FreeplaneScriptBaseClass might be useful. It provides some methods you may find convenient. This Groovy class is the base class of all formulas and Groovy scripts. In addition to the wrapper layer there are two extensions: FreeplaneScriptBaseClass The interface is completely defined by the Proxy interface with its numerous subinterfaces. If you miss a special Freeplane feature in the API please create a change request in Mantis. It is meant to be upwards compatible and it grows with new Freeplane features. The Freeplane scripting API is an object oriented layer over the Freeplane internals. If the rendering is insufficient you may try to find and view the page on the docear_source.zip project site itself. You can here alternatively try to browse the pure source code or just view or download the uninterpreted raw source code. Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |