Class DesignerHook
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.model.AbstractDesignerModuleHook
-
- com.inductiveautomation.perspective.designer.DesignerHook
-
- All Implemented Interfaces:
DesignerModuleHook
,PerspectiveDesignerInterface
public class DesignerHook extends AbstractDesignerModuleHook implements PerspectiveDesignerInterface
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CLEAR_CACHE_ON_PANEL_LOAD
static VectorIcons
ICONS
static java.lang.String
IN_MEMORY_CACHE
static java.lang.String
LIGHTWEIGHT_MODE
static java.lang.String
LOG_BROWSER_TO_DISK
-
Constructor Summary
Constructors Constructor Description DesignerHook()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DesignerHook
get(DesignerContext context)
DesignerActionRegistryImpl
getActionRegistry()
DesignerBindingRegistryImpl
getBindingRegistry()
static java.lang.String
getBrowserFailedMessage()
java.lang.String
getCombinedStyles()
ComponentDesignDelegateRegistry
getComponentDesignDelegateRegistry()
DesignerComponentRegistry
getDesignerComponentRegistry()
MenuBarMerge
getModuleMenu()
Returns a menu merge for any global menu additions.PerspectiveNavNode
getNavNode()
java.lang.String
getResourceCategoryKey(ProjectResourceId id)
Used by modules that add project resources to an Ignition project.java.lang.String
getResourceDisplayName(ProjectResourceId id)
Allows a module to give an appropriate display name for the resource.SessionEventDialog
getSessionEventDialog()
ViewWorkspace
getWorkspace()
void
notifyProjectSaveDone()
Notifies the module that the save operation has finished.void
notifyProjectSaveStart(SaveContext save)
Notifies the module that the user has requested that the project is saved.void
shutdown()
Called when the module is shut down.void
startup(DesignerContext context, LicenseState activationState)
The main entrypoint for the module hook.-
Methods inherited from class com.inductiveautomation.ignition.designer.model.AbstractDesignerModuleHook
configureDeserializer, configureFunctionFactory, configureSerializer, createPermissionKeys, getFrames, getModuleToolbars, getResourceIcon, initializeScriptManager, notifyActivationStateChanged
-
-
-
-
Field Detail
-
ICONS
public static final VectorIcons ICONS
-
LIGHTWEIGHT_MODE
public static final java.lang.String LIGHTWEIGHT_MODE
- See Also:
- Constant Field Values
-
IN_MEMORY_CACHE
public static final java.lang.String IN_MEMORY_CACHE
- See Also:
- Constant Field Values
-
CLEAR_CACHE_ON_PANEL_LOAD
public static final java.lang.String CLEAR_CACHE_ON_PANEL_LOAD
- See Also:
- Constant Field Values
-
LOG_BROWSER_TO_DISK
public static final java.lang.String LOG_BROWSER_TO_DISK
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
public static DesignerHook get(DesignerContext context)
-
getComponentDesignDelegateRegistry
public ComponentDesignDelegateRegistry getComponentDesignDelegateRegistry()
- Specified by:
getComponentDesignDelegateRegistry
in interfacePerspectiveDesignerInterface
-
getBindingRegistry
public DesignerBindingRegistryImpl getBindingRegistry()
- Specified by:
getBindingRegistry
in interfacePerspectiveDesignerInterface
-
getActionRegistry
public DesignerActionRegistryImpl getActionRegistry()
- Specified by:
getActionRegistry
in interfacePerspectiveDesignerInterface
-
getDesignerComponentRegistry
public DesignerComponentRegistry getDesignerComponentRegistry()
- Specified by:
getDesignerComponentRegistry
in interfacePerspectiveDesignerInterface
-
startup
public void startup(DesignerContext context, LicenseState activationState)
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
-
getWorkspace
public ViewWorkspace getWorkspace()
-
getNavNode
public PerspectiveNavNode getNavNode()
-
getSessionEventDialog
public SessionEventDialog getSessionEventDialog()
-
getResourceCategoryKey
public java.lang.String getResourceCategoryKey(ProjectResourceId id)
Description copied from interface:DesignerModuleHook
Used by modules that add project resources to an Ignition project. This will be called when the exporter is displaying all of the resources inside a project for export. Only project resources that match this module's ID will passed to this function.
Used by the import/export system.
- Specified by:
getResourceCategoryKey
in interfaceDesignerModuleHook
- Overrides:
getResourceCategoryKey
in classAbstractDesignerModuleHook
- Parameters:
id
- A project resource that was added by this module.- Returns:
- A bundle resource key for the category of this resource.
-
getResourceDisplayName
public java.lang.String getResourceDisplayName(ProjectResourceId id)
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.
Used by the import/export system.
- Specified by:
getResourceDisplayName
in interfaceDesignerModuleHook
- Overrides:
getResourceDisplayName
in classAbstractDesignerModuleHook
- Returns:
- the name for a resource, or null to use the resource's folder path/name.
-
getModuleMenu
public MenuBarMerge 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:
JMenuMerge
-
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
public void notifyProjectSaveStart(SaveContext save)
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
-
getCombinedStyles
public java.lang.String getCombinedStyles()
-
getBrowserFailedMessage
public static java.lang.String getBrowserFailedMessage()
-
-