Class DesignerContextImpl
java.lang.Object
com.inductiveautomation.ignition.client.model.AbstractClientContext
com.inductiveautomation.ignition.designer.DesignerContextImpl
- All Implemented Interfaces:
ClientContext
,CommonContext
,DesignerContext
-
Nested Class Summary
Nested classes/interfaces inherited from class com.inductiveautomation.ignition.client.model.AbstractClientContext
AbstractClientContext.ClientContextResourceListener
-
Field Summary
Fields inherited from class com.inductiveautomation.ignition.client.model.AbstractClientContext
changeSupport, globalProps, log, loggingManager, project, projectDescription, projectTitle
Fields inherited from interface com.inductiveautomation.ignition.designer.model.DesignerContext
SCRIPT_MANAGER_PROPERTY
-
Constructor Summary
ConstructorsConstructorDescriptionDesignerContextImpl
(IgnitionDesigner designerGui, LaunchContext launchContext, DesignableProject project) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addBeanInfoSearchPath
(String packageName) Adds the given fully-qualified path name to the Introspector's BeanInfo search path.void
Adds the Legacy Script project node for pre-7.7 script modules that have been imported by the user.void
addPropertyEditor
(Class<? extends AbstractPropertyEditorPanel> pageClass) Adds a property editor page that will be incorporated into the Designer's project property editing system.boolean
Checks whether or not the current logged in user can edit the protection bits of project resources.Returns an instance of the XMLDeserializer that can be used to deserialize project resources.Creates a new XML serializer that has been configured by all installed modules for custom serialization delegatesdeserialize
(byte[] data, org.apache.log4j.Logger log) Convenience function to deserialize a gzipped byte array into a single object.void
editResourceDocs
(ProjectResource resource) Opens up the resource notes editor for the given project resourcesvoid
exportResources
(Collection<ResourcePath> resourceIds) Shows the project export window (after doing a commit) with the given resource IDs checked.void
Returns a PersistentProperties file that will be stored on a per-user basis for "persistent" but not project-encapsulated preferencescom.jidesoft.docking.DockingManager
Returns the JIDE DockingManager for the DesignerReturns the shared task execution manager for this clientgetFrame()
Returns the owning frame of the designer.getLicenseState
(String moduleId) Returns the license state for the given moduleprotected LoggerEx
Returns the hook class for another module, used for modules that deal with each other's models.getModuleIcon
(String moduleId) Retrieve the list of all modules currently loaded in this contextReturns the appropriate named query rpc for the context.Returns the OPCBrowserPanel that can be used to browse and import OPC itemsReturns the project that this client is running.Returns the root node of the project browser tree, so that modules may add their own nodes.Returns the DB query browser toolgetResourceCategoryKey
(ResourcePath resourcePath) Resource edit managergetResourceIcon
(ResourcePath path) Returns the RootPaneContainer that is currently the owner of the clientReturns the ScriptManager that can be used to execute Python scripts.Get the registered SearchProviders.The StatusBar at the bottom of the Designer can be used to display temporary messages and for adding always-present little components that appear in the bottom-rightcom.inductiveautomation.ignition.designer.tags.frame.TagBrowserFrame
Returns the TagBrowserPanel that can be used to select TagsReturns the TagEditorPanel that can be used to edit/add TagsReturns the manager that provides access to Ignition's tag system.com.jidesoft.action.DockableBarManager
Returns the JIDE dockable toolbar managerprotected ProjectResourceListener
Make a custom resource listener so we can update the script playground with any project script changesvoid
registerClientPermissions
(Map<String, String> bundleMap) Register id-bundlekey pairs to limit client permissionsvoid
registerResourceWorkspace
(ResourceWorkspace workspace) Registers a newResourceWorkspace
, which is a main editing area for the designer.void
registerSearchProvider
(SearchProvider provider) Registers a search provider that will be exposed through the find/replace system.protected void
protected void
protected void
void
shutdown()
Methods inherited from class com.inductiveautomation.ignition.client.model.AbstractClientContext
addPropertyChangeListener, addPropertyChangeListener, getAuthProfileName, getDefaultDatasourceName, getDefaultTagProviderName, getEdgeEditions, getEventBus, getExpressionFunctionFactory, getGlobalProps, getLaunchContext, getLoggingManager, getOrDefault, getProgressManager, getProjectDescription, getProjectName, getProjectTitle, getTagPollRate, getUIEventBus, initProject, installLegacyScriptLibrary, removePropertyChangeListener, removePropertyChangeListener, resetExpressionFunctionFactory, setGlobalProps, startup
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.inductiveautomation.ignition.client.model.ClientContext
addPropertyChangeListener, addPropertyChangeListener, getAuthProfileName, getDefaultDatasourceName, getDefaultTagProviderName, getLaunchContext, getProgressManager, getProjectName, getTagPollRate, getUIEventBus, removePropertyChangeListener, removePropertyChangeListener
Methods inherited from interface com.inductiveautomation.ignition.common.model.CommonContext
getEdgeEditions, getEventBus, getExpressionFunctionFactory, getLoggingManager
-
Constructor Details
-
DesignerContextImpl
public DesignerContextImpl(IgnitionDesigner designerGui, LaunchContext launchContext, DesignableProject project)
-
-
Method Details
-
getProject
Description copied from interface:ClientContext
Returns the project that this client is running. Note that this may be null before the client is fully logged in and started, because the context is created before the project is downloaded.- Specified by:
getProject
in interfaceClientContext
- Specified by:
getProject
in interfaceDesignerContext
-
getLocalizationManager
- Specified by:
getLocalizationManager
in interfaceClientContext
- Specified by:
getLocalizationManager
in interfaceDesignerContext
-
getNamedQueryManager
Description copied from interface:ClientContext
Returns the appropriate named query rpc for the context. In the gateway and client, we only want to use named queries that have been saved. In the designer, we want to use the current version so that reports and bindings can be seen and used for testing before the project is saved.- Specified by:
getNamedQueryManager
in interfaceClientContext
- Returns:
- The correct NamedQueryManager implementation for the scope.
-
getExecutionManager
Description copied from interface:ClientContext
Returns the shared task execution manager for this client- Specified by:
getExecutionManager
in interfaceClientContext
-
getModule
Description copied from interface:CommonContext
Returns the hook class for another module, used for modules that deal with each other's models. Example: The reporting plugin's designer hook uses this to get FactoryPMI's palette.- Specified by:
getModule
in interfaceCommonContext
- Specified by:
getModule
in interfaceDesignerContext
-
getModules
Description copied from interface:ClientContext
Retrieve the list of all modules currently loaded in this context- Specified by:
getModules
in interfaceClientContext
-
getLicenseState
Description copied from interface:CommonContext
Returns the license state for the given module- Specified by:
getLicenseState
in interfaceCommonContext
-
exportResources
Description copied from interface:DesignerContext
Shows the project export window (after doing a commit) with the given resource IDs checked.- Specified by:
exportResources
in interfaceDesignerContext
- Parameters:
resourceIds
- Collection of ProjectResourceIds. Not null, but may be empty.
-
createExpressionFunctionFactory
- Specified by:
createExpressionFunctionFactory
in classAbstractClientContext
-
fireScriptManagerInitialized
public void fireScriptManagerInitialized() -
getResourceCategoryKey
-
getResourceCategoryKey
-
getResourceDisplayName
-
getResourceDisplayName
-
getResourceIcon
-
getModuleIcon
-
registerResourceWorkspace
Description copied from interface:DesignerContext
Registers a newResourceWorkspace
, which is a main editing area for the designer. The workspace has menus and toolbars associated with it that become visible when the workspace is focused.- Specified by:
registerResourceWorkspace
in interfaceDesignerContext
- Parameters:
workspace
- TheResourceWorkspace
to register with the designer
-
getSearchProviders
Description copied from interface:DesignerContext
Get the registered SearchProviders.- Specified by:
getSearchProviders
in interfaceDesignerContext
- Returns:
- Not null.
-
getSearchProvider
- Specified by:
getSearchProvider
in interfaceDesignerContext
-
registerClientPermissions
Description copied from interface:DesignerContext
Register id-bundlekey pairs to limit client permissions- Specified by:
registerClientPermissions
in interfaceDesignerContext
- Parameters:
bundleMap
- Map of ids to bundlekeys. Not null.
-
getClientPermissionBundleKeys
- Specified by:
getClientPermissionBundleKeys
in interfaceDesignerContext
-
registerSearchProvider
Description copied from interface:DesignerContext
Registers a search provider that will be exposed through the find/replace system.- Specified by:
registerSearchProvider
in interfaceDesignerContext
-
getFrame
Description copied from interface:DesignerContext
Returns the owning frame of the designer. Handy for dialog parents- Specified by:
getFrame
in interfaceDesignerContext
-
getCutAction
- Specified by:
getCutAction
in interfaceDesignerContext
-
getCopyAction
- Specified by:
getCopyAction
in interfaceDesignerContext
-
getPasteAction
- Specified by:
getPasteAction
in interfaceDesignerContext
-
getDeleteAction
- Specified by:
getDeleteAction
in interfaceDesignerContext
-
getRenameAction
- Specified by:
getRenameAction
in interfaceDesignerContext
-
getTagManager
Description copied from interface:CommonContext
Returns the manager that provides access to Ignition's tag system.- Specified by:
getTagManager
in interfaceClientContext
- Specified by:
getTagManager
in interfaceCommonContext
-
addBeanInfoSearchPath
Description copied from interface:DesignerContext
Adds the given fully-qualified path name to the Introspector's BeanInfo search path. BeanInfos can be important for not only visual beans, but for controlling serialization.- Specified by:
addBeanInfoSearchPath
in interfaceDesignerContext
- Parameters:
packageName
- fully-qualified path name. Not null.
-
createSerializer
Description copied from interface:DesignerContext
Creates a new XML serializer that has been configured by all installed modules for custom serialization delegates- Specified by:
createSerializer
in interfaceDesignerContext
- Returns:
- Not null.
-
createDeserializer
Description copied from interface:CommonContext
Returns an instance of the XMLDeserializer that can be used to deserialize project resources. Note that this is the only safe way to obtain an instance of XMLDeserializer, because the context will pass the new deserializer around to all loaded modules, giving them a chance to initialize any custom deserialization deletes on it first.- Specified by:
createDeserializer
in interfaceCommonContext
-
getStatusBar
Description copied from interface:DesignerContext
The StatusBar at the bottom of the Designer can be used to display temporary messages and for adding always-present little components that appear in the bottom-right- Specified by:
getStatusBar
in interfaceDesignerContext
- Returns:
- Not null.
-
getResourceEditManager
Description copied from interface:DesignerContext
Resource edit manager- Specified by:
getResourceEditManager
in interfaceDesignerContext
-
shutdown
public void shutdown()- Overrides:
shutdown
in classAbstractClientContext
-
getRootPaneContainer
Description copied from interface:ClientContext
Returns the RootPaneContainer that is currently the owner of the client- Specified by:
getRootPaneContainer
in interfaceClientContext
-
getProjectBrowserRoot
Description copied from interface:DesignerContext
Returns the root node of the project browser tree, so that modules may add their own nodes.- Specified by:
getProjectBrowserRoot
in interfaceDesignerContext
- See Also:
-
deserialize
Description copied from interface:ClientContext
Convenience function to deserialize a gzipped byte array into a single object. If multiple objects are found, they will be discarded. Warnings are logged to the given logger. If data is null or empty, null is returned.- Specified by:
deserialize
in interfaceClientContext
- Throws:
SerializationException
-
addPropertyEditor
Description copied from interface:DesignerContext
Adds a property editor page that will be incorporated into the Designer's project property editing system. This class will be instantiated the first time that the property editor is displayed, and must have either a nullary constructor or a constructor that takes a DesignerContext.
The Property Editing framework is designed around the idea that modules will store properties in opaquely xml-serialized project resources which can be uniquely identified by their module ID and resource type. The property editing UI will handle the de/serialization and project syncing tasks so that the property editor pages can simply focus on UI.
- Specified by:
addPropertyEditor
in interfaceDesignerContext
-
getScriptManager
Description copied from interface:CommonContext
Returns the ScriptManager that can be used to execute Python scripts.- Specified by:
getScriptManager
in interfaceCommonContext
-
getDockingManager
@Nonnull public com.jidesoft.docking.DockingManager getDockingManager()Description copied from interface:DesignerContext
Returns the JIDE DockingManager for the Designer- Specified by:
getDockingManager
in interfaceDesignerContext
-
getToolbarManager
@Nonnull public com.jidesoft.action.DockableBarManager getToolbarManager()Description copied from interface:DesignerContext
Returns the JIDE dockable toolbar manager- Specified by:
getToolbarManager
in interfaceDesignerContext
-
getTagEditor
Description copied from interface:DesignerContext
Returns the TagEditorPanel that can be used to edit/add Tags- Specified by:
getTagEditor
in interfaceDesignerContext
-
getTagBrowser
@Nonnull public com.inductiveautomation.ignition.designer.tags.frame.TagBrowserFrame getTagBrowser()Description copied from interface:DesignerContext
Returns the TagBrowserPanel that can be used to select Tags- Specified by:
getTagBrowser
in interfaceDesignerContext
-
getOPCBrowser
Description copied from interface:DesignerContext
Returns the OPCBrowserPanel that can be used to browse and import OPC items- Specified by:
getOPCBrowser
in interfaceDesignerContext
-
getQueryBrowserPanel
Description copied from interface:DesignerContext
Returns the DB query browser tool- Specified by:
getQueryBrowserPanel
in interfaceDesignerContext
-
editResourceDocs
Description copied from interface:DesignerContext
Opens up the resource notes editor for the given project resources- Specified by:
editResourceDocs
in interfaceDesignerContext
-
getDesignerPrefs
Description copied from interface:DesignerContext
Returns a PersistentProperties file that will be stored on a per-user basis for "persistent" but not project-encapsulated preferences- Specified by:
getDesignerPrefs
in interfaceDesignerContext
-
canEditResourceProtection
public boolean canEditResourceProtection()Description copied from interface:DesignerContext
Checks whether or not the current logged in user can edit the protection bits of project resources.- Specified by:
canEditResourceProtection
in interfaceDesignerContext
-
addLegacyScriptNode
public void addLegacyScriptNode()Adds the Legacy Script project node for pre-7.7 script modules that have been imported by the user. -
showError
-
showError
-
showError
-
getLogger
-
newProjectResourceListener
Make a custom resource listener so we can update the script playground with any project script changes- Overrides:
newProjectResourceListener
in classAbstractClientContext
-