in code/platform/src/main/kotlin/org/fbme/ide/platform/editor/HeaderedNodeEditor.kt [116:143]
override fun loadState(state: EditorState) {
if (state is BaseEditorState) {
myProject.modelAccess.runReadAction {
if (state is HeaderedEditorState) {
val projectionState = state.myProjectionState
restoreState(projectionState)
} else {
// regular editor was shown for that node last time
initializeFirstAvailableProjection()
}
val componentState = Element("container")
state.save(componentState)
val memento = componentState.getChild("memento")
if (memento != null) {
memento.removeChildren("enabledHints")
val hintsElement = Element("enabledHints")
for (hint in currentProjection!!.initialEditorHints) {
val hintElement = Element("enabledHintsElement")
hintElement.setAttribute("enabledHintsAttribute", hint)
hintsElement.addContent(hintElement)
}
memento.addContent(hintsElement)
}
state.load(componentState)
}
super.loadState(state)
}
}