49 lines
3.8 KiB
TeX
49 lines
3.8 KiB
TeX
% Reviewed generic UML interactions; bounded coordinate-edit history is implemented.
|
|
\begin{tikzpicture}[font=\footnotesize,txLabel/.style={font=\footnotesize,fill=none,inner sep=2pt,align=center}]
|
|
\node[anchor=west,font=\small\bfseries] at (-1.5,0.9) {(a) New edit: prepare and accept};
|
|
\foreach \n/\x/\title in {c/0/{Controller: tkrEditorController},e/4.5/{Service: tkrEditService},d/9/{Document: tkrTikzDocument},h/13.5/{History: tkrEditHistory}} {
|
|
\node[draw=tkrBlue,fill=tkrBlue!8,text width=3.6cm,align=center,minimum height=0.85cm] (\n) at (\x,0) {\title};
|
|
\draw[dashed,gray] (\x,-0.35)--(\x,-4.7);
|
|
\draw[dashed,gray] (\x,-6.85)--(\x,-7.4);
|
|
}
|
|
\draw[flow] (0,-1)--node[txLabel,above]{snapshot + request}(4.5,-1);
|
|
\draw[flow,dashed] (4.5,-1.9)--node[txLabel,above]{prepared proposal}(0,-1.9);
|
|
\draw[flow] (0,-2.8)--node[txLabel,above]{applyTransaction(proposal)}(9,-2.8);
|
|
\draw[flow] (9,-3.7)--node[txLabel,above]{prepare entry}(13.5,-3.7);
|
|
\draw[flow,dashed] (13.5,-4.4)--node[txLabel,above]{prepared / failed}(9,-4.4);
|
|
\draw[tkrBlue] (-1.5,-4.85) rectangle (15,-6.7);
|
|
\node[anchor=west] at (-1.35,-5.05) {alt [valid changed proposal; all preparation ready]};
|
|
\node[txLabel] at (9.0,-5.65) {Publish source + history entry atomically; advance revision.};
|
|
\draw[dashed,tkrBlue] (-1.5,-6.0)--(15,-6.0);
|
|
\node[anchor=west] at (-1.35,-6.3) {[unchanged / cancelled / rejected]: preserve source/history; retain redo};
|
|
\draw[flow,dashed] (9,-7.2)--node[txLabel,above]{result; refresh/notify once only after Applied}(0,-7.2);
|
|
\node[txLabel,text width=15.5cm,anchor=north] at (6.75,-7.7) {Only a prepared change proceeds to document acceptance; earlier noncommits return directly. Geometry and syntax preparation are detailed in Figure~\ref{Figure:PluginSequence}.};
|
|
\end{tikzpicture}
|
|
|
|
\vspace{0.7cm}
|
|
|
|
\begin{tikzpicture}[font=\footnotesize,txLabel/.style={font=\footnotesize,fill=none,inner sep=2pt,align=center}]
|
|
\node[anchor=west,font=\small\bfseries] at (-1.5,0.9) {(b) Undo or Redo: restore an existing history target};
|
|
\foreach \n/\x/\title in {c/0/{Controller: tkrEditorController},d/6.75/{Document: tkrTikzDocument},h/13.5/{History: tkrEditHistory}} {
|
|
\node[draw=tkrBlue,fill=tkrBlue!8,text width=3.6cm,align=center,minimum height=0.85cm] (\n) at (\x,0) {\title};
|
|
\draw[dashed,gray] (\x,-0.35)--(\x,-4.0);
|
|
\draw[dashed,gray] (\x,-7.7)--(\x,-8.5);
|
|
}
|
|
\draw[flow] (0,-0.8)--(1,-0.8)--(1,-1.35)--(0,-1.35);
|
|
\node[txLabel,text width=3.7cm,anchor=west] at (1.1,-1.05) {Cancel active preview before requesting restoration.};
|
|
\draw[flow] (0,-2)--node[txLabel,above]{undo() / redo()}(6.75,-2);
|
|
\draw[flow] (6.75,-2.9)--node[txLabel,above]{retrieve available target}(13.5,-2.9);
|
|
\draw[flow,dashed] (13.5,-3.7)--node[txLabel,above]{exact bytes + target position}(6.75,-3.7);
|
|
\draw[tkrBlue] (-1.5,-4.15) rectangle (15,-7.55);
|
|
\node[anchor=west] at (-1.35,-4.4) {alt [available target; restoration preparation succeeds]};
|
|
\node[txLabel,text width=14cm] at (6.75,-5.25) {Prepare source and validate restoration before publication.\\
|
|
Publish exact source + existing history position atomically; advance revision.\\
|
|
Compare with saved baseline; append no edit entry and write no disk file.};
|
|
\draw[dashed,tkrBlue] (-1.5,-6.1)--(15,-6.1);
|
|
\node[anchor=west] at (-1.35,-6.4) {[unavailable / preparation failed]};
|
|
\node[txLabel,text width=14cm] at (6.75,-7.0) {Preserve source, entries and position. Disable unavailable action; report failed restoration.};
|
|
\draw[flow,dashed] (6.75,-8.25)--node[txLabel,above]{result; refresh/notify once only after Applied}(0,-8.25);
|
|
\node[txLabel,text width=15.5cm,anchor=north] at (6.75,-8.8) {Future compiled view becomes stale after restoration; only successful Save requests compilation.\\
|
|
Save keeps history; successful document replacement clears it. Compiler failure does not reverse accepted restoration.};
|
|
\end{tikzpicture}
|