UI-Lifecycle: use dummy-mechanism to get the new command executed
...because due of #211, we usually don't execute commands yet. For now there is only the backdoor to prefix the command-ID with "test" With this change, the TODO message appears now immediately after GUI start!
This commit is contained in:
parent
d58890e2d5
commit
4e77a28112
5 changed files with 89 additions and 13 deletions
|
|
@ -109,7 +109,7 @@ namespace interact {
|
|||
void
|
||||
InteractionDirector::populateContent_afterStart()
|
||||
{
|
||||
invoke (cmd::meta_activateContentDiff);
|
||||
invoke (cmd::test_meta_activateContentDiff); ////////////////////////////////////////////TICKET #211 prefix test_ bypasses logging and immediately executes for now (2018)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ namespace cmd {
|
|||
|
||||
/* ========= meta actions ======= */
|
||||
|
||||
extern CommandSetup meta_activateContentDiff;
|
||||
extern CommandSetup test_meta_activateContentDiff; ////////////////////////////////TICKET #211 prefix test_ bypasses logging and immediately executes for now (2018)
|
||||
extern CommandSetup meta_deactivateContentDiff;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -70,8 +70,9 @@ namespace cmd {
|
|||
* pushing appropriate diff messages upwards through the GuiNotification façade.
|
||||
* @note to UNDO this action means to waive the live-update state. In addition,
|
||||
* the session will push up a status change to mark the session-root as defunct.
|
||||
* @todo used for preliminary integration testing ///////////////////////////////////////////TICKET #211 prefix test_ bypasses logging and immediately executes for now (2018)
|
||||
*/
|
||||
COMMAND_DEFINITION (meta_activateContentDiff)
|
||||
COMMAND_DEFINITION (test_meta_activateContentDiff)
|
||||
{
|
||||
def.operation ([]()
|
||||
{
|
||||
|
|
@ -80,13 +81,45 @@ COMMAND_DEFINITION (meta_activateContentDiff)
|
|||
})
|
||||
.captureUndo ([]() -> bool
|
||||
{
|
||||
return false;
|
||||
return false; ///////////////////////////////////////////////////////////TICKET #1153 : use status from service for live diff updates
|
||||
})
|
||||
.undoOperation ([](bool wasActive)
|
||||
{
|
||||
if (not wasActive)
|
||||
{
|
||||
UNIMPLEMENTED ("send a status update diff into the root node, to mark it as defunct");
|
||||
TODO ("clear the life-update service within the session");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
/** instruct the session to start keeping the UI up-to-date through diff messages.
|
||||
* @remarks we assume the UI is _empty_ when issuing this command. Thus the session
|
||||
* will commence by sending a _population diff_, to reflect all the UI relevant
|
||||
* structures currently present within the session data. Moreover, from that point
|
||||
* on, any changes within the session structure and contents will be reflected by
|
||||
* pushing appropriate diff messages upwards through the GuiNotification façade.
|
||||
* @note to UNDO this action means to waive the live-update state. In addition,
|
||||
* the session will push up a status change to mark the session-root as defunct.
|
||||
*/
|
||||
COMMAND_DEFINITION (meta_deactivateContentDiff)
|
||||
{
|
||||
def.operation ([]()
|
||||
{
|
||||
TODO ("send a status update diff into the root node, to mark it as defunct");
|
||||
TODO ("clear the life-update service within the session");
|
||||
})
|
||||
.captureUndo ([]() -> bool
|
||||
{
|
||||
return true; ///////////////////////////////////////////////////////////TICKET #1153 : use status from service for live diff updates
|
||||
})
|
||||
.undoOperation ([](bool wasActive)
|
||||
{
|
||||
if (wasActive)
|
||||
{
|
||||
UNIMPLEMENTED ("send a diff update to completely clear the root node, then send a population diff with current session content");
|
||||
TODO ("activate life-update service within the session");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ namespace control {
|
|||
}
|
||||
if (cmd)
|
||||
{
|
||||
INFO (command, "+++ dispatch %s", util::cStr(cmd));
|
||||
INFO (command, "+++ dispatch %s", util::cStr(cmd)); ///////////////////////////////TICKET #211 actually use a command logging and execution strategy here
|
||||
|
||||
//////////////////////////////////////////////////////TODO : magic to invoke commands from unit tests
|
||||
if (util::startsWith (string(cmd.getID()), "test"))
|
||||
|
|
|
|||
|
|
@ -15881,8 +15881,27 @@
|
|||
<node COLOR="#338800" CREATED="1531423597642" ID="ID_1814328528" MODIFIED="1533395218014" TEXT="definieren">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533395230685" ID="ID_556592297" MODIFIED="1533395237572" TEXT="Ausführung sicherstellen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1533395230685" ID="ID_556592297" MODIFIED="1533400280528" TEXT="Ausführung sicherstellen">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1533400281627" ID="ID_1248361340" MODIFIED="1533400375591" TEXT="geht noch nicht -- logging-Strategy fehlt">
|
||||
<icon BUILTIN="stop-sign"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533400377118" ID="ID_1072134705" MODIFIED="1533401017012" TEXT="#211 handling pattern for dispatch">
|
||||
<arrowlink COLOR="#ca91c2" DESTINATION="ID_1192893155" ENDARROW="Default" ENDINCLINATION="1415;0;" ID="Arrow_ID_207842771" STARTARROW="None" STARTINCLINATION="2581;0;"/>
|
||||
<icon BUILTIN="hourglass"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1533400389668" ID="ID_1875748001" MODIFIED="1533400427879" TEXT="vorläufig: Präfix test_">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1533400398059" ID="ID_1419077642" MODIFIED="1533400424027" TEXT="Magie im ProcDispatcher">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
<node CREATED="1533400403290" ID="ID_950948089" MODIFIED="1533400426028" TEXT="führt Command unmittelbar aus">
|
||||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1533400412337" ID="ID_462882830" MODIFIED="1533400420146" TEXT="funktioniert">
|
||||
<icon BUILTIN="ksmiletris"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533392476019" ID="ID_1798579710" MODIFIED="1533392483674" TEXT="vorläufige Dummy-Implementierung">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
|
|
@ -25809,7 +25828,7 @@
|
|||
<icon BUILTIN="messagebox_warning"/>
|
||||
<node CREATED="1489781616257" ID="ID_1645536558" MODIFIED="1518487921094" TEXT="Schema für ID-Konstanten"/>
|
||||
<node CREATED="1489781628743" ID="ID_1733247268" MODIFIED="1518487921094" TEXT="Mechanismus, der die Definition treibt"/>
|
||||
<node CREATED="1489781758389" ID="ID_1124650374" MODIFIED="1518487921094" TEXT="gewünscht">
|
||||
<node CREATED="1489781758389" FOLDED="true" ID="ID_1124650374" MODIFIED="1533400559326" TEXT="gewünscht">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
|
||||
<node CREATED="1489781775443" ID="ID_379002135" MODIFIED="1518487921094" TEXT="Name und Definition nahe zusammen"/>
|
||||
<node CREATED="1489781769500" ID="ID_998243238" MODIFIED="1518487921094" TEXT="keine Redundanz"/>
|
||||
|
|
@ -25818,7 +25837,7 @@
|
|||
<node CREATED="1489781923640" ID="ID_241861600" MODIFIED="1518487921094" TEXT="kommentierbar (Doxygen)"/>
|
||||
<node CREATED="1489785114574" ID="ID_241665479" MODIFIED="1518487921094" TEXT="nur unsichtbare Magie"/>
|
||||
</node>
|
||||
<node CREATED="1489785137083" ID="ID_1466955376" MODIFIED="1525124215298" TEXT="Möglichkeiten">
|
||||
<node CREATED="1489785137083" FOLDED="true" ID="ID_1466955376" MODIFIED="1533400554305" TEXT="Möglichkeiten">
|
||||
<node CREATED="1489785163216" ID="ID_1992894903" MODIFIED="1489785168547" TEXT="zu Fuß...">
|
||||
<node CREATED="1489785199131" ID="ID_111396262" MODIFIED="1489785207662" TEXT="ID-Konstanten im Header deklarieren"/>
|
||||
<node CREATED="1489785208298" ID="ID_315886293" MODIFIED="1489785222188" TEXT="ID-Konstanten in der jeweiligen translation-Unit definieren"/>
|
||||
|
|
@ -25877,7 +25896,7 @@
|
|||
</node>
|
||||
<node CREATED="1489791729957" ID="ID_1986771449" MODIFIED="1525124215299" TEXT="kombinierte Magie">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1489791798116" ID="ID_197500257" MODIFIED="1490927767187" TEXT="Definitions-Klasse">
|
||||
<node CREATED="1489791798116" FOLDED="true" ID="ID_197500257" MODIFIED="1533400573516" TEXT="Definitions-Klasse">
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1489791805675" ID="ID_1517636242" MODIFIED="1489811237752" TEXT="ist konvertierbar nach Literal">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
|
|
@ -25886,7 +25905,7 @@
|
|||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node CREATED="1489791849245" ID="ID_262482724" MODIFIED="1489791860879" TEXT="bietet interne DSL"/>
|
||||
<node CREATED="1489795277835" ID="ID_663997649" MODIFIED="1489795286417" TEXT="Name gesucht...?">
|
||||
<node CREATED="1489795277835" FOLDED="true" ID="ID_663997649" MODIFIED="1533400569940" TEXT="Name gesucht...?">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1489795288354" ID="ID_960791386" MODIFIED="1489795346577" TEXT="CommandInstance">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
|
|
@ -25931,8 +25950,8 @@
|
|||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1490985692550" ID="ID_300485716" MODIFIED="1490985696321" TEXT="einfache Komponente"/>
|
||||
<node CREATED="1490985710963" ID="ID_447657694" MODIFIED="1490985717974" TEXT="keinerlei Lifecycle-Magie"/>
|
||||
<node CREATED="1490985720722" ID="ID_1386937508" MODIFIED="1490985736292" TEXT="ist nur eine Registry mit etwas Funktionalität">
|
||||
<node CREATED="1490986294710" ID="ID_558020871" MODIFIED="1490986301601" TEXT="Comand-IDs dekorieren"/>
|
||||
<node CREATED="1490985720722" FOLDED="true" ID="ID_1386937508" MODIFIED="1533400614400" TEXT="ist nur eine Registry mit etwas Funktionalität">
|
||||
<node CREATED="1490986294710" ID="ID_558020871" MODIFIED="1533400457991" TEXT="Command-IDs dekorieren"/>
|
||||
<node CREATED="1490986302197" ID="ID_1305641719" MODIFIED="1491004967731" TEXT="fortlaufenden Zähler verwalten">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
<node CREATED="1490986345879" ID="ID_1736956933" MODIFIED="1490986393723" TEXT="denn: Dispatch bedeutet Verzögerung">
|
||||
|
|
@ -31693,6 +31712,30 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1533400671533" HGAP="45" ID="ID_1357977461" MODIFIED="1533400691312" TEXT="Command-Ausführung" VSHIFT="-27">
|
||||
<icon BUILTIN="hourglass"/>
|
||||
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1533400693522" ID="ID_217032156" MODIFIED="1533400704106" TEXT="Commands sollen geloggt werden">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="14"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533400707072" ID="ID_1192893155" MODIFIED="1533401017012" TEXT="#211 handling pattern for dispatch">
|
||||
<linktarget COLOR="#ca91c2" DESTINATION="ID_1192893155" ENDARROW="Default" ENDINCLINATION="1415;0;" ID="Arrow_ID_207842771" SOURCE="ID_1072134705" STARTARROW="None" STARTINCLINATION="2581;0;"/>
|
||||
<icon BUILTIN="hourglass"/>
|
||||
</node>
|
||||
<node CREATED="1533400727749" ID="ID_345730150" MODIFIED="1533400739265" TEXT="wartet auf Storage-Backend-Entscheidung">
|
||||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
<node CREATED="1533400742979" HGAP="21" ID="ID_748308949" MODIFIED="1533400756058" TEXT="vorläufiger Hack" VSHIFT="15">
|
||||
<font BOLD="true" NAME="SansSerif" SIZE="12"/>
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1533400757737" ID="ID_1656760024" MODIFIED="1533400786323" TEXT="Präfix "test" vor CommandID">
|
||||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1533400770320" ID="ID_1945470515" MODIFIED="1533400781431" TEXT="solche Commands werden vom Dispatcher direkt ausgeführt">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1481778538165" HGAP="37" ID="ID_522398894" MODIFIED="1518487921096" TEXT="ProcDispatcher" VSHIFT="12">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1481826274018" HGAP="18" ID="ID_1916296972" MODIFIED="1518487921096" TEXT="Requirements" VSHIFT="-7">
|
||||
|
|
|
|||
Loading…
Reference in a new issue