Class EventStreamSubtextStateSynthesizer
java.lang.Object
com.inductiveautomation.eventstream.designer.ui.viewmodel.EventStreamSubtextStateSynthesizer
- All Implemented Interfaces:
Disposable
This class is responsible for synthesizing the
For synthesizing the
SubtextStateInfo, and updating the stateInfo property. The stateInfo property holds the most current SubtextStateInfo. For synthesizing the
SubtextStateInfo, this class monitors 3 sources:
EventStreamStateTracker- This class provides the current state of the event stream as reported by the GatewayEventStreamConfigManager- This class provides the current configuration of the event stream. While an editor is open it is the source of truth for unsaved edits (it sees live, uncommitted UI changes).DesignableProject.isChanged(ResourcePath)- When no editor is open the config manager is gone, so the committed-but-unsaved state of the project resource is used to keep thePENDING_SAVEbadge alive until the project is saved. This synthesizer is resource-scoped and outlives the editor, so it must not depend on the config manager for the unsaved-edits signal once the editor closes.
-
Method Summary
Modifier and TypeMethodDescriptioncreate(EventStreamStateTracker stateTracker, @Nullable DesignableProject project, ResourcePath resourcePath, ViewModelSwingWorkerExecutor executor) voiddispose()voidsetConfigManager(@Nullable EventStreamConfigManager configManager) void
-
Method Details
-
create
public static EventStreamSubtextStateSynthesizer create(EventStreamStateTracker stateTracker, @Nullable DesignableProject project, ResourcePath resourcePath, ViewModelSwingWorkerExecutor executor) -
setConfigManager
-
setPostSaveFlag
public void setPostSaveFlag() -
stateInfo
-
dispose
public void dispose()- Specified by:
disposein interfaceDisposable
-