Skip to content

Commit 2488955

Browse files
committed
Closes #94, Closes #92, Closes #91, Fixes #90, Fixes #89
1 parent cefc472 commit 2488955

31 files changed

+1445
-477
lines changed

Doc/ProjectTree.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,67 @@ Right-click a scxml file to display the context menu commands.
2626

2727
![](../Images/ProjectTree_UnitMenu.png)
2828

29+
## Post Save Unit Actions
30+
It is available to execute post save cmd script after the scxml unit file was saved
31+
32+
> NOTE: This option is available only in project mode!
33+
34+
1. Select a unit in Project Tree
35+
2. Call **`Edit Post Save`** menu item
36+
37+
![](../Images/PostSaveUnit.png)
38+
39+
3. Edit post save script
40+
41+
![](../Images/PostSaveUnit_Macro.png)
42+
43+
### Post Save Unit Commands
44+
Commands that could be executed by state machine chart editor
45+
46+
**Format:**
47+
48+
```batch
49+
$(AppFilePath) command [Unit HWND] [Command] [Arg1|Arg2|Arg3]
50+
```
51+
52+
**Example:**
53+
54+
```batch
55+
$(AppFilePath) command $(UnitHandle) SaveToSVG $(UnitFileDir)\$(UnitName).svg
56+
```
57+
58+
| Command | Arguments | Description |
59+
|---|---|---|
60+
| SaveToSVG | Arg1=FileName | Saves state chart to SVG |
61+
| SaveRawScxmlToFile | Arg1=FileName | Saves state chart to scxml without comments and metainformation |
62+
| SaveRawScxmlToHPP | Arg1=FileName | Saves state chart to scxml without comments and metainformation as C++ Header |
63+
| SaveScxmlToPas | Arg1=FileName | Saves state chart to DFM file |
64+
| SaveToDot | Arg1=FileName | Saves state chart to Graphviz DOT file |
65+
| SaveToDotPlusPng | Arg1=FileName | Saves state chart to Graphviz DOT and PNG files |
66+
| SaveToBMP | Arg1=FileName | Saves state chart to BMP file |
67+
| SaveToPNG | Arg1=FileName | Saves state chart to PNG file |
68+
69+
### Post Save Application Commands
70+
Commands that could be executed by ScxmlEditor application
71+
72+
**Format:**
73+
74+
```batch
75+
$(AppFilePath) command [App HWND] [Command] [Arg1|Arg2|Arg3]
76+
```
77+
78+
**Example:**
79+
80+
```batch
81+
$(AppFilePath) command $(AppHandle) SwitchLog Debug True
82+
```
83+
84+
| Command | Arguments | Description |
85+
|---|---|---|
86+
| SwitchLog | Arg1=Debug| Switches Log tab to Debug output |
87+
| | Arg1=CMD | Switches Log tab to CMD output |
88+
| | Arg2=True,False (Bool) | Clear output or not |
89+
90+
2991
| [TOP](#top-anchor) | [Contents](../README.md#table-of-contents) | [SCXML Wiki](https://alexzhornyak.github.io/SCXML-tutorial/) | [Forum](https://github.com/alexzhornyak/ScxmlEditor-Tutorial/discussions) |
3092
|---|---|---|---|

Doc/Transitions.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,17 @@ Multiple self transitions may be quickly arranged by pressing **'Arrange Self-co
4848

4949
![Transitions_Self_Arrange](../Images/Transitions_Self_Arrange.gif)
5050

51+
### Self Transitions Inside States
52+
It is available since ScxmlEditor 2.4 to arrange self transitions inside of state.
53+
54+
![tr_inside](../Images/Transition_Self_Inside.png)
55+
56+
1. Set option **`SelfConnectionInside`** to **`true`** in the property inspector
57+
2. Execute **`Arrange Self-Connections`** command from IDE Insight or right popup menu
58+
3. (Optionally) Align Self-Transition to left, top, right or bottom side of the state
59+
60+
![tr_align](../Images/Transition_Self_Align.gif)
61+
5162
## Delayed transition
5263
A delayed transition is a transition that happens after a period of time, specifically being in a specific state for a certain amount of time.
5364

Images/PostSaveUnit.png

19.2 KB
Loading

Images/PostSaveUnit_Macro.png

36.6 KB
Loading

Images/Transition_Self_Align.gif

284 KB
Loading

Images/Transition_Self_Inside.png

21.2 KB
Loading

README.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
**[Video overview - v.2.2](https://youtu.be/30dyXAs-m1A)**
1515

16-
# Scxml Editor 2.3
16+
# Scxml Editor 2.4
1717
Powerful tool for creating, editing and debugging SCXML charts.
1818

1919
![MainExample](Images/Inheritance_TV_example.gif)
@@ -24,18 +24,19 @@ Powerful tool for creating, editing and debugging SCXML charts.
2424
[![Discord](Images/Discord.svg)](https://discord.gg/5XWDsbEXzn)
2525

2626
### Changelog
27+
**2.4:** [Post Save Commands](Doc/ProjectTree.md#post-save-unit-actions), [Self-Transitions Inside](Doc/Transitions.md#self-transitions-inside-states) <br>
2728
**2.3:** Highlight Transitions <br>
28-
**2.2.4:** [Import QtCreator state charts](Doc/ImportStateCharts.md) <br/>
29-
**2.2.3:** [Transition indexes bugfix](https://github.com/alexzhornyak/ScxmlEditor-Tutorial/issues/66) <br/>
30-
**2.2.2:** [Option to override SmartTransitions](Doc/SmartSwitchTransitions.md#option-to-override-inverted-condition-since-scxmleditor-222) <br/>
31-
**2.2.1:** [Qt SVG Monitors Released](https://github.com/alexzhornyak/QtScxmlMonitor/blob/main/README.md) <br/>
32-
**2.2:** [Invoke ID is sending by testing apps](Doc/DebugScxmlStateCharts.md#how-to-debug-multiple-invoked-state-machines) <br/>
33-
**2.1.10:** [New breakpoints interface](Doc/DebugScxmlStateCharts.md#breakpoints) <br/>
34-
**2.1.9:** [Better handling of virtual states](Doc/VisualStateChartSplitting.md#adding-onentry-onexit-datamodel-and-invoke-to-virtual-states) <br/>
35-
**2.1.8:** [Support of custom console testing applications](Doc/DebugScxmlStateCharts.md#custom-testing-application-setup) like [SCION command-line tool](https://gitlab.com/scion-scxml/cli) <br/>
36-
**2.1.7:** [SVG Export Settings](Doc/ExportScxmlToSVG.md#svg-export-settings) <br/>
37-
**2.1.6:** UScxmlTester with EcmaScript, In() predicate autocomplete, QtScxmlTester 5.9.1->5.15 <br/>
38-
**2.1.5:** [Refactored Qt external debugger](https://github.com/alexzhornyak/QtScxmlMonitor/blob/main/README.md#qt-scxml-external-debugging-monitor) <br/>
29+
**2.2.4:** [Import QtCreator state charts](Doc/ImportStateCharts.md) <br>
30+
**2.2.3:** [Transition indexes bugfix](https://github.com/alexzhornyak/ScxmlEditor-Tutorial/issues/66) <br>
31+
**2.2.2:** [Option to override SmartTransitions](Doc/SmartSwitchTransitions.md#option-to-override-inverted-condition-since-scxmleditor-222) <br>
32+
**2.2.1:** [Qt SVG Monitors Released](https://github.com/alexzhornyak/QtScxmlMonitor/blob/main/README.md) <br>
33+
**2.2:** [Invoke ID is sending by testing apps](Doc/DebugScxmlStateCharts.md#how-to-debug-multiple-invoked-state-machines) <br>
34+
**2.1.10:** [New breakpoints interface](Doc/DebugScxmlStateCharts.md#breakpoints) <br>
35+
**2.1.9:** [Better handling of virtual states](Doc/VisualStateChartSplitting.md#adding-onentry-onexit-datamodel-and-invoke-to-virtual-states) <br>
36+
**2.1.8:** [Support of custom console testing applications](Doc/DebugScxmlStateCharts.md#custom-testing-application-setup) like [SCION command-line tool](https://gitlab.com/scion-scxml/cli) <br>
37+
**2.1.7:** [SVG Export Settings](Doc/ExportScxmlToSVG.md#svg-export-settings) <br>
38+
**2.1.6:** UScxmlTester with EcmaScript, In() predicate autocomplete, QtScxmlTester 5.9.1->5.15 <br>
39+
**2.1.5:** [Refactored Qt external debugger](https://github.com/alexzhornyak/QtScxmlMonitor/blob/main/README.md#qt-scxml-external-debugging-monitor) <br>
3940
**2.1.4:** [Export SCXML to SVG](Doc/ExportScxmlToSVG.md), [Structure View](Doc/ScxmlStructureView.md)
4041

4142
## System requirements
@@ -47,15 +48,15 @@ Powerful tool for creating, editing and debugging SCXML charts.
4748
## Installation
4849
You can find portable version as attached Zip in ScxmlEditor Github Release page
4950

50-
Latest version: **[2.3.1.1712]**
51+
Latest version: **[2.4.0.1734]**
5152

5253
### Windows Installation
5354
#### First Install
5455
1. Download from latest Release page and unpack it in any target location
5556
2. Install **ScxmlEditor\vcredist_x86.exe** for **UscxmlTester**, **Graphviz**
56-
3. Install **ScxmlEditor\vcredist_x64.exe** for **QtScxmlTester** <br/>
57+
3. Install **ScxmlEditor\vcredist_x64.exe** for **QtScxmlTester** <br>
5758
(_You may skip steps 2 and 3 if you have previously installed MSVC 2015 Update 3 redistributable_)
58-
4. Install **ScxmlEditor\UScxmlTester\vcredist_x86_vc10.exe** for **UscxmlTester** with **EcmaScript** datamodel <br/>
59+
4. Install **ScxmlEditor\UScxmlTester\vcredist_x86_vc10.exe** for **UscxmlTester** with **EcmaScript** datamodel <br>
5960
(_You may skip step 4 if you have previously installed MSVC 2010 redistributable_)
6061

6162
#### Update
@@ -123,6 +124,7 @@ Current binaries are compiled with single development licensies registered by th
123124
- Main menu
124125
- Main toolbar
125126
- [Project tree](Doc/ProjectTree.md)
127+
- [Post Save Unit](Doc/ProjectTree.md#post-save-unit-actions)
126128
- [Property inspector](Doc/PropertyInspector.md)
127129
- [SCXML source code view and live editing](Doc/LiveScxmlEdit.md)
128130
- Projects
@@ -138,6 +140,7 @@ Current binaries are compiled with single development licensies registered by th
138140
- [Chart design panel](Doc/ChartDesignPanel.md)
139141
- States and children (Shapes)
140142
- [Transitions (Connections)](Doc/Transitions.md)
143+
- [Self-Transitions](Doc/Transitions.md#self-transitions-connections)
141144
- [Smart Switch Transitions](Doc/SmartSwitchTransitions.md)
142145
- [Inheritance](Doc/Inheritance.md)
143146
- [DOT-based autolayout](Doc/DotBasedAutoLayout.md#dot-based-auto-layout)
@@ -193,14 +196,14 @@ Press **'Ctrl+.'** to call **IDE Insight dialog** where you may search for all a
193196
![StructureViewSearch](Images/StructureView_Search.png)
194197

195198
## [Debugging](Doc/DebugScxmlStateCharts.md)
196-
**ScxmlEditor** has an ability to receive and send string UDP commands: <br/>
199+
**ScxmlEditor** has an ability to receive and send string UDP commands: <br>
197200
### Receive API:
198201
- `@@@` - clear highlighted states in all statecharts
199202
- `@@@ScxmlName` - clear highlighted states in statechart where [\<scxml\>](https://alexzhornyak.github.io/SCXML-tutorial/Doc/scxml.html) 'name' is equal `ScxmlName`
200-
- `Type@ScxmlName@Msg@Id` - commands to highlight state or display message in **CallStack** panel <br/>
203+
- `Type@ScxmlName@Msg@Id` - commands to highlight state or display message in **CallStack** panel <br>
201204
**Description:**
202-
`Type` - integer type of command: `1 - AfterEnter, 2 - BeforeEnter, 3 - AfterExit, 4 - BeforeExit, 5 - Step, 6 - BeforeExecContent, 7 - AfterExecContent, 8 - BeforeInvoke, 9 - AfterInvoke, 10 - BeforeUnInvoke, 11 - AfterUnInvoke, 12 - BeforeTakingTransition, 13 - AfterTakingTransition, 14 - StableConfiguration, 15 - BeforeProcessingEvent` <br/>
203-
`ScxmlName` - name of [\<scxml\>](https://alexzhornyak.github.io/SCXML-tutorial/Doc/scxml.html) <br/>
205+
`Type` - integer type of command: `1 - AfterEnter, 2 - BeforeEnter, 3 - AfterExit, 4 - BeforeExit, 5 - Step, 6 - BeforeExecContent, 7 - AfterExecContent, 8 - BeforeInvoke, 9 - AfterInvoke, 10 - BeforeUnInvoke, 11 - AfterUnInvoke, 12 - BeforeTakingTransition, 13 - AfterTakingTransition, 14 - StableConfiguration, 15 - BeforeProcessingEvent` <br>
206+
`ScxmlName` - name of [\<scxml\>](https://alexzhornyak.github.io/SCXML-tutorial/Doc/scxml.html) <br>
204207
`Msg` - message which depends on type of command. For example: for **BeforeEnter** or **BeforeExit** - it is the id(name) of states, for **BeforeInvoke** or **BeforeUnInvoke** it is the name of invoked element, etc. </br>
205208
`Id` - [identifier of the invoked](https://alexzhornyak.github.io/SCXML-tutorial/Doc/invoke.html#id) state machine (Since ScxmlEditor 2.2). Can be empty for root machines
206209
> **BeforeEnter** graphically highlight and **BeforeExit** unhighlight the corresponding states, other commands are displayed in **CallStack** panel
@@ -209,10 +212,10 @@ Press **'Ctrl+.'** to call **IDE Insight dialog** where you may search for all a
209212
> Message format: `FromState|TransitionIndex` where `TransitionIndex` is transition xml child index
210213
211214
#### Example of commands:
212-
- `2@CalculatorStateMachine@operand1` - highlight state `operand1` in statechart **CalculatorStateMachine** <br/>
213-
- `4@CalculatorStateMachine@operand1` - unhighlight state `operand1` in statechart **CalculatorStateMachine** <br/>
214-
- `2@ScxmlSub1@isSub1@ID_SUB_1` - highlight state `isSub1` in statechart **ScxmlSub1** when [invoke Id](Doc/DebugScxmlStateCharts.md#how-to-debug-multiple-invoked-state-machines) is `ID_SUB_1` <br/>
215-
- `12@CalculatorStateMachine@operand1|0` - highlight the first transition from **operand1** state in statechart **CalculatorStateMachine** <br/>
215+
- `2@CalculatorStateMachine@operand1` - highlight state `operand1` in statechart **CalculatorStateMachine** <br>
216+
- `4@CalculatorStateMachine@operand1` - unhighlight state `operand1` in statechart **CalculatorStateMachine** <br>
217+
- `2@ScxmlSub1@isSub1@ID_SUB_1` - highlight state `isSub1` in statechart **ScxmlSub1** when [invoke Id](Doc/DebugScxmlStateCharts.md#how-to-debug-multiple-invoked-state-machines) is `ID_SUB_1` <br>
218+
- `12@CalculatorStateMachine@operand1|0` - highlight the first transition from **operand1** state in statechart **CalculatorStateMachine** <br>
216219

217220
You can also [trace the execution of the chart](Doc/DebugScxmlStateCharts.md#trace-mode) and use [breakpoints](Doc/DebugScxmlStateCharts.md#breakpoints).
218221

Src/CommonConsts.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,15 @@ struct TMatchFind {
8383
}
8484
};
8585

86+
#define SCXML_INTERPROCESS_COMMAND L"command"
87+
#define SCXML_INTERPROCESS_BUFFER_SIZE 4096
88+
89+
struct INTERPROCESS_COPYDATA
90+
{
91+
wchar_t wchCommand[SCXML_INTERPROCESS_BUFFER_SIZE];
92+
wchar_t wchArg1[SCXML_INTERPROCESS_BUFFER_SIZE];
93+
wchar_t wchArg2[SCXML_INTERPROCESS_BUFFER_SIZE];
94+
wchar_t wchArg3[SCXML_INTERPROCESS_BUFFER_SIZE];
95+
};
96+
8697
#endif

Src/ScxmlEditor.cbproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,9 +1000,9 @@ IF "%_VAR_ALL_DEFINES_%" == "%_VAR_NOT_DEBUG_%" ( copy /y $(OUTPUTPATH) $(PROJEC
10001000
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
10011001
<VersionInfo Name="AutoIncBuild">True</VersionInfo>
10021002
<VersionInfo Name="MajorVer">2</VersionInfo>
1003-
<VersionInfo Name="MinorVer">3</VersionInfo>
1004-
<VersionInfo Name="Release">1</VersionInfo>
1005-
<VersionInfo Name="Build">1712</VersionInfo>
1003+
<VersionInfo Name="MinorVer">4</VersionInfo>
1004+
<VersionInfo Name="Release">0</VersionInfo>
1005+
<VersionInfo Name="Build">1734</VersionInfo>
10061006
<VersionInfo Name="Debug">False</VersionInfo>
10071007
<VersionInfo Name="PreRelease">False</VersionInfo>
10081008
<VersionInfo Name="Special">False</VersionInfo>
@@ -1014,7 +1014,7 @@ IF "%_VAR_ALL_DEFINES_%" == "%_VAR_NOT_DEBUG_%" ( copy /y $(OUTPUTPATH) $(PROJEC
10141014
<VersionInfoKeys>
10151015
<VersionInfoKeys Name="CompanyName">alexander.zhornyak@gmail.com</VersionInfoKeys>
10161016
<VersionInfoKeys Name="FileDescription">Scxml State Charts Editor</VersionInfoKeys>
1017-
<VersionInfoKeys Name="FileVersion">2.3.1.1712</VersionInfoKeys>
1017+
<VersionInfoKeys Name="FileVersion">2.4.0.1734</VersionInfoKeys>
10181018
<VersionInfoKeys Name="InternalName"/>
10191019
<VersionInfoKeys Name="LegalCopyright">alexander.zhornyak@gmail.com</VersionInfoKeys>
10201020
<VersionInfoKeys Name="LegalTrademarks"/>

0 commit comments

Comments
 (0)