Class DesignerResourceEditManager


  • public class DesignerResourceEditManager
    extends java.lang.Object
    Receives open/close events from resource editors in order to track all open resources in this Designer. Sends these udpates to the Gateway. Also tracks open resources of all other Designers within the same project.
    • Constructor Detail

      • DesignerResourceEditManager

        public DesignerResourceEditManager()
    • Method Detail

      • confirmConcurrentEdit

        public boolean confirmConcurrentEdit​(@Nullable
                                             javax.swing.JComponent parentComponent,
                                             ResourcePath resourcePath)
        Opens a dialog to confirm that the user wishes to continue when this resource is open in another Designer
        Parameters:
        parentComponent - the component to open the dialog over
        resourcePath - the path to the resource that is being opened
        Returns:
        true if the resource is not being edited or if the user has confirmed it should be opened
      • startup

        public void startup()
      • setContext

        public void setContext​(DesignerContext context)
        Called when a project is loaded Designer-side
      • shutdown

        public void shutdown()
      • getOtherSessions

        public java.util.List<ResourceSession> getOtherSessions()
      • getCurrentSessionInfo

        public java.util.Optional<SessionInfo> getCurrentSessionInfo()
      • getCurrentResourceSession

        public java.util.Optional<ResourceSession> getCurrentResourceSession()
      • getSessionCount

        public int getSessionCount​(ResourcePath path)
      • getFirstUser

        public java.lang.String getFirstUser​(ResourcePath path)
      • hasConflict

        public boolean hasConflict​(ResourcePath path)
      • onDesignerUpdateComplete

        public void onDesignerUpdateComplete()