Class ExtensionCodeEditor.FunctionHeaderBuilder
java.lang.Object
com.inductiveautomation.ignition.designer.scripteditor.component.ExtensionCodeEditor.FunctionHeaderBuilder
- Enclosing class:
- ExtensionCodeEditor
Helper class to build nicely formatted extension-function style def lines and docstring comments
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddSelf()
Call this if you need a "self" argumentAdds an argument.argFromSchema
(String argName, JsonSchema schema) Adds an argument.build()
Builds the header and docstring with a default width of 80build
(int width) Builds the header and docstring.defaultImpl
(String defaultImpl) Call this to provide a default implementation for the functionGives the function a descriptionSets the function name
-
Constructor Details
-
FunctionHeaderBuilder
public FunctionHeaderBuilder()
-
-
Method Details
-
name
Sets the function name -
desc
Gives the function a description -
arg
Adds an argument. Arguments will be listed in the order added, with the exception of 'self' if included, which will always be first. -
argFromSchema
Adds an argument. Arguments will be listed in the order added, with the exception of 'self' if included, which will always be first. Extracts (recursively) information about the argument from the schema provided. -
defaultImpl
Call this to provide a default implementation for the function -
addSelf
Call this if you need a "self" argument -
build
Builds the header and docstring with a default width of 80 -
build
Builds the header and docstring.- Parameters:
width
- The width of the output
-