35 lines
2.2 KiB
TeX
35 lines
2.2 KiB
TeX
\begin{tikzpicture}
|
|
\node[initial] (start) {};
|
|
\node[activity,below=0.35cm of start] (confirm) {\textbf{tkrMainWindow}\\Confirm Save / Discard / Cancel if dirty};
|
|
\node[choice,below=0.45cm of confirm] (continue) {Continue?};
|
|
\node[activitySide] (cancel) at ([xshift=-5.4cm]continue.center) {Keep current document and window};
|
|
\node[final,below=0.4cm of cancel] (cancelEnd) {};
|
|
\node[activity,below=0.45cm of continue] (choose) {\textbf{tkrMainWindow}\\Show file selection dialog};
|
|
\node[choice,below=0.45cm of choose] (selected) {File selected?};
|
|
\node[activity,below=0.45cm of selected] (read) {\textbf{Controller}\\Open read-only; read source bytes};
|
|
\node[choice,below=0.45cm of read] (readok) {Read succeeded?};
|
|
\node[activitySide] (failure) at ([xshift=5.4cm]readok.center) {\textbf{tkrMainWindow}\\Show read error; retain previous source and history};
|
|
\node[final,below=0.4cm of failure] (failureEnd) {};
|
|
\node[activity,below=0.45cm of readok] (load) {\textbf{Document / Controller}\\Cancel preview; load bytes and baseline; assign new document identity; clear history; advance revision};
|
|
\node[activity,below=0.4cm of load] (parse) {\textbf{Parser / Scene}\\Display supported elements or clear with diagnostics};
|
|
\node[activity,below=0.4cm of parse] (notify) {\textbf{Controller}\\Emit display/diagnostic status and documentChanged};
|
|
\node[activity,below=0.4cm of notify] (view) {\textbf{tkrMainWindow}\\Show source; disable Save, Undo and Redo for the new clean document};
|
|
\node[final,below=0.35cm of view] (finish) {};
|
|
\draw[flow] (start) -- (confirm);
|
|
\draw[flow] (confirm) -- (continue);
|
|
\draw[flow] (continue) -- node[guard,above]{[no]} (cancel);
|
|
\draw[flow] (cancel) -- (cancelEnd);
|
|
\draw[flow] (continue) -- node[guard,right]{[yes]} (choose);
|
|
\draw[flow] (choose) -- (selected);
|
|
\draw[flow] (selected.west) -- node[guard,above]{[no]} ([xshift=-5.4cm]selected.center) |- (cancelEnd.south);
|
|
\draw[flow] (selected) -- node[guard,right]{[yes]} (read);
|
|
\draw[flow] (read) -- (readok);
|
|
\draw[flow] (readok) -- node[guard,above]{[no]} (failure);
|
|
\draw[flow] (failure) -- (failureEnd);
|
|
\draw[flow] (readok) -- node[guard,right]{[yes]} (load);
|
|
\draw[flow] (load) -- (parse);
|
|
\draw[flow] (parse) -- (notify);
|
|
\draw[flow] (notify) -- (view);
|
|
\draw[flow] (view) -- (finish);
|
|
\end{tikzpicture}
|