![]() |
undoStudio
The IDE of the undoRT ecosystem
|
docs/ with a screenshot each. It is written as the IDE behaves rather than as it was assembled: what a panel shows, which backend a file gets, what is remembered between runs. The two editors that had become one are described as one, and the pages that used to carry the story of a bug now carry the behaviour and leave the story to the commit that found it..undoProject/project.json, .undoProject/plcs.json, .undoProject/tasks.json, undoLogic/<plc>/exports.json and one file per task under undoCore/tasks/. Nothing reads the old format and nothing migrates it, so a project written against it has to be rewritten once. strictness in the semantics block is a boolean now rather than a string. JSON was already the language of the rest of the tree — every diagnostic, every build descriptor — and a project described in a second one was the only file the IDE could not read as itself..st, a .json, a .cpp and a configuration file all open in the same Editor panel above the same tab bar. The Structured Text editor used to be a panel of its own, which meant two bars of open files over one set of files and a shipped layout arranging a panel that no longer exists; and every backend drew its own ImGui window inside the panel it was dispatched from, so a .json came to be shown in a floating window titled with its own filename while the Editor panel behind it drew the same backend again. The panel owns the window and a backend draws its contents; the ST document is drawn by EditorApp calling three functions in the order the panel calls them, because the keyboard and the unsaved prompt belong to the panel while the signature help and the completion lists are separate windows drawn after the document..json opens as text, and can be looked at as a tree instead. Which one a .json gets is the file's role and not its extension, answered from the open project: the configuration is the file the user is told to edit by hand, and a tree has nothing to type into. "Open as Text" and "Open as Tree" are both in the tree's context menu for any .json, they replace the tab rather than adding a second one, and a .json outside any project is a tree as it always was.FUNCTION could not be parsed at all, new or edited. The generated header wrote the name and a colon and stopped, so the type after it was empty: FUNCTION Foo :, which st2cpp rejects before it reaches a single line of the body. The POU type and the return type are two fields, and the second one had nowhere to go — it was asked for in the add-METHOD dialog and dropped afterwards, so a method added to a FUNCTION lost its type too. The return type is now written into the header, read back when the file is opened rather than carried in memory across the two, and editable next to the POU type for a file that was generated before this, which is what the ones on disk are. A diagnostic that falls outside every editor's own lines says so in those words and names the generated line, because "see the Output panel" pointed at a file the user had never opened.EditorApp::openFile now.OpenDocuments holds the set of open files, which one is on screen, and which of them are permanent, and it is the only thing that answers those questions: the backends behind it know about one file each, and none of them knows that a second .st is open somewhere. A click in the tree opens a file and keeps it, the tab bar scrolls sideways rather than squeezing, each tab carries a dot while it has changes that are not on disk and a close button, and the panel is sized from what it holds rather than by a zero that ImGui reads as "all of it" (a bar of that kind grew to the height of the whole ST Editor panel and pushed the editor it sat above out of sight).STDocument for the ST panes, the text and its path for the others. A tab that comes back shows what was in it, at the cursor and the pane division it was left at. The AST, the semantic analysis and the source map are not kept: they are derived, and a snapshot of them is stale the moment a character is typed.Ctrl+P. The list is persistent, newest first, and it is fed by every route into the editor rather than by the menu: a file is remembered however it was reached. It shares one length with the recent projects list ([recent] max), because one remembered-things-too-many is enough, and a rename or a move rewrites the entry in place rather than leaving an entry for a file that is no longer there. A file deleted outside the IDE stays in the list and is shown as missing, so that an entry disappearing is never a mistake.OpenTarget decides which of the two a path is and leaves a request, because the undoApp that can act on it is a plugin and the core cannot call into one. The desktop entry gained F and the JSON and plain-text MIME types, so a .st file can be opened from the file manager.undoAppSTOutput.hpp holds the decisions, apart from the panel that draws them, because what is counted is what is hidden: a panel that says "0 errors" while hiding them is worse than one that says nothing. The switches persist per workspace, and a search field filters what is left.Ctrl+S wrote a copy where the original used to be, and the file the stash held came back with the old path inside it. A folder carries every file inside it, so renaming one moves their tabs too, and deleting a file or a folder closes the tabs that pointed at it rather than leaving rows that offer to open something that is gone.Ctrl+S now reaches .st, .cpp and text files from any panel, and clears the mark only after the file opened for writing..json gives the file a tab of its own. It used to close the editors and load the text behind their backs, so the file had no name in the bar, nothing in the list to ask for it again, and one file could be open in two backends at once. It is one file, so it is one row, and the row is the text one.File: <name> row and its (unsaved changes) text: the tab bar drawn a few lines above already says both. The tooltip switch moved onto the button row, where a per-editor setting belongs. The POU type stayed, because it is the only place that writes down whether the file declares a PROGRAM, a FUNCTION_BLOCK or a FUNCTION, and a FUNCTION's return type hangs off it.PushID covered the button and stopped before the Selectable, so both rows were drawn and submitted under the label alone. Both popups had it, and it looked right: the rows rendered, in order, with the right name on them, and the first pick worked.OpenPopup with no Begin anywhere to match it, so the entry stayed on ImGui's open stack for the rest of the session and swallowed every Escape pressed afterwards.stashActiveDocument was asked to do two things at once. Reading it once a frame from the editors is the fix, and a save that failed leaves the mark alone, because it is the last thing standing between an edit and losing it.ImGuiTabItemFlags_SetSelected on the item: ImGuiTabBarFlags_AutoSelectNewTabs only selects when the bar has nothing selected, which is why the + button left the old tab on screen..json, which is the only backend that cannot show its file as text.