Interface DesignerContext
- All Superinterfaces:
ClientContext, CommonContext
- All Known Implementing Classes:
DesignerContextImpl, DesignerContextProxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty name fired when the Designer has finished running all loaded modules'initializeScriptManagerevents off their hooks. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBeanInfoSearchPath(@NonNull String packageName) Adds the given fully-qualified path name to the Introspector's BeanInfo search path.voidaddPropertyEditor(@NonNull Class<? extends AbstractPropertyEditorPanel> pageClass) Adds a property editor page that will be incorporated into the Designer's project property editing system.booleanChecks whether or not the current logged in user can edit the protection bits of project resources.Creates a new XML serializer that has been configured by all installed modules for custom serialization delegatesvoideditResourceDocs(@NonNull Resource resource) Opens up the resource notes editor for the given project resourcesvoidexportResources(@NonNull Collection<ResourcePath> resourceIds) Shows the project export window (after doing a commit) with the given resource IDs checked.@NonNull Optional<DesignerAiContext> Returns the Designer's AI context — exposes toolbar-button factories for inline chat popups and the currently selected model provider.@NonNull Action@NonNull Action@NonNull Action@NonNull PersistentPropertiesReturns a PersistentProperties file that will be stored on a per-user basis for "persistent" but not project-encapsulated preferences@NonNull com.jidesoft.docking.DockingManagerReturns the JIDE DockingManager for the Designer@NonNull FramegetFrame()Returns the owning frame of the designer.@NonNull DesignerLocalizationManager@Nullable DesignerModuleHookReturns the running hook object that the module with the given ID contributed to this scope.@NonNull OPCBrowserPanelReturns the OPCBrowserPanel that can be used to browse and import OPC items@NonNull ActionReturns the project that this client is running.@NonNull ProjectBrowserRootReturns the root node of the project browser tree, so that modules may add their own nodes.@NonNull QueryBrowserReturns the DB query browser tool@NonNull ActionResource edit manager@NonNull DesignerResourceMetaRegistryReturns the registry of resource type metadata contributed by installed modules.@Nullable SearchProvider@NonNull List<SearchProvider> 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-right@NonNull com.inductiveautomation.ignition.designer.tags.frame.TagBrowserFrameReturns the TagBrowserPanel that can be used to select Tags@NonNull TagEditorReturns the TagEditorPanel that can be used to edit/add Tags@NonNull com.jidesoft.action.DockableBarManagerReturns the JIDE dockable toolbar managervoidregisterClientPermissions(Map<String, String> bundleMap) Register id-bundlekey pairs to limit client permissionsvoidregisterResourceWorkspace(@NonNull ResourceWorkspace workspace) Registers a newResourceWorkspace, which is a main editing area for the designer.voidregisterSearchProvider(@NonNull SearchProvider provider) Registers a search provider that will be exposed through the find/replace system.Methods inherited from interface ClientContext
addPropertyChangeListener, addPropertyChangeListener, deserialize, getAuthProfileName, getDefaultDatasourceName, getDefaultTagProviderName, getExecutionManager, getLaunchContext, getModules, getNamedQueryManager, getProjectName, getRootPaneContainer, getTagManager, getTagPollRate, getUIEventBus, removePropertyChangeListener, removePropertyChangeListenerMethods inherited from interface CommonContext
createDeserializer, getEdgeEditions, getEventBus, getExpressionFunctionFactory, getLicenseState, getLoggingManager, getScriptManager
-
Field Details
-
SCRIPT_MANAGER_PROPERTY
Property name fired when the Designer has finished running all loaded modules'initializeScriptManagerevents off their hooks.- See Also:
-
-
Method Details
-
exportResources
Shows the project export window (after doing a commit) with the given resource IDs checked.- Parameters:
resourceIds- Collection of ProjectResourceIds. Not null, but may be empty.
-
addBeanInfoSearchPath
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.- Parameters:
packageName- fully-qualified path name. Not null.
-
createSerializer
XMLSerializer createSerializer()Creates a new XML serializer that has been configured by all installed modules for custom serialization delegates- Returns:
- Not null.
-
getStatusBar
StatusBar getStatusBar()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- Returns:
- Not null.
-
getResourceEditManager
DesignerResourceEditManager getResourceEditManager()Resource edit manager -
editResourceDocs
Opens up the resource notes editor for the given project resources -
getProjectBrowserRoot
@NonNull ProjectBrowserRoot getProjectBrowserRoot()Returns the root node of the project browser tree, so that modules may add their own nodes.- See Also:
-
getDesignerPrefs
@NonNull PersistentProperties getDesignerPrefs()Returns a PersistentProperties file that will be stored on a per-user basis for "persistent" but not project-encapsulated preferences -
getLocalizationManager
@NonNull DesignerLocalizationManager getLocalizationManager()- Specified by:
getLocalizationManagerin interfaceClientContext
-
getFrame
@NonNull Frame getFrame()Returns the owning frame of the designer. Handy for dialog parents -
getModule
Returns the running hook object that the module with the given ID contributed to this scope. This is the live hook instance, not itsClass. Modules use it to reach each other's APIs at runtime.The return type is
Objectbecause the hook type varies by scope — aClientModuleHookin a Vision client, aDesignerModuleHookin the Designer (seeDesignerContext#getModule(String), which narrows the return type accordingly). Callers narrow the result to an interface the target module publishes for this purpose — pattern matching covers the absent-module case in the same step:if (context.getModule(SFCModule.MODULE_ID) instanceof ClientStepRegistryProvider sfc) { var registry = sfc.getStepRegistry(); }A null result is the usual way to detect that an optional module is unavailable, so account for it unless the module is a hard dependency of yours.
Narrowed to
DesignerModuleHookhere, so no cast is needed to call the standard hook methods. Reaching a module's own API still means casting to the interface that module publishes.- Specified by:
getModulein interfaceClientContext- Parameters:
id- the module ID of the module whose hook you want.- Returns:
- the module's Designer hook instance, or null if the module is not installed or contributes no Designer-scope hook.
-
getCutAction
@NonNull Action getCutAction() -
getCopyAction
@NonNull Action getCopyAction() -
getPasteAction
@NonNull Action getPasteAction() -
getDeleteAction
@NonNull Action getDeleteAction() -
getRenameAction
@NonNull Action getRenameAction() -
getTagEditor
@NonNull TagEditor getTagEditor()Returns the TagEditorPanel that can be used to edit/add Tags -
getTagBrowser
@NonNull com.inductiveautomation.ignition.designer.tags.frame.TagBrowserFrame getTagBrowser()Returns the TagBrowserPanel that can be used to select Tags -
getOPCBrowser
@NonNull OPCBrowserPanel getOPCBrowser()Returns the OPCBrowserPanel that can be used to browse and import OPC items -
getQueryBrowserPanel
@NonNull QueryBrowser getQueryBrowserPanel()Returns the DB query browser tool -
getDockingManager
@NonNull com.jidesoft.docking.DockingManager getDockingManager()Returns the JIDE DockingManager for the Designer -
getToolbarManager
@NonNull com.jidesoft.action.DockableBarManager getToolbarManager()Returns the JIDE dockable toolbar manager -
registerResourceWorkspace
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.- Parameters:
workspace- TheResourceWorkspaceto register with the designer
-
getResourceMetaRegistry
@NonNull DesignerResourceMetaRegistry getResourceMetaRegistry()Returns the registry of resource type metadata contributed by installed modules. -
getAiContext
@NonNull Optional<DesignerAiContext> getAiContext()Returns the Designer's AI context — exposes toolbar-button factories for inline chat popups and the currently selected model provider. Only present when the AI module is installed and AI is enabled in this Designer. -
addPropertyEditor
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.
-
registerSearchProvider
Registers a search provider that will be exposed through the find/replace system. -
getSearchProviders
@NonNull List<SearchProvider> getSearchProviders()Get the registered SearchProviders.- Returns:
- Not null.
-
getSearchProvider
-
registerClientPermissions
-
getClientPermissionBundleKeys
-
getProject
DesignableProject getProject()Description copied from interface:ClientContextReturns 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:
getProjectin interfaceClientContext
-
canEditResourceProtection
boolean canEditResourceProtection()Checks whether or not the current logged in user can edit the protection bits of project resources.
-