Class DesignerResourceEditManager
- java.lang.Object
-
- com.inductiveautomation.ignition.designer.concurrency.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 Summary
Constructors Constructor Description DesignerResourceEditManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
confirmConcurrentEdit(javax.swing.JComponent parentComponent, ResourcePath resourcePath)
Opens a dialog to confirm that the user wishes to continue when this resource is open in another Designerjava.util.Optional<ResourceSession>
getCurrentResourceSession()
java.util.Optional<SessionInfo>
getCurrentSessionInfo()
java.lang.String
getFirstUser(ResourcePath path)
java.util.List<ResourceSession>
getOtherSessions()
int
getSessionCount(ResourcePath path)
boolean
hasConflict(ResourcePath path)
void
onDesignerUpdateComplete()
void
onEditorChange(ResourceEditorEvent evt)
void
setContext(DesignerContext context)
Called when a project is loaded Designer-sidevoid
shutdown()
void
startup()
-
-
-
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 overresourcePath
- 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()
-
onEditorChange
public void onEditorChange(ResourceEditorEvent evt)
-
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()
-
-