Interface ScriptFunctionDocProvider

All Known Implementing Classes:
PropertiesFileDocProvider

public interface ScriptFunctionDocProvider
Entrypoint to the autocomplete system for scripting functions.

As scripting functions are added (e.g. via addScriptModule or addStaticFields), the doc provider will be asked to provide a CompletionDescriptor describing the element.

Example implementation that provides documentation from a custom source:

 public class MyDocProvider implements ScriptFunctionDocProvider {
     public CompletionDescriptor.Method getMethodDescriptor(String path, Method m) {
         String desc = myBundle.getString(m.getName() + ".desc");
         return new CompletionDescriptor.Method(m.getName(), path, desc, ...);
     }
     // ... other methods
 }
 
See Also:
  • Field Details

  • Method Details

    • getMethodDescriptor

      @Nullable com.inductiveautomation.ignition.common.script.typing.CompletionDescriptor.Method getMethodDescriptor(String path, Method m)
      Parameters:
      path - The path this function is being added at, as given to the ScriptManager.
      m - The Method being added as a scripting function.
      Returns:
      A descriptor for the method.
      See Also:
      • CompletionDescriptor.Method
      • TypeDescriptor
    • getFieldDescriptor

      @Nullable com.inductiveautomation.ignition.common.script.typing.CompletionDescriptor.Attribute getFieldDescriptor(String path, Field f)
      Parameters:
      path - The path this field is being added at, as given to the ScriptManager.
      f - The Field being added as a scripting field.
      Returns:
      A descriptor for the field.
      See Also:
      • CompletionDescriptor.Attribute
      • TypeDescriptor