Class ExtensionCodeEditor.FunctionHeaderBuilder
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.scripteditor.component.ExtensionCodeEditor.FunctionHeaderBuilder
-
- Enclosing class:
- ExtensionCodeEditor
public static class ExtensionCodeEditor.FunctionHeaderBuilder extends java.lang.ObjectHelper class to build nicely formatted extension-function style def lines and docstring comments
-
-
Constructor Summary
Constructors Constructor Description FunctionHeaderBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtensionCodeEditor.FunctionHeaderBuilderaddSelf()Call this if you need a "self" argumentExtensionCodeEditor.FunctionHeaderBuilderarg(java.lang.String argName, java.lang.String argDescription)Adds an argument.java.lang.Stringbuild()Builds the header and docstring with a default width of 80java.lang.Stringbuild(int width)Builds the header and docstring.ExtensionCodeEditor.FunctionHeaderBuilderdefaultImpl(java.lang.String defaultImpl)Call this to provide a default implementation for the functionExtensionCodeEditor.FunctionHeaderBuilderdesc(java.lang.String desc)Gives the function a descriptionExtensionCodeEditor.FunctionHeaderBuildername(java.lang.String name)Sets the function name
-
-
-
Method Detail
-
name
public ExtensionCodeEditor.FunctionHeaderBuilder name(java.lang.String name)
Sets the function name
-
desc
public ExtensionCodeEditor.FunctionHeaderBuilder desc(java.lang.String desc)
Gives the function a description
-
arg
public ExtensionCodeEditor.FunctionHeaderBuilder arg(java.lang.String argName, java.lang.String argDescription)
Adds an argument. Arguments will be listed in the order added, with the exception of 'self' if included, which will always be first.
-
defaultImpl
public ExtensionCodeEditor.FunctionHeaderBuilder defaultImpl(java.lang.String defaultImpl)
Call this to provide a default implementation for the function
-
addSelf
public ExtensionCodeEditor.FunctionHeaderBuilder addSelf()
Call this if you need a "self" argument
-
build
public java.lang.String build()
Builds the header and docstring with a default width of 80
-
build
public java.lang.String build(int width)
Builds the header and docstring.- Parameters:
width- The width of the output
-
-