Class SFCDesignerHook
java.lang.Object
com.inductiveautomation.ignition.designer.model.AbstractDesignerModuleHook
com.inductiveautomation.sfc.designer.SFCDesignerHook
- All Implemented Interfaces:
Locatable
,LocationRenderingUpdater
,DesignerModuleHook
,ClientStepRegistryProvider
,StepConfigRegistry
public class SFCDesignerHook
extends AbstractDesignerModuleHook
implements ClientStepRegistryProvider, StepConfigRegistry, Locatable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.inductiveautomation.ignition.common.script.typing.TypeDescriptor
static final Icon
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAllows a module to create one or more id-bundlekey pairs that the module will use for role-based client security.static SFCDesignerHook
get
(DesignerContext context) getConfigFactory
(String factoryId) Return an appropriate icon to display for this module.Returns a menu merge for any global menu additions.getResourceCategoryKey
(ResourcePath resource) Used by modules that add project resources to an Ignition project.getResourceDisplayName
(ResourcePath resourcePath) Allows a module to give an appropriate display name for the resource.getResourceIcon
(ResourcePath resourcePath) Allows a module to give an appropriate icon for a resource.void
initializeScriptManager
(ScriptManager manager) Initialize a newly-instantiated script manager.boolean
isSaving()
void
void
Notifies the module that the save operation has finished.void
Notifies the module that the user has requested that the project is saved.void
register
(String stepFactoryId, StepConfigFactory factory) void
shutdown()
Called when the module is shut down.void
startup
(DesignerContext context, LicenseState activationState) The main entrypoint for the module hook.void
updateLocationRenderer
(LocationRenderingInfo builder, Location location) Provides an opportunity for a module to enrich tag reference locations with extra context.Methods inherited from class com.inductiveautomation.ignition.designer.model.AbstractDesignerModuleHook
configureDeserializer, configureFunctionFactory, configureSerializer, getFrames, getModuleToolbars, getResourceCategoryKey, getResourceDisplayName, getResourceIcon, notifyActivationStateChanged
-
Field Details
-
CHART_SCOPE_DESCRIPTOR
public static final com.inductiveautomation.ignition.common.script.typing.TypeDescriptor CHART_SCOPE_DESCRIPTOR -
TREE_ICON
-
-
Constructor Details
-
SFCDesignerHook
public SFCDesignerHook()
-
-
Method Details
-
get
-
getWorkspace
-
register
- Specified by:
register
in interfaceStepConfigRegistry
-
getConfigFactory
-
startup
Description copied from interface:DesignerModuleHook
The main entrypoint for the module hook. This will only be called once for a given project. If another project is ever opened,DesignerModuleHook.shutdown()
will be called and a new hook will be instantiated- Specified by:
startup
in interfaceDesignerModuleHook
- Overrides:
startup
in classAbstractDesignerModuleHook
- Throws:
Exception
- if the module was not able to be initialized for the given project.
-
shutdown
public void shutdown()Description copied from interface:DesignerModuleHook
Called when the module is shut down. This will happen if the user opens a different project within the same designer session - the existing modules will be shut down, and new module hooks will be instantiated and started up.- Specified by:
shutdown
in interfaceDesignerModuleHook
- Overrides:
shutdown
in classAbstractDesignerModuleHook
-
notifyProjectSaveStart
Description copied from interface:DesignerModuleHook
Notifies the module that the user has requested that the project is saved. The module must check-in any checked-out resources that it is holding.- Specified by:
notifyProjectSaveStart
in interfaceDesignerModuleHook
- Overrides:
notifyProjectSaveStart
in classAbstractDesignerModuleHook
-
notifyProjectSaveDone
public void notifyProjectSaveDone()Description copied from interface:DesignerModuleHook
Notifies the module that the save operation has finished. This is the cue to check-out any previously checked-out resources that it was forced to check-in before the save.- Specified by:
notifyProjectSaveDone
in interfaceDesignerModuleHook
- Overrides:
notifyProjectSaveDone
in classAbstractDesignerModuleHook
-
isSaving
public boolean isSaving() -
getModuleMenu
Description copied from interface:DesignerModuleHook
Returns a menu merge for any global menu additions. May be null.- Specified by:
getModuleMenu
in interfaceDesignerModuleHook
- Overrides:
getModuleMenu
in classAbstractDesignerModuleHook
- See Also:
-
getStepRegistry
- Specified by:
getStepRegistry
in interfaceClientStepRegistryProvider
-
initializeScriptManager
Description copied from interface:DesignerModuleHook
Initialize a newly-instantiated script manager. This will be called exactly once for any given ScriptManager instance. Usually this will involve callingScriptManager.addScriptModule(String, Object)
, which reflectively loads the public (instance and static) java functions from the given object into the scripting environment, at the provided path.- Specified by:
initializeScriptManager
in interfaceDesignerModuleHook
- Overrides:
initializeScriptManager
in classAbstractDesignerModuleHook
-
getResourceCategoryKey
Description copied from interface:DesignerModuleHook
Used by modules that add project resources to an Ignition project. This will be called when the platform needs to render your resource type in first-party UI. Only project resources that match this module's ID will passed to this function.
- Specified by:
getResourceCategoryKey
in interfaceDesignerModuleHook
- Parameters:
resource
- A resource path within this module's resources.- Returns:
- A bundle resource key for the category of this resource.
-
getResourceDisplayName
Description copied from interface:DesignerModuleHook
Allows a module to give an appropriate display name for the resource. For most resources this won't be necessary (the resource's name itself should be used), but for some resources whose name is null, this may be appropriate.
- Specified by:
getResourceDisplayName
in interfaceDesignerModuleHook
- Returns:
- the name for a resource, or null to use the resource's folder path/name.
-
getModuleIcon
Description copied from interface:DesignerModuleHook
Return an appropriate icon to display for this module. Ideally, anInteractiveIcon
of some kind.- Specified by:
getModuleIcon
in interfaceDesignerModuleHook
- See Also:
-
getResourceIcon
Description copied from interface:DesignerModuleHook
Allows a module to give an appropriate icon for a resource.
- Specified by:
getResourceIcon
in interfaceDesignerModuleHook
- See Also:
-
createPermissionKeys
Description copied from interface:DesignerModuleHook
Allows a module to create one or more id-bundlekey pairs that the module will use for role-based client security.- Specified by:
createPermissionKeys
in interfaceDesignerModuleHook
- Overrides:
createPermissionKeys
in classAbstractDesignerModuleHook
- Returns:
- Map of id-bundlekey entries. May be empty but not null.
-
updateLocationRenderer
public void updateLocationRenderer(@Nonnull LocationRenderingInfo builder, @Nonnull Location location) Description copied from interface:DesignerModuleHook
Provides an opportunity for a module to enrich tag reference locations with extra context. Thelocation
provided is guaranteed to reside within your module. Call methods onLocationRenderingInfo
to enrich the rendering.- Specified by:
updateLocationRenderer
in interfaceDesignerModuleHook
- Specified by:
updateLocationRenderer
in interfaceLocationRenderingUpdater
- See Also:
-
locate
-