Class DesignerContextImpl

    • Method Detail

      • getNamedQueryManager

        public NamedQueryManager 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 interface ClientContext
        Returns:
        The correct NamedQueryManager implementation for the scope.
      • getModule

        public java.lang.Object getModule​(java.lang.String id)
        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 interface CommonContext
      • getModules

        public java.util.List<ModuleInfo> getModules()
        Description copied from interface: ClientContext
        Retrieve the list of all modules currently loaded in this context
        Specified by:
        getModules in interface ClientContext
      • exportResources

        public void exportResources​(@Nonnull
                                    java.util.Collection<ResourcePath> resourceIds)
        Description copied from interface: DesignerContext
        Shows the project export window (after doing a commit) with the given resource IDs checked.
        Specified by:
        exportResources in interface DesignerContext
        Parameters:
        resourceIds - Collection of ProjectResourceIds. Not null, but may be empty.
      • fireScriptManagerInitialized

        public void fireScriptManagerInitialized()
      • getResourceCategoryKey

        public java.lang.String getResourceCategoryKey​(@Nonnull
                                                       ProjectResourceId id)
      • getResourceDisplayName

        public java.lang.String getResourceDisplayName​(@Nonnull
                                                       ProjectResourceId id)
      • getResourceIcon

        public javax.swing.Icon getResourceIcon​(@Nonnull
                                                ProjectResourceId id)
      • registerClientPermissions

        public void registerClientPermissions​(java.util.Map<java.lang.String,​java.lang.String> bundleMap)
        Description copied from interface: DesignerContext
        Register id-bundlekey pairs to limit client permissions
        Specified by:
        registerClientPermissions in interface DesignerContext
        Parameters:
        bundleMap - Map of ids to bundlekeys. Not null.
      • getFrame

        @Nonnull
        public java.awt.Frame getFrame()
        Description copied from interface: DesignerContext
        Returns the owning frame of the designer. Handy for dialog parents
        Specified by:
        getFrame in interface DesignerContext
      • addBeanInfoSearchPath

        public void addBeanInfoSearchPath​(@Nonnull
                                          java.lang.String packageName)
        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 interface DesignerContext
        Parameters:
        packageName - fully-qualified path name. Not null.
      • createSerializer

        public XMLSerializer 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 interface DesignerContext
        Returns:
        Not null.
      • createDeserializer

        public XMLDeserializer 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 interface CommonContext
      • getStatusBar

        public StatusBar 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 interface DesignerContext
        Returns:
        Not null.
      • shutdown

        public void shutdown()
      • getRootPaneContainer

        public javax.swing.RootPaneContainer getRootPaneContainer()
        Description copied from interface: ClientContext
        Returns the RootPaneContainer that is currently the owner of the client
        Specified by:
        getRootPaneContainer in interface ClientContext
      • deserialize

        public java.lang.Object deserialize​(byte[] data,
                                            org.apache.log4j.Logger log)
                                     throws SerializationException
        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 interface ClientContext
        Throws:
        SerializationException
      • addPropertyEditor

        public void addPropertyEditor​(@Nonnull
                                      java.lang.Class<? extends AbstractPropertyEditorPanel> pageClass)
        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 interface DesignerContext
      • getDockingManager

        @Nonnull
        public com.jidesoft.docking.DockingManager getDockingManager()
        Description copied from interface: DesignerContext
        Returns the JIDE DockingManager for the Designer
        Specified by:
        getDockingManager in interface DesignerContext
      • getToolbarManager

        @Nonnull
        public com.jidesoft.action.DockableBarManager getToolbarManager()
        Description copied from interface: DesignerContext
        Returns the JIDE dockable toolbar manager
        Specified by:
        getToolbarManager in interface DesignerContext
      • 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 interface DesignerContext
      • 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 interface DesignerContext
      • addLegacyScriptNode

        public void addLegacyScriptNode()
        Adds the Legacy Script project node for pre-7.7 script modules that have been imported by the user.
      • showError

        protected void showError​(java.lang.String message)
      • showError

        protected void showError​(java.lang.Exception e)
      • showError

        protected void showError​(java.lang.String message,
                                 java.lang.Exception e)
      • getLogger

        protected LoggerEx getLogger()