Skip to content

Commit 2c95bd7

Browse files
Doc and test updates for 2.0.4
1 parent 72a6504 commit 2c95bd7

File tree

13 files changed

+36
-10
lines changed

13 files changed

+36
-10
lines changed

art-comp-test/tests/composite_state_process_history/composite_state_process_history.art

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ capsule Top
2929
`;
3030
state NestedCompState1 {
3131
entrypoint ep_ini2;
32-
exitpoint ex2;
32+
exitpoint ex2 [[rt::properties(rule_config="X0041")]];
3333
ep_ini2 -> State1
3434
`
3535
std::cout << "transition initial nested" << std::endl;
@@ -50,7 +50,7 @@ capsule Top
5050
p_send.ev3().send();
5151
`;
5252
state CompState2 {
53-
entrypoint ep1, ep2;
53+
entrypoint ep1 [[rt::properties(rule_config="X0041")]], ep2;
5454
ep2_ep3: ep2 -> NestedCompState2.ep3 on p_rec.ev3
5555
`
5656
std::cout << "transition CompState2.ep2 --> NestedCompState2.ep3" << std::endl;
@@ -77,7 +77,7 @@ capsule Top
7777
};
7878
};
7979
};
80-
capsule Derived : Top {
80+
capsule Derived [[rt::properties(rule_config="X0041")]] : Top {
8181
statemachine {
8282
state redefine CompState1 {
8383
state Nested;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
22
group: cpp_code_generation
33
---
4-
Test generation of processHistory() when entering composite states
4+
Test generation of processHistory() when entering composite states.
5+
Note that this test case uses entry and exit points as deep history, which is not recommended (the warning that is reported for this situation is disabled).

art-comp-test/tests/port_with_predefined_protocol_no_relay/relay_test.art

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ capsule Top {
88
`
99
service behavior port external : External;
1010
service behavior port exception : Exception;
11-
service behavior port timing : Timing;
12-
service behavior port log : Log;
13-
service behavior port frame : Frame;
11+
behavior port timing : Timing;
12+
behavior port log : Log;
13+
behavior port frame : Frame;
1414

1515
statemachine {
1616
state State1, State2;

docs-sources/validation.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ You can choose to "fix" most kinds of reported problems by disabling the validat
5959
In some (unusual) cases a validation rule may report a problem on multiple elements, for example [ART_0002](#art_0002_duplicatenamesinscope) can detect that names of two or more global elements are conflicting. If you perform the Quick Fix for disabling that validation rule, a `rule_config` property will be set on one of the elements, but since the problem relates to multiple elements this will not make the problem go away. You can only turn off such validation rules by disabling them globally.
6060

6161
## Configuring Validation
62-
Validation can be configured to change which rules that should run, and what severity they should report found problems with. By default every [validation rule](#validation-rules) is enabled and uses a predefined severity level. Validation rules can be configured either globally by means of a setting, or locally by means of a property [rule_config](art-lang/index.md#rule_config). In both cases the rule configuration consists of a comma-separated list of 5 letter strings where the first letter specifies if the rule is disabled or it's severity (X,I,W,E) and remaining letters specify the rule id. For example, the rule configuration `X0003,I0004,W0009,E0005` means the following:
62+
Validation can be configured to change which rules that should run, and what severity they should report found problems with. By default every [validation rule](#validation-rules) is enabled and uses a predefined severity level. Validation rules can be configured either globally by means of a setting, or locally by means of a property [rule_config](art-lang/index.md#rule_config). In both cases the rule configuration consists of a comma-separated list of strings where the first letter specifies if the rule is disabled or it's severity (X,I,W,E) and remaining letters specify the rule id (or asterisk, to let the [configuration apply for all rules](#configuring-all-rules)). For example, the rule configuration `X0003,I0004,W0009,E0005` means the following:
6363

6464
* The rule [ART_0003_nameShouldStartWithUpperCase](#art_0003_nameshouldstartwithuppercase) is disabled
6565
* The rule [ART_0004_nameShouldStartWithLowerCase](#art_0004_nameshouldstartwithlowercase) has its severity set to Information
@@ -89,6 +89,18 @@ capsule customCapsule // no warning even if capsule name is not capitalized
8989
!!! note
9090
Local configuration of validation rules is only supported for Art files. For TC validation you cannot provide a local rule configuration in the TC file.
9191

92+
It's allowed to configure a validation rule multiple times, but the last configuration will then take precedence and override any previous configurations for that rule. For example, the rule configuration `I0041,E0041` will set the severity of [ART_0041_implicitUseOfDeepHistory](#art_0041_implicituseofdeephistory) to Error.
93+
94+
### Configuring All Rules
95+
When you configure validation rules you can replace the rule id with an asterisk (`*`) to let the configuration apply to all rules. Here are some example when this can be useful:
96+
97+
* `E*`: Report all problems with Error severity
98+
* `X*`: Disable all validation rules
99+
100+
You can combine such asterisk rule configurations with configurations of individual rules. For example:
101+
102+
* `W*, E0005`: Report all problems with Warning severity, except [ART_0005_choiceWithoutElseTransition](#art_0005_choicewithoutelsetransition) which should be reported with Error severity.
103+
92104
## Validation Rules
93105
This chapter lists all validation rules which {$product.name$} checks your Art application against. These rules find problems in Art files and all problems found have the "ART_" prefix.
94106

@@ -709,7 +721,7 @@ capsule UnwiredCapsule3 {
709721
|----------|:-------------|:-------------
710722
| Warning | The [rule_config](art-lang/index.md#rule_config) property has a malformed value. | N/A
711723

712-
The [rule_config](art-lang/index.md#rule_config) property can be set on Art elements to configure which validation rules to run for that element (and for all elements it contains). It can also be used for setting a custom severity for those rules. The value of the [rule_config](art-lang/index.md#rule_config) property should be a comma-separated list of 5 letter strings where the first letter specifies if the rule is disabled and it's severity (X,I,W,E) and remaining letters specify the rule id. See [Configuring Validation](#configuring-validation) for more information and examples.
724+
The [rule_config](art-lang/index.md#rule_config) property can be set on Art elements to configure which validation rules to run for that element (and for all elements it contains). It can also be used for setting a custom severity for those rules. The value of the [rule_config](art-lang/index.md#rule_config) property should be a comma-separated list of 5 or 2 letter strings where the first letter specifies if the rule is disabled and it's severity (X,I,W,E) and the remaining letters specify the rule id (or asterisk, to let the configuration apply for all rules). See [Configuring Validation](#configuring-validation) for more information and examples.
713725

714726
``` art
715727
capsule RCP [[rt::properties(

docs-sources/working-with-art/diagrams.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,17 @@ Both parts and ports have several properties that can be edited using the Proper
164164

165165
You can delete an Art element shown in a diagram by selecting the symbol or line that represents the element and then press the ++"Delete"++ key. Alternatively use the command **Delete** in the ++ctrl+space++ pop-up menu. Multiple symbols or lines can be selected in order to delete many Art elements in one go.
166166

167-
Note that elements are deleted by removing them from the Art file, which in turn will update the diagram. All content within the deleted element will be lost, including any comments. However, you can of course undo the deletion by pressing ++ctrl+"z"++ (**Undo**) in the Art text editor.
167+
Note that elements are deleted by removing them from the Art file, which in turn will update the diagram. All content within the deleted element will be lost, including any comments. However, you can of course undo the deletion by pressing ++ctrl+"z"++ (**Undo**) in the Art text editor.
168+
169+
## Exporting Diagrams as SVG
170+
Diagrams can be exported as SVG files. This makes it possible to include diagrams in documents such as reports and presentations. SVG (Scalable Vector Graphics) is a scalable vector format which lets exported diagrams be zoomed and resized without losing image quality. Exporting a diagram as SVG is therefore much better than taking a screenshot of it.
171+
172+
To export a diagram as SVG follow these steps:
173+
174+
1. Open the diagram
175+
2. Set-up the diagram to display the information you want to include in the exported SVG file. For example, apply [diagram filters](#diagram-filters) and [collapse or expand symbols](#collapsing-and-expanding-symbols).
176+
3. Click the "Export as SVG" button in the Properties view toolbar. You will be prompted for where to save the SVG file.
177+
178+
![](images/export-svg.png)
179+
180+
Alternatively, the command `Code RT: Export as SVG` (available in the Command Palette) can be used. It will export the diagram that is open in the currently active editor.
1.58 KB
Loading
-47 Bytes
Loading
134 Bytes
Loading
-81 Bytes
Loading
6.99 KB
Loading

0 commit comments

Comments
 (0)