From 4492b969e16627ef62d413ffe82e4360d5582b20 Mon Sep 17 00:00:00 2001 From: atheate Date: Wed, 3 Jun 2026 14:57:42 +0200 Subject: [PATCH 1/4] Supports indentation --- CLAUDE.md | 2 + .../HandleBarHelpers/TerminalWriter.cs | 30 ++- ...xtual-notation-builder-facade-template.hbs | 8 +- ...core-textual-notation-builder-template.hbs | 13 +- ...xtual-notation-shared-builder-template.hbs | 13 +- .../IndentedStringBuilderTestFixture.cs | 133 ++++++++++++ .../TextualNotationBuilderTestFixture.cs | 11 +- .../TextualNotationValidationTestFixture.cs | 11 +- .../AllocationUsageTextualNotationBuilder.cs | 13 +- ...AcceptActionUsageTextualNotationBuilder.cs | 35 ++-- .../ActionDefinitionTextualNotationBuilder.cs | 13 +- .../ActionUsageTextualNotationBuilder.cs | 51 ++--- .../ActorMembershipTextualNotationBuilder.cs | 13 +- ...ocationDefinitionTextualNotationBuilder.cs | 13 +- .../AllocationUsageTextualNotationBuilder.cs | 17 +- ...sisCaseDefinitionTextualNotationBuilder.cs | 13 +- ...AnalysisCaseUsageTextualNotationBuilder.cs | 13 +- ...AnnotatingElementTextualNotationBuilder.cs | 13 +- .../AnnotationTextualNotationBuilder.cs | 21 +- ...rtConstraintUsageTextualNotationBuilder.cs | 13 +- ...gnmentActionUsageTextualNotationBuilder.cs | 23 ++- ...ociationStructureTextualNotationBuilder.cs | 13 +- .../AssociationTextualNotationBuilder.cs | 13 +- ...tributeDefinitionTextualNotationBuilder.cs | 13 +- .../AttributeUsageTextualNotationBuilder.cs | 13 +- .../BehaviorTextualNotationBuilder.cs | 13 +- ...gConnectorAsUsageTextualNotationBuilder.cs | 13 +- .../BindingConnectorTextualNotationBuilder.cs | 17 +- ...BooleanExpressionTextualNotationBuilder.cs | 13 +- ...ulationDefinitionTextualNotationBuilder.cs | 13 +- .../CalculationUsageTextualNotationBuilder.cs | 13 +- .../CaseDefinitionTextualNotationBuilder.cs | 13 +- .../CaseUsageTextualNotationBuilder.cs | 13 +- .../ClassTextualNotationBuilder.cs | 13 +- .../ClassifierTextualNotationBuilder.cs | 25 ++- ...CollectExpressionTextualNotationBuilder.cs | 13 +- .../CommentTextualNotationBuilder.cs | 13 +- ...ConcernDefinitionTextualNotationBuilder.cs | 13 +- .../ConcernUsageTextualNotationBuilder.cs | 17 +- ...tedPortDefinitionTextualNotationBuilder.cs | 13 +- ...jugatedPortTypingTextualNotationBuilder.cs | 13 +- .../ConjugationTextualNotationBuilder.cs | 17 +- ...nectionDefinitionTextualNotationBuilder.cs | 13 +- .../ConnectionUsageTextualNotationBuilder.cs | 25 ++- .../ConnectorTextualNotationBuilder.cs | 25 ++- ...straintDefinitionTextualNotationBuilder.cs | 13 +- .../ConstraintUsageTextualNotationBuilder.cs | 21 +- ...tructorExpressionTextualNotationBuilder.cs | 13 +- .../ControlNodeTextualNotationBuilder.cs | 13 +- .../CrossSubsettingTextualNotationBuilder.cs | 13 +- .../DataTypeTextualNotationBuilder.cs | 13 +- .../DecisionNodeTextualNotationBuilder.cs | 13 +- .../DefinitionTextualNotationBuilder.cs | 29 ++- .../DependencyTextualNotationBuilder.cs | 13 +- .../DifferencingTextualNotationBuilder.cs | 13 +- .../DisjoiningTextualNotationBuilder.cs | 17 +- .../DocumentationTextualNotationBuilder.cs | 13 +- ...tFilterMembershipTextualNotationBuilder.cs | 17 +- .../ElementTextualNotationBuilder.cs | 29 ++- ...FeatureMembershipTextualNotationBuilder.cs | 29 ++- ...erationDefinitionTextualNotationBuilder.cs | 19 +- .../EnumerationUsageTextualNotationBuilder.cs | 17 +- ...ntOccurrenceUsageTextualNotationBuilder.cs | 17 +- ...ExhibitStateUsageTextualNotationBuilder.cs | 13 +- .../ExposeTextualNotationBuilder.cs | 13 +- .../ExpressionTextualNotationBuilder.cs | 47 ++--- ...reChainExpressionTextualNotationBuilder.cs | 13 +- .../FeatureChainingTextualNotationBuilder.cs | 13 +- ...tureDirectionKindTextualNotationBuilder.cs | 13 +- .../FeatureInvertingTextualNotationBuilder.cs | 17 +- ...FeatureMembershipTextualNotationBuilder.cs | 121 ++++++----- ...ferenceExpressionTextualNotationBuilder.cs | 29 ++- .../FeatureTextualNotationBuilder.cs | 185 +++++++++-------- .../FeatureTypingTextualNotationBuilder.cs | 21 +- .../FeatureValueTextualNotationBuilder.cs | 57 +++--- .../FlowDefinitionTextualNotationBuilder.cs | 13 +- .../FlowEndTextualNotationBuilder.cs | 13 +- .../FlowTextualNotationBuilder.cs | 13 +- .../FlowUsageTextualNotationBuilder.cs | 25 ++- ...orLoopActionUsageTextualNotationBuilder.cs | 13 +- .../ForkNodeTextualNotationBuilder.cs | 13 +- ...ConcernMembershipTextualNotationBuilder.cs | 13 +- .../FunctionTextualNotationBuilder.cs | 13 +- .../IfActionUsageTextualNotationBuilder.cs | 13 +- .../ImportTextualNotationBuilder.cs | 17 +- ...cludeUseCaseUsageTextualNotationBuilder.cs | 13 +- .../IndexExpressionTextualNotationBuilder.cs | 13 +- .../InteractionTextualNotationBuilder.cs | 13 +- ...terfaceDefinitionTextualNotationBuilder.cs | 13 +- .../InterfaceUsageTextualNotationBuilder.cs | 29 ++- .../IntersectingTextualNotationBuilder.cs | 13 +- .../InvariantTextualNotationBuilder.cs | 13 +- ...ocationExpressionTextualNotationBuilder.cs | 17 +- .../ItemDefinitionTextualNotationBuilder.cs | 13 +- .../ItemUsageTextualNotationBuilder.cs | 13 +- .../JoinNodeTextualNotationBuilder.cs | 13 +- .../LibraryPackageTextualNotationBuilder.cs | 13 +- .../LiteralBooleanTextualNotationBuilder.cs | 13 +- ...LiteralExpressionTextualNotationBuilder.cs | 13 +- .../LiteralInfinityTextualNotationBuilder.cs | 13 +- .../LiteralIntegerTextualNotationBuilder.cs | 13 +- .../LiteralStringTextualNotationBuilder.cs | 13 +- .../MembershipExposeTextualNotationBuilder.cs | 13 +- .../MembershipImportTextualNotationBuilder.cs | 13 +- .../MembershipTextualNotationBuilder.cs | 37 ++-- .../MergeNodeTextualNotationBuilder.cs | 13 +- .../MetaclassTextualNotationBuilder.cs | 13 +- ...aAccessExpressionTextualNotationBuilder.cs | 17 +- ...etadataDefinitionTextualNotationBuilder.cs | 13 +- .../MetadataFeatureTextualNotationBuilder.cs | 21 +- .../MetadataUsageTextualNotationBuilder.cs | 21 +- ...MultiplicityRangeTextualNotationBuilder.cs | 21 +- .../MultiplicityTextualNotationBuilder.cs | 21 +- .../NamespaceExposeTextualNotationBuilder.cs | 13 +- .../NamespaceImportTextualNotationBuilder.cs | 13 +- .../NamespaceTextualNotationBuilder.cs | 31 +-- .../NullExpressionTextualNotationBuilder.cs | 13 +- ...jectiveMembershipTextualNotationBuilder.cs | 13 +- ...urrenceDefinitionTextualNotationBuilder.cs | 21 +- .../OccurrenceUsageTextualNotationBuilder.cs | 29 ++- ...peratorExpressionTextualNotationBuilder.cs | 45 ++-- .../OwningMembershipTextualNotationBuilder.cs | 77 ++++--- .../PackageTextualNotationBuilder.cs | 31 +-- ...rameterMembershipTextualNotationBuilder.cs | 73 ++++--- .../PartDefinitionTextualNotationBuilder.cs | 13 +- .../PartUsageTextualNotationBuilder.cs | 21 +- .../PayloadFeatureTextualNotationBuilder.cs | 13 +- ...erformActionUsageTextualNotationBuilder.cs | 27 +-- .../PortConjugationTextualNotationBuilder.cs | 13 +- .../PortDefinitionTextualNotationBuilder.cs | 13 +- .../PortUsageTextualNotationBuilder.cs | 21 +- .../PortionKindTextualNotationBuilder.cs | 13 +- .../PredicateTextualNotationBuilder.cs | 13 +- .../RedefinitionTextualNotationBuilder.cs | 25 ++- ...ferenceSubsettingTextualNotationBuilder.cs | 17 +- .../ReferenceUsageTextualNotationBuilder.cs | 73 ++++--- .../RelationshipTextualNotationBuilder.cs | 19 +- ...nderingDefinitionTextualNotationBuilder.cs | 13 +- .../RenderingUsageTextualNotationBuilder.cs | 17 +- ...straintMembershipTextualNotationBuilder.cs | 17 +- ...irementDefinitionTextualNotationBuilder.cs | 13 +- .../RequirementUsageTextualNotationBuilder.cs | 21 +- ...icationMembershipTextualNotationBuilder.cs | 13 +- ...ressionMembershipTextualNotationBuilder.cs | 13 +- ...rameterMembershipTextualNotationBuilder.cs | 25 ++- ...yRequirementUsageTextualNotationBuilder.cs | 13 +- .../SelectExpressionTextualNotationBuilder.cs | 13 +- .../SendActionUsageTextualNotationBuilder.cs | 31 +-- .../SharedTextualNotationBuilder.cs | 29 ++- .../SpecializationTextualNotationBuilder.cs | 25 ++- ...eholderMembershipTextualNotationBuilder.cs | 13 +- .../StateDefinitionTextualNotationBuilder.cs | 19 +- ...bactionMembershipTextualNotationBuilder.cs | 21 +- .../StateUsageTextualNotationBuilder.cs | 19 +- .../StepTextualNotationBuilder.cs | 13 +- .../StructureTextualNotationBuilder.cs | 13 +- ...SubclassificationTextualNotationBuilder.cs | 17 +- ...SubjectMembershipTextualNotationBuilder.cs | 17 +- .../SubsettingTextualNotationBuilder.cs | 17 +- ...SuccessionAsUsageTextualNotationBuilder.cs | 21 +- .../SuccessionFlowTextualNotationBuilder.cs | 13 +- ...ccessionFlowUsageTextualNotationBuilder.cs | 13 +- .../SuccessionTextualNotationBuilder.cs | 21 +- ...minateActionUsageTextualNotationBuilder.cs | 13 +- ...ualRepresentationTextualNotationBuilder.cs | 13 +- ...FeatureMembershipTextualNotationBuilder.cs | 21 +- .../TransitionUsageTextualNotationBuilder.cs | 29 ++- ...ocationExpressionTextualNotationBuilder.cs | 13 +- .../TypeFeaturingTextualNotationBuilder.cs | 17 +- .../TypeTextualNotationBuilder.cs | 147 ++++++++------ .../UnioningTextualNotationBuilder.cs | 13 +- .../UsageTextualNotationBuilder.cs | 89 ++++---- ...UseCaseDefinitionTextualNotationBuilder.cs | 13 +- .../UseCaseUsageTextualNotationBuilder.cs | 13 +- ...VariantMembershipTextualNotationBuilder.cs | 17 +- ...ionCaseDefinitionTextualNotationBuilder.cs | 13 +- ...ficationCaseUsageTextualNotationBuilder.cs | 13 +- .../ViewDefinitionTextualNotationBuilder.cs | 23 ++- ...nderingMembershipTextualNotationBuilder.cs | 13 +- .../ViewUsageTextualNotationBuilder.cs | 23 ++- ...ewpointDefinitionTextualNotationBuilder.cs | 13 +- .../ViewpointUsageTextualNotationBuilder.cs | 13 +- .../VisibilityKindTextualNotationBuilder.cs | 13 +- ...leLoopActionUsageTextualNotationBuilder.cs | 13 +- .../BindingConnectorTextualNotationBuilder.cs | 13 +- .../ClassifierTextualNotationBuilder.cs | 13 +- .../ConcernUsageTextualNotationBuilder.cs | 13 +- ...jugatedPortTypingTextualNotationBuilder.cs | 13 +- .../ConnectionUsageTextualNotationBuilder.cs | 13 +- .../ConnectorTextualNotationBuilder.cs | 17 +- .../ConstraintUsageTextualNotationBuilder.cs | 13 +- .../Writers/ElementTextualNotationBuilder.cs | 9 +- .../ExpressionTextualNotationBuilder.cs | 13 +- ...FeatureMembershipTextualNotationBuilder.cs | 25 ++- .../Writers/FeatureTextualNotationBuilder.cs | 41 ++-- .../FeatureValueTextualNotationBuilder.cs | 13 +- .../Writers/FlowTextualNotationBuilder.cs | 13 +- .../FlowUsageTextualNotationBuilder.cs | 17 +- .../IfActionUsageTextualNotationBuilder.cs | 9 +- .../Writers/IndentedStringBuilder.cs | 192 ++++++++++++++++++ .../InterfaceUsageTextualNotationBuilder.cs | 13 +- ...ocationExpressionTextualNotationBuilder.cs | 13 +- ...LiteralExpressionTextualNotationBuilder.cs | 13 +- .../NamespaceImportTextualNotationBuilder.cs | 13 +- ...peratorExpressionTextualNotationBuilder.cs | 17 +- .../OwningMembershipTextualNotationBuilder.cs | 9 +- .../Writers/PackageTextualNotationBuilder.cs | 13 +- .../ReferenceUsageTextualNotationBuilder.cs | 13 +- .../RelationshipTextualNotationBuilder.cs | 13 +- .../RenderingUsageTextualNotationBuilder.cs | 13 +- .../RequirementUsageTextualNotationBuilder.cs | 13 +- .../SendActionUsageTextualNotationBuilder.cs | 17 +- .../Writers/SharedTextualNotationBuilder.cs | 57 +++--- .../SuccessionFlowTextualNotationBuilder.cs | 13 +- .../SuccessionTextualNotationBuilder.cs | 13 +- .../TransitionUsageTextualNotationBuilder.cs | 13 +- ...ocationExpressionTextualNotationBuilder.cs | 13 +- .../Writers/TypeTextualNotationBuilder.cs | 29 ++- 218 files changed, 2409 insertions(+), 2227 deletions(-) create mode 100644 SysML2.NET.Serializer.TextualNotation.Tests/Writers/IndentedStringBuilderTestFixture.cs create mode 100644 SysML2.NET.Serializer.TextualNotation/Writers/IndentedStringBuilder.cs diff --git a/CLAUDE.md b/CLAUDE.md index 3fcd2f47..c83c05ea 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -191,6 +191,8 @@ Direct pushes to `development` or `master` are forbidden. All work lives on a fe - Use meaningful variable names instead of single-letter names in any context (e.g., 'charIndex' instead of 'i', 'currentChar' instead of 'c', 'element' instead of 'e') - Use 'NotSupportedException' (not 'NotImplementedException') for placeholder/stub methods that require manual implementation - Prefer C# property patterns ('x is IType { Prop: value }') over declared-variable-plus-predicate form ('x is IType name && name.Prop == value') when the narrowed variable is only consulted once; the property-pattern form is more concise and intent-revealing +- **Always use C# auto-properties** (`public T Foo { get; private set; }`, `public T Foo { get; init; }`, `public T Foo { get; }`) — NEVER pair a private backing field with an expression-bodied or full-getter property when there is no non-trivial logic (validation, normalisation, lazy init, event firing). Mere storage is never a justification for a backing field; the compiler collapses auto-properties to the same IL. +- **For test fixtures: default to ONE `[Test]` method per class / method-under-test** packing every scenario (happy path, edge cases, null guards, alternate inputs) into multiple `Assert.That` calls inside that one test — per `TESTING.md` §2. Do NOT write one `[Test]` per scenario when the setup is shared; that produces a bloated test list and duplicated arrange boilerplate. Split into separate `[Test]` methods only when each scenario has a genuinely distinct, complex setup. - Surround every braced block (`if`, `else if`, `while`, `for`, `foreach`, `switch`, `using`, `try`/`catch`/`finally`, `lock`, `do…while`, anonymous `{ }`) with a blank line on both sides — the rule does NOT apply at the very start/end of a method body, nor between a `}` and a continuation keyword (`else`, `catch`, `finally`, `while` of `do…while`) that belongs to the same control flow - When invoking an operation or derived property on a POCO from inside an extension method, call the POCO's instance member (e.g. `subject.IsDistinguishableFrom(other)`, `subject.qualifiedName`), NOT the static `ComputeXxxOperation` / `ComputeXxx` extension method. Virtual dispatch on the POCO honors operation/property REDEFINITION in subclass POCOs; calling the static extension directly bypasses dispatch and silently skips overrides. The static-extension form is reserved EXCLUSIVELY for the C# translation of OCL `self.oclAsType(SuperType).method()` — an explicit upcast that mandates targeting the SuperType's body (e.g. `Usage::namingFeature()` → `FeatureExtensions.ComputeNamingFeatureOperation(usage)`; `OwningMembership::path()` → `RelationshipExtensions.ComputeRedefinedPathOperation(owningMembership)`) - **`IRelationship.OwnedRelatedElement` and `IElement.OwnedRelationship` storage collections are `[0..*]` — NEVER cardinality-limited.** The [1..1] / [0..1] multiplicities that appear in the metamodel apply to *derived* / *redefined* properties (e.g. `OwningMembership::ownedMemberElement`, `FeatureMembership::ownedMemberFeature`, `SubjectMembership::ownedSubjectParameter`), NOT to the underlying storage. When implementing such a derivation, **project from the collection — do not assume positional indexing**. For the common case of a `[1..1]` derived property, use the canonical shared helper `ElementExtensions.RequireSingleOfType(this IReadOnlyList, string)` from `SysML2.NET/Extensions/ElementExtensions.cs` — it does a zero-allocation index-based scan, early-exits on the second match, and throws `IncompleteModelException` with distinct "missing" vs "more than one" diagnostics: diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/TerminalWriter.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/TerminalWriter.cs index 5289e59a..0d2bf705 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/TerminalWriter.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/TerminalWriter.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -52,12 +52,23 @@ internal static void WriteTerminalAppend(EncodedTextWriter writer, string termin { if (NewLineTerminals.Contains(terminalValue)) { + if (terminalValue == "}") + { + writer.WriteSafeString($"stringBuilder.DecreaseIndent();{Environment.NewLine}"); + } + if (terminalValue == "{") { writer.WriteSafeString($"stringBuilder.Append(' ');{Environment.NewLine}"); } writer.WriteSafeString($"stringBuilder.AppendLine(\"{terminalValue}\");"); + + if (terminalValue == "{") + { + writer.WriteSafeString($"{Environment.NewLine}stringBuilder.IncreaseIndent();"); + } + return; } @@ -86,7 +97,18 @@ internal static void WriteTerminalAppendWithLeadingSpace(EncodedTextWriter write { if (NewLineTerminals.Contains(terminalValue)) { + if (terminalValue == "}") + { + writer.WriteSafeString($"stringBuilder.DecreaseIndent();{Environment.NewLine}"); + } + writer.WriteSafeString($"stringBuilder.AppendLine(\"{terminalValue}\");"); + + if (terminalValue == "{") + { + writer.WriteSafeString($"{Environment.NewLine}stringBuilder.IncreaseIndent();"); + } + return; } diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs index d213272f..262d767a 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-facade-template.hbs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs index 719c6e7c..9707f02a 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-builder-template.hbs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -41,8 +40,8 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void Build{{rule.RuleName}}({{ #NamedElement.WriteFullyQualifiedTypeName ../this.Context }} poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void Build{{rule.RuleName}}({{ #NamedElement.WriteFullyQualifiedTypeName ../this.Context }} poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { {{RulesHelper.WriteRule rule ../this.Context ../this.AllRules}} } diff --git a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-shared-builder-template.hbs b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-shared-builder-template.hbs index 35402f27..943e07b8 100644 --- a/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-shared-builder-template.hbs +++ b/SysML2.NET.CodeGenerator/Templates/Uml/core-textual-notation-shared-builder-template.hbs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -44,8 +43,8 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void Build{{entry.Rule.RuleName}}({{ #NamedElement.WriteFullyQualifiedTypeName entry.TargetClass }} poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void Build{{entry.Rule.RuleName}}({{ #NamedElement.WriteFullyQualifiedTypeName entry.TargetClass }} poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { {{RulesHelper.WriteRule entry.Rule entry.TargetClass ../this.AllRules}} } diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/IndentedStringBuilderTestFixture.cs b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/IndentedStringBuilderTestFixture.cs new file mode 100644 index 00000000..cba15491 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/IndentedStringBuilderTestFixture.cs @@ -0,0 +1,133 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.TextualNotation.Tests.Writers +{ + using System; + + using NUnit.Framework; + + using SysML2.NET.Serializer.TextualNotation.Writers; + + /// + /// Test fixture for : verifies that the wrapper emits + /// the configured 4-space indent prefix at the start of every new line, that + /// / + /// nest correctly, that the underflow + /// guard prevents going negative, and + /// that empty-line never produces + /// trailing whitespace. + /// + [TestFixture] + public class IndentedStringBuilderTestFixture + { + [Test] + public void VerifyIndentedStringBuilder() + { + // Initial state — fresh builder is empty and at indent level 0. + var builder = new IndentedStringBuilder(); + + using (Assert.EnterMultipleScope()) + { + Assert.That(builder.IndentLevel, Is.EqualTo(0)); + Assert.That(builder.ToString(), Is.EqualTo(string.Empty)); + } + + // Append at zero indent — content emitted verbatim. + builder.Append("package ").Append("Foo").Append(' ').Append('{'); + + Assert.That(builder.ToString(), Is.EqualTo("package Foo {")); + + // AppendLine arms indent emission; IncreaseIndent affects the next Append. + builder.AppendLine(); + builder.IncreaseIndent(); + builder.Append("part p;"); + + using (Assert.EnterMultipleScope()) + { + Assert.That(builder.IndentLevel, Is.EqualTo(1)); + Assert.That(builder.ToString(), Is.EqualTo($"package Foo {{{Environment.NewLine} part p;")); + } + + // Indent is emitted only once per logical line — subsequent Append on the same + // line stays adjacent to the previous content. + builder.Append(" /*comment*/"); + + Assert.That(builder.ToString(), Is.EqualTo($"package Foo {{{Environment.NewLine} part p; /*comment*/")); + + // Null/empty Append is a no-op AND does NOT disarm the indent prefix. + builder.AppendLine(); + builder.Append((string)null).Append(string.Empty).Append("attribute mass;"); + + Assert.That(builder.ToString(), Is.EqualTo( + $"package Foo {{{Environment.NewLine} part p; /*comment*/{Environment.NewLine} attribute mass;")); + + // Nested block — IncreaseIndent stacks; DecreaseIndent before closing brace lets + // `}` align with its parent declaration. + builder.AppendLine(); + builder.AppendLine("part def Engine {"); + builder.IncreaseIndent(); + builder.AppendLine("attribute power;"); + builder.DecreaseIndent(); + builder.AppendLine("}"); + builder.DecreaseIndent(); + builder.AppendLine("}"); + + var expected = + $"package Foo {{{Environment.NewLine}" + + $" part p; /*comment*/{Environment.NewLine}" + + $" attribute mass;{Environment.NewLine}" + + $" part def Engine {{{Environment.NewLine}" + + $" attribute power;{Environment.NewLine}" + + $" }}{Environment.NewLine}" + + $"}}{Environment.NewLine}"; + + using (Assert.EnterMultipleScope()) + { + Assert.That(builder.IndentLevel, Is.EqualTo(0)); + Assert.That(builder.ToString(), Is.EqualTo(expected)); + } + + // Underflow guard — DecreaseIndent at level 0 is a no-op, never goes negative. + builder.DecreaseIndent(); + builder.DecreaseIndent(); + + Assert.That(builder.IndentLevel, Is.EqualTo(0)); + + // Empty-line AppendLine() never produces trailing whitespace, even with indent armed. + var emptyLineBuilder = new IndentedStringBuilder(); + emptyLineBuilder.IncreaseIndent(); + emptyLineBuilder.AppendLine(); + emptyLineBuilder.Append("x"); + + Assert.That(emptyLineBuilder.ToString(), Is.EqualTo($"{Environment.NewLine} x")); + + // Fluent chaining — every mutator returns the same instance. + var chainBuilder = new IndentedStringBuilder(); + var chainResult = chainBuilder.Append("a").Append(' ').Append("b").AppendLine().AppendLine("c"); + + using (Assert.EnterMultipleScope()) + { + Assert.That(chainResult, Is.SameAs(chainBuilder)); + Assert.That(chainBuilder.ToString(), Is.EqualTo($"a b{Environment.NewLine}c{Environment.NewLine}")); + } + } + } +} diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationBuilderTestFixture.cs b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationBuilderTestFixture.cs index fed9cb57..59fff3ff 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationBuilderTestFixture.cs +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationBuilderTestFixture.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -22,7 +22,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Tests.Writers { using System; using System.IO; - using System.Text; using Microsoft.Extensions.Logging; @@ -82,7 +81,7 @@ public void Verify_that_textual_notation_is_produced_from_Quantities_root_namesp { using var writerContext = new TextualNotationWriterContext(this.rootNamespace); writerContext.EmitOperatorParentheses = false; - var stringBuilder = new StringBuilder(); + var stringBuilder = new IndentedStringBuilder(); try { diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs index d446ba58..3768e5f0 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationValidationTestFixture.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright (C) 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -23,7 +23,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Tests.Writers using System; using System.IO; using System.Linq; - using System.Text; using System.Threading; using System.Threading.Tasks; @@ -64,7 +63,7 @@ public async Task VerifyValidationTextualNotationXmi(string folderName, string f using var writerContext = new TextualNotationWriterContext(rootNamespace); writerContext.EmitOperatorParentheses = false; - var stringBuilder = new StringBuilder(); + var stringBuilder = new IndentedStringBuilder(); try { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AllocationUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AllocationUsageTextualNotationBuilder.cs index ae0d920a..bd89d554 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AllocationUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AllocationUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -37,7 +36,7 @@ public static partial class AllocationUsageTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// AllocationUsageDeclaration : AllocationUsage = /// 'allocation' UsageDeclaration ( 'allocate' ConnectorPart )? @@ -45,7 +44,7 @@ public static partial class AllocationUsageTextualNotationBuilder /// /// Auto-gen delegates entirely to this method. /// - private static void BuildAllocationUsageDeclarationHandCoded(IAllocationUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildAllocationUsageDeclarationHandCoded(IAllocationUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs index 3bea6ae7..428bf6ad 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AcceptActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AcceptActionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAcceptNode(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAcceptNode(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); BuildAcceptNodeDeclaration(poco, writerContext, stringBuilder); @@ -55,8 +54,8 @@ public static void BuildAcceptNode(SysML2.NET.Core.POCO.Systems.Actions.IAcceptA /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAcceptNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAcceptNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -75,8 +74,8 @@ public static void BuildAcceptNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actio /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAcceptParameterPart(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAcceptParameterPart(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -116,8 +115,8 @@ public static void BuildAcceptParameterPart(SysML2.NET.Core.POCO.Systems.Actions /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStateAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStateAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildAcceptNodeDeclaration(poco, writerContext, stringBuilder); TypeTextualNotationBuilder.BuildActionBody(poco, writerContext, stringBuilder); @@ -130,8 +129,8 @@ public static void BuildStateAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Acti /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTriggerAction(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTriggerAction(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildAcceptParameterPart(poco, writerContext, stringBuilder); @@ -143,8 +142,8 @@ public static void BuildTriggerAction(SysML2.NET.Core.POCO.Systems.Actions.IAcce /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTransitionAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTransitionAcceptActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAcceptActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildAcceptNodeDeclaration(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -153,11 +152,13 @@ public static void BuildTransitionAcceptActionUsage(SysML2.NET.Core.POCO.Systems { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); while (ownedRelationshipCursor.Current != null) { TypeTextualNotationBuilder.BuildActionBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs index 77c545b3..159d5f50 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ActionDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionDefinition(SysML2.NET.Core.POCO.Systems.Actions.IActionDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionDefinition(SysML2.NET.Core.POCO.Systems.Actions.IActionDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("action "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs index 87e5b459..50dc4760 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ActionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildUsageDeclaration(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -59,8 +58,8 @@ public static void BuildActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Acti /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionNode(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionNode(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -98,8 +97,8 @@ public static void BuildActionNode(SysML2.NET.Core.POCO.Systems.Actions.IActionU /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionNodeUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionNodeUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("action "); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -117,8 +116,8 @@ public static void BuildActionNodeUsageDeclaration(SysML2.NET.Core.POCO.Systems. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionNodePrefix(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionNodePrefix(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -136,8 +135,8 @@ public static void BuildActionNodePrefix(SysML2.NET.Core.POCO.Systems.Actions.IA /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAssignmentNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAssignmentNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -191,8 +190,8 @@ public static void BuildAssignmentNodeDeclaration(SysML2.NET.Core.POCO.Systems.A /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionBodyParameter(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionBodyParameter(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -208,11 +207,13 @@ public static void BuildActionBodyParameter(SysML2.NET.Core.POCO.Systems.Actions stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); while (ownedRelationshipCursor.Current != null) { TypeTextualNotationBuilder.BuildActionBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -223,8 +224,8 @@ public static void BuildActionBodyParameter(SysML2.NET.Core.POCO.Systems.Actions /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStateActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStateActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -254,8 +255,8 @@ public static void BuildStateActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IA /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEmptyActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEmptyActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } @@ -266,8 +267,8 @@ public static void BuildEmptyActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IA /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEffectBehaviorUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEffectBehaviorUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -296,8 +297,8 @@ public static void BuildEffectBehaviorUsage(SysML2.NET.Core.POCO.Systems.Actions /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("action "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs index 69a860d4..3bf9861d 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ActorMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ActorMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActorMember(SysML2.NET.Core.POCO.Systems.Requirements.IActorMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActorMember(SysML2.NET.Core.POCO.Systems.Requirements.IActorMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs index fab7d981..894a617f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AllocationDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AllocationDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAllocationDefinition(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAllocationDefinition(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("allocation "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs index 8d343374..132d0d73 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AllocationUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AllocationUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAllocationUsageDeclaration(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAllocationUsageDeclaration(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildAllocationUsageDeclarationHandCoded(poco, writerContext, stringBuilder); } @@ -52,8 +51,8 @@ public static void BuildAllocationUsageDeclaration(SysML2.NET.Core.POCO.Systems. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAllocationUsage(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAllocationUsage(SysML2.NET.Core.POCO.Systems.Allocations.IAllocationUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); BuildAllocationUsageDeclaration(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs index ea26e27c..aa539414 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnalysisCaseDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AnalysisCaseDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAnalysisCaseDefinition(SysML2.NET.Core.POCO.Systems.AnalysisCases.IAnalysisCaseDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAnalysisCaseDefinition(SysML2.NET.Core.POCO.Systems.AnalysisCases.IAnalysisCaseDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("analysis "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs index f8ea0293..53edb9a7 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnalysisCaseUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AnalysisCaseUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAnalysisCaseUsage(SysML2.NET.Core.POCO.Systems.AnalysisCases.IAnalysisCaseUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAnalysisCaseUsage(SysML2.NET.Core.POCO.Systems.AnalysisCases.IAnalysisCaseUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("analysis "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs index 9e74257c..c6f16c13 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnnotatingElementTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AnnotatingElementTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAnnotatingElement(SysML2.NET.Core.POCO.Root.Annotations.IAnnotatingElement poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAnnotatingElement(SysML2.NET.Core.POCO.Root.Annotations.IAnnotatingElement poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs index 5f317765..a7d52aab 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AnnotationTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AnnotationTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -64,8 +63,8 @@ public static void BuildOwnedAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IA /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPrefixMetadataAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPrefixMetadataAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("#"); @@ -87,8 +86,8 @@ public static void BuildPrefixMetadataAnnotation(SysML2.NET.Core.POCO.Root.Annot /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAnnotation(SysML2.NET.Core.POCO.Root.Annotations.IAnnotation poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.AnnotatedElement != null) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs index 9f361192..fc86d18f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssertConstraintUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AssertConstraintUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAssertConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IAssertConstraintUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAssertConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IAssertConstraintUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs index 67c0fb80..97978231 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssignmentActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AssignmentActionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAssignmentNode(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAssignmentNode(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, writerContext, stringBuilder); @@ -55,8 +54,8 @@ public static void BuildAssignmentNode(SysML2.NET.Core.POCO.Systems.Actions.IAss /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStateAssignmentActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStateAssignmentActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, writerContext, stringBuilder); TypeTextualNotationBuilder.BuildActionBody(poco, writerContext, stringBuilder); @@ -69,8 +68,8 @@ public static void BuildStateAssignmentActionUsage(SysML2.NET.Core.POCO.Systems. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTransitionAssignmentActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTransitionAssignmentActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IAssignmentActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { ActionUsageTextualNotationBuilder.BuildAssignmentNodeDeclaration(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -79,11 +78,13 @@ public static void BuildTransitionAssignmentActionUsage(SysML2.NET.Core.POCO.Sys { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); while (ownedRelationshipCursor.Current != null) { TypeTextualNotationBuilder.BuildActionBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs index f9097ef9..e467d09c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssociationStructureTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AssociationStructureTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAssociationStructure(SysML2.NET.Core.POCO.Kernel.Associations.IAssociationStructure poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAssociationStructure(SysML2.NET.Core.POCO.Kernel.Associations.IAssociationStructure poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("assoc "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs index ffd69633..32233c0a 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AssociationTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AssociationTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAssociation(SysML2.NET.Core.POCO.Kernel.Associations.IAssociation poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAssociation(SysML2.NET.Core.POCO.Kernel.Associations.IAssociation poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("assoc "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs index cd1f4967..e2d866c8 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AttributeDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AttributeDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAttributeDefinition(SysML2.NET.Core.POCO.Systems.Attributes.IAttributeDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAttributeDefinition(SysML2.NET.Core.POCO.Systems.Attributes.IAttributeDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { DefinitionTextualNotationBuilder.BuildDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("attribute "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs index d632216b..2915dfb1 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/AttributeUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class AttributeUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAttributeUsage(SysML2.NET.Core.POCO.Systems.Attributes.IAttributeUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAttributeUsage(SysML2.NET.Core.POCO.Systems.Attributes.IAttributeUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("attribute "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs index 6b4696b5..657a2bbc 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BehaviorTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class BehaviorTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBehavior(SysML2.NET.Core.POCO.Kernel.Behaviors.IBehavior poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBehavior(SysML2.NET.Core.POCO.Kernel.Behaviors.IBehavior poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("behavior "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs index b90a5f7c..0cf7effb 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BindingConnectorAsUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class BindingConnectorAsUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBindingConnectorAsUsage(SysML2.NET.Core.POCO.Systems.Connections.IBindingConnectorAsUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBindingConnectorAsUsage(SysML2.NET.Core.POCO.Systems.Connections.IBindingConnectorAsUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); UsageTextualNotationBuilder.BuildUsagePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs index 1defbad4..5b586718 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BindingConnectorTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class BindingConnectorTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBindingConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IBindingConnector poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBindingConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IBindingConnector poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildBindingConnectorDeclarationHandCoded(poco, writerContext, stringBuilder); } @@ -52,8 +51,8 @@ public static void BuildBindingConnectorDeclaration(SysML2.NET.Core.POCO.Kernel. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBindingConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IBindingConnector poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBindingConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IBindingConnector poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeaturePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("binding "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs index 3363d73f..50ad6d24 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/BooleanExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class BooleanExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBooleanExpression(SysML2.NET.Core.POCO.Kernel.Functions.IBooleanExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBooleanExpression(SysML2.NET.Core.POCO.Kernel.Functions.IBooleanExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeaturePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("bool "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs index 387335cd..eef51959 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CalculationDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class CalculationDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCalculationDefinition(SysML2.NET.Core.POCO.Systems.Calculations.ICalculationDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCalculationDefinition(SysML2.NET.Core.POCO.Systems.Calculations.ICalculationDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("calc "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs index 591681b1..e3b64ae0 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CalculationUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class CalculationUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCalculationUsage(SysML2.NET.Core.POCO.Systems.Calculations.ICalculationUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCalculationUsage(SysML2.NET.Core.POCO.Systems.Calculations.ICalculationUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("calc "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs index 0138c4ed..2cc05d4c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CaseDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class CaseDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCaseDefinition(SysML2.NET.Core.POCO.Systems.Cases.ICaseDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCaseDefinition(SysML2.NET.Core.POCO.Systems.Cases.ICaseDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("case "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs index b6f35d21..3062c848 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CaseUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class CaseUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCaseUsage(SysML2.NET.Core.POCO.Systems.Cases.ICaseUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCaseUsage(SysML2.NET.Core.POCO.Systems.Cases.ICaseUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("case "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs index 971af20f..2fc06f01 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ClassTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ClassTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildClass(SysML2.NET.Core.POCO.Kernel.Classes.IClass poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildClass(SysML2.NET.Core.POCO.Kernel.Classes.IClass poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("class "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs index 7be640be..42ee426a 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ClassifierTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ClassifierTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSubclassificationPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSubclassificationPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(" :> "); @@ -81,8 +80,8 @@ public static void BuildSubclassificationPart(SysML2.NET.Core.POCO.Core.Classifi /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -125,8 +124,8 @@ public static void BuildClassifierDeclaration(SysML2.NET.Core.POCO.Core.Classifi /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSuperclassingPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSuperclassingPart(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(" :> "); @@ -166,8 +165,8 @@ public static void BuildSuperclassingPart(SysML2.NET.Core.POCO.Core.Classifiers. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildClassifier(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildClassifier(SysML2.NET.Core.POCO.Core.Classifiers.IClassifier poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("classifier "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs index b2856545..85ac6d94 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CollectExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class CollectExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCollectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ICollectExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCollectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ICollectExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs index 61ee4456..bd6bbb50 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class CommentTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildComment(SysML2.NET.Core.POCO.Root.Annotations.IComment poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildComment(SysML2.NET.Core.POCO.Root.Annotations.IComment poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs index 9d426faa..3ea51d19 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConcernDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConcernDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConcernDefinition(SysML2.NET.Core.POCO.Systems.Requirements.IConcernDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConcernDefinition(SysML2.NET.Core.POCO.Systems.Requirements.IConcernDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("concern "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs index 25e2afc0..b1652c58 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConcernUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConcernUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFramedConcernUsage(SysML2.NET.Core.POCO.Systems.Requirements.IConcernUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFramedConcernUsage(SysML2.NET.Core.POCO.Systems.Requirements.IConcernUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildFramedConcernUsageHandCoded(poco, writerContext, stringBuilder); } @@ -52,8 +51,8 @@ public static void BuildFramedConcernUsage(SysML2.NET.Core.POCO.Systems.Requirem /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConcernUsage(SysML2.NET.Core.POCO.Systems.Requirements.IConcernUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConcernUsage(SysML2.NET.Core.POCO.Systems.Requirements.IConcernUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("concern "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs index fb5bc489..17092e18 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugatedPortDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConjugatedPortDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConjugatedPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConjugatedPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs index e4daed84..4806fdc5 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugatedPortTypingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConjugatedPortTypingTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConjugatedPortTyping(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortTyping poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConjugatedPortTyping(SysML2.NET.Core.POCO.Systems.Ports.IConjugatedPortTyping poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("~"); BuildConjugatedPortTypingHandCoded(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs index d403618b..211bfd39 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConjugationTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConjugationTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedConjugation(SysML2.NET.Core.POCO.Core.Types.IConjugation poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedConjugation(SysML2.NET.Core.POCO.Core.Types.IConjugation poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.OriginalType) && poco.OriginalType is SysML2.NET.Core.POCO.Core.Features.IFeature chainedOriginalTypeAsFeature) { @@ -61,8 +60,8 @@ public static void BuildOwnedConjugation(SysML2.NET.Core.POCO.Core.Types.IConjug /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConjugation(SysML2.NET.Core.POCO.Core.Types.IConjugation poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConjugation(SysML2.NET.Core.POCO.Core.Types.IConjugation poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName)) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs index 4cc9d754..e1f91ab4 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectionDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConnectionDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConnectionDefinition(SysML2.NET.Core.POCO.Systems.Connections.IConnectionDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConnectionDefinition(SysML2.NET.Core.POCO.Systems.Connections.IConnectionDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("connection "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs index b0bcfe60..1994214c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConnectionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -61,8 +60,8 @@ public static void BuildConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.I /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBinaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBinaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -97,8 +96,8 @@ public static void BuildBinaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connect /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("("); @@ -151,8 +150,8 @@ public static void BuildNaryConnectorPart(SysML2.NET.Core.POCO.Systems.Connectio /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConnectionUsage(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConnectionUsage(SysML2.NET.Core.POCO.Systems.Connections.IConnectionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); BuildConnectionUsageHandCoded(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs index 48997eea..c3d796da 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConnectorTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConnectorTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -61,8 +60,8 @@ public static void BuildConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connect /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBinaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBinaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); BuildBinaryConnectorDeclarationHandCoded(poco, writerContext, stringBuilder); @@ -98,8 +97,8 @@ public static void BuildBinaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.C /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); var ownedTypeFeaturingCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedTypeFeaturing", poco.ownedTypeFeaturing); @@ -158,8 +157,8 @@ public static void BuildNaryConnectorDeclaration(SysML2.NET.Core.POCO.Kernel.Con /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConnector(SysML2.NET.Core.POCO.Kernel.Connectors.IConnector poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeaturePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("connector "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs index 8d201a57..f70c0e55 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstraintDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConstraintDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConstraintDefinition(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConstraintDefinition(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("constraint "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs index 8b5ebbc2..25c23b31 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstraintUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConstraintUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConstraintUsageDeclaration(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConstraintUsageDeclaration(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildUsageDeclaration(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -59,8 +58,8 @@ public static void BuildConstraintUsageDeclaration(SysML2.NET.Core.POCO.Systems. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRequirementConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRequirementConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildRequirementConstraintUsageHandCoded(poco, writerContext, stringBuilder); } @@ -71,8 +70,8 @@ public static void BuildRequirementConstraintUsage(SysML2.NET.Core.POCO.Systems. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConstraintUsage(SysML2.NET.Core.POCO.Systems.Constraints.IConstraintUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("constraint "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs index fce66c33..c9edc4f9 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ConstructorExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ConstructorExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConstructorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IConstructorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConstructorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IConstructorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("new "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs index 43132ff5..6808338d 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ControlNodeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ControlNodeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildControlNode(SysML2.NET.Core.POCO.Systems.Actions.IControlNode poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildControlNode(SysML2.NET.Core.POCO.Systems.Actions.IControlNode poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs index ac2d6b96..eefe6d4c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CrossSubsettingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class CrossSubsettingTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedCrossSubsetting(SysML2.NET.Core.POCO.Core.Features.ICrossSubsetting poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedCrossSubsetting(SysML2.NET.Core.POCO.Core.Features.ICrossSubsetting poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.CrossedFeature) && poco.CrossedFeature is SysML2.NET.Core.POCO.Core.Features.IFeature chainedCrossedFeatureAsFeature) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs index b8ded3ef..83a3671b 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DataTypeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class DataTypeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDataType(SysML2.NET.Core.POCO.Kernel.DataTypes.IDataType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDataType(SysML2.NET.Core.POCO.Kernel.DataTypes.IDataType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("datatype "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs index f2707fb5..c80371c2 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DecisionNodeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class DecisionNodeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDecisionNode(SysML2.NET.Core.POCO.Systems.Actions.IDecisionNode poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDecisionNode(SysML2.NET.Core.POCO.Systems.Actions.IDecisionNode poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, writerContext, stringBuilder); if (poco.IsComposite) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs index 8a6bec17..39236301 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class DefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefinitionExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefinitionExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -64,8 +63,8 @@ public static void BuildDefinitionExtensionKeyword(SysML2.NET.Core.POCO.Systems. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefinitionPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefinitionPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.IsAbstract || poco.IsVariation) @@ -87,8 +86,8 @@ public static void BuildDefinitionPrefix(SysML2.NET.Core.POCO.Systems.Definition /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefinitionDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefinitionDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { ElementTextualNotationBuilder.BuildIdentification(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -106,8 +105,8 @@ public static void BuildDefinitionDeclaration(SysML2.NET.Core.POCO.Systems.Defin /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildExtendedDefinition(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildExtendedDefinition(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.IsAbstract || poco.IsVariation) @@ -131,8 +130,8 @@ public static void BuildExtendedDefinition(SysML2.NET.Core.POCO.Systems.Definiti /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefinition(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefinition(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildDefinitionDeclaration(poco, writerContext, stringBuilder); TypeTextualNotationBuilder.BuildDefinitionBody(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs index 6155766b..dcad3304 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DependencyTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class DependencyTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDependency(SysML2.NET.Core.POCO.Root.Dependencies.IDependency poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDependency(SysML2.NET.Core.POCO.Root.Dependencies.IDependency poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs index 8f5add2d..354c1229 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DifferencingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class DifferencingTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDifferencing(SysML2.NET.Core.POCO.Core.Types.IDifferencing poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDifferencing(SysML2.NET.Core.POCO.Core.Types.IDifferencing poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); if (poco.DifferencingType != null) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs index 2a60e68f..3bdda4ca 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DisjoiningTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class DisjoiningTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoining poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoining poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.DisjoiningType) && poco.DisjoiningType is SysML2.NET.Core.POCO.Core.Features.IFeature chainedDisjoiningTypeAsFeature) { @@ -61,8 +60,8 @@ public static void BuildOwnedDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoin /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoining poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDisjoining(SysML2.NET.Core.POCO.Core.Types.IDisjoining poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName)) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs index c81bc77a..0e1a7d21 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class DocumentationTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDocumentation(SysML2.NET.Core.POCO.Root.Annotations.IDocumentation poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDocumentation(SysML2.NET.Core.POCO.Root.Annotations.IDocumentation poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("doc "); ElementTextualNotationBuilder.BuildIdentification(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs index d9b123b1..c29fffd0 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ElementFilterMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ElementFilterMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildElementFilterMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildElementFilterMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -67,8 +66,8 @@ public static void BuildElementFilterMember(SysML2.NET.Core.POCO.Kernel.Packages /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFilterPackageMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFilterPackageMember(SysML2.NET.Core.POCO.Kernel.Packages.IElementFilterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); stringBuilder.Append("["); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs index 4700088b..6c0df471 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ElementTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ElementTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildIdentification(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildIdentification(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName)) @@ -67,8 +66,8 @@ public static void BuildIdentification(SysML2.NET.Core.POCO.Root.Elements.IEleme /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefinitionElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefinitionElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -169,8 +168,8 @@ public static void BuildDefinitionElement(SysML2.NET.Core.POCO.Root.Elements.IEl /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedRelatedElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedRelatedElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -190,8 +189,8 @@ public static void BuildOwnedRelatedElement(SysML2.NET.Core.POCO.Root.Elements.I /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMemberElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMemberElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -211,8 +210,8 @@ public static void BuildMemberElement(SysML2.NET.Core.POCO.Root.Elements.IElemen /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNonFeatureElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNonFeatureElement(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs index a491571a..c5cd52cb 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EndFeatureMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class EndFeatureMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSourceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSourceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -64,8 +63,8 @@ public static void BuildSourceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConnectorEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConnectorEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -88,8 +87,8 @@ public static void BuildConnectorEndMember(SysML2.NET.Core.POCO.Core.Features.IE /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -112,8 +111,8 @@ public static void BuildInterfaceEndMember(SysML2.NET.Core.POCO.Core.Features.IE /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -136,8 +135,8 @@ public static void BuildFlowEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFea /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEmptyEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEmptyEndMember(SysML2.NET.Core.POCO.Core.Features.IEndFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs index c4165f53..2f25b8e9 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EnumerationDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class EnumerationDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEnumerationBody(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEnumerationBody(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -52,6 +51,7 @@ public static void BuildEnumerationBody(SysML2.NET.Core.POCO.Systems.Enumeration var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); while (ownedRelationshipCursor.Current != null) { switch (ownedRelationshipCursor.Current) @@ -66,6 +66,7 @@ public static void BuildEnumerationBody(SysML2.NET.Core.POCO.Systems.Enumeration ownedRelationshipCursor.Move(); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -77,8 +78,8 @@ public static void BuildEnumerationBody(SysML2.NET.Core.POCO.Systems.Enumeration /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEnumerationDefinition(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEnumerationDefinition(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs index a30f5ac4..0e06a329 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EnumerationUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class EnumerationUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEnumeratedValue(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEnumeratedValue(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("enum "); UsageTextualNotationBuilder.BuildUsage(poco, writerContext, stringBuilder); @@ -54,8 +53,8 @@ public static void BuildEnumeratedValue(SysML2.NET.Core.POCO.Systems.Enumeration /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEnumerationUsage(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEnumerationUsage(SysML2.NET.Core.POCO.Systems.Enumerations.IEnumerationUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("enum "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs index 525a3040..1c626ada 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/EventOccurrenceUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class EventOccurrenceUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMessageEvent(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMessageEvent(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -64,8 +63,8 @@ public static void BuildMessageEvent(SysML2.NET.Core.POCO.Systems.Occurrences.IE /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEventOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEventOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IEventOccurrenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs index a9b08d7f..9e98109b 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExhibitStateUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ExhibitStateUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildExhibitStateUsage(SysML2.NET.Core.POCO.Systems.States.IExhibitStateUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildExhibitStateUsage(SysML2.NET.Core.POCO.Systems.States.IExhibitStateUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs index 59c044fb..d1bf1b22 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExposeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ExposeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildExpose(SysML2.NET.Core.POCO.Systems.Views.IExpose poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildExpose(SysML2.NET.Core.POCO.Systems.Views.IExpose poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("expose "); switch (poco) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs index 7d9a3e79..742f0ffa 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var operatorParensNeeded = writerContext.EmitOperatorParentheses && writerContext.OperatorContextStack.Count > 0 && SysML2.NET.Serializer.TextualNotation.Writers.OperatorPrecedence.NeedsParenthesesAsOperand(writerContext.OperatorContextStack.Peek(), poco); if (operatorParensNeeded) { stringBuilder.Append('('); } @@ -82,8 +81,8 @@ public static void BuildOwnedExpression(SysML2.NET.Core.POCO.Kernel.Functions.IE /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPrimaryExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPrimaryExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -103,8 +102,8 @@ public static void BuildPrimaryExpression(SysML2.NET.Core.POCO.Kernel.Functions. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNonFeatureChainPrimaryExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNonFeatureChainPrimaryExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -139,8 +138,8 @@ public static void BuildNonFeatureChainPrimaryExpression(SysML2.NET.Core.POCO.Ke /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSequenceExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSequenceExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("("); BuildSequenceExpressionList(poco, writerContext, stringBuilder); @@ -154,8 +153,8 @@ public static void BuildSequenceExpression(SysML2.NET.Core.POCO.Kernel.Functions /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSequenceExpressionList(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSequenceExpressionList(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildSequenceExpressionListHandCoded(poco, writerContext, stringBuilder); } @@ -166,8 +165,8 @@ public static void BuildSequenceExpressionList(SysML2.NET.Core.POCO.Kernel.Funct /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFunctionReference(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFunctionReference(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -190,8 +189,8 @@ public static void BuildFunctionReference(SysML2.NET.Core.POCO.Kernel.Functions. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBaseExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBaseExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -226,12 +225,14 @@ public static void BuildBaseExpression(SysML2.NET.Core.POCO.Kernel.Functions.IEx /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildExpressionBody(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildExpressionBody(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); TypeTextualNotationBuilder.BuildFunctionBodyPart(poco, writerContext, stringBuilder); + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -242,8 +243,8 @@ public static void BuildExpressionBody(SysML2.NET.Core.POCO.Kernel.Functions.IEx /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildExpression(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeaturePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("expr "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs index c975ba6b..c7a0f4c2 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureChainExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FeatureChainExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureChainExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureChainExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureChainExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureChainExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs index 2a7816a9..5ed9ff9a 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureChainingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FeatureChainingTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedFeatureChaining(SysML2.NET.Core.POCO.Core.Features.IFeatureChaining poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedFeatureChaining(SysML2.NET.Core.POCO.Core.Features.IFeatureChaining poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.ChainingFeature != null) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs index cf22f561..c2e8f069 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureDirectionKindTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FeatureDirectionKindTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureDirection(SysML2.NET.Core.Core.Types.FeatureDirectionKind poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureDirection(SysML2.NET.Core.Core.Types.FeatureDirectionKind poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs index 786561cd..74d9739e 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureInvertingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FeatureInvertingTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedFeatureInverting(SysML2.NET.Core.POCO.Core.Features.IFeatureInverting poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedFeatureInverting(SysML2.NET.Core.POCO.Core.Features.IFeatureInverting poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.InvertingFeature) && poco.InvertingFeature is SysML2.NET.Core.POCO.Core.Features.IFeature chainedInvertingFeatureAsFeature) { @@ -61,8 +60,8 @@ public static void BuildOwnedFeatureInverting(SysML2.NET.Core.POCO.Core.Features /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureInverting(SysML2.NET.Core.POCO.Core.Features.IFeatureInverting poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureInverting(SysML2.NET.Core.POCO.Core.Features.IFeatureInverting poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs index 1026926b..c7c83724 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FeatureMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -65,8 +64,8 @@ public static void BuildNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -90,8 +89,8 @@ public static void BuildOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStructureUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStructureUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -115,8 +114,8 @@ public static void BuildStructureUsageMember(SysML2.NET.Core.POCO.Core.Types.IFe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBehaviorUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBehaviorUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -140,8 +139,8 @@ public static void BuildBehaviorUsageMember(SysML2.NET.Core.POCO.Core.Types.IFea /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSourceSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSourceSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); stringBuilder.Append("then "); @@ -165,8 +164,8 @@ public static void BuildSourceSuccessionMember(SysML2.NET.Core.POCO.Core.Types.I /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceNonOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -190,8 +189,8 @@ public static void BuildInterfaceNonOccurrenceUsageMember(SysML2.NET.Core.POCO.C /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceOccurrenceUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -215,8 +214,8 @@ public static void BuildInterfaceOccurrenceUsageMember(SysML2.NET.Core.POCO.Core /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -239,8 +238,8 @@ public static void BuildFlowPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -263,8 +262,8 @@ public static void BuildFlowFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatu /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionBehaviorMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionBehaviorMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -284,8 +283,8 @@ public static void BuildActionBehaviorMember(SysML2.NET.Core.POCO.Core.Types.IFe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInitialNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInitialNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("first "); @@ -300,8 +299,8 @@ public static void BuildInitialNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatu /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -325,8 +324,8 @@ public static void BuildActionNodeMember(SysML2.NET.Core.POCO.Core.Types.IFeatur /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionTargetSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionTargetSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -350,8 +349,8 @@ public static void BuildActionTargetSuccessionMember(SysML2.NET.Core.POCO.Core.T /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildGuardedSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildGuardedSuccessionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -375,8 +374,8 @@ public static void BuildGuardedSuccessionMember(SysML2.NET.Core.POCO.Core.Types. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildForVariableDeclarationMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildForVariableDeclarationMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -399,8 +398,8 @@ public static void BuildForVariableDeclarationMember(SysML2.NET.Core.POCO.Core.T /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEntryTransitionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEntryTransitionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -415,8 +414,8 @@ public static void BuildEntryTransitionMember(SysML2.NET.Core.POCO.Core.Types.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -440,8 +439,8 @@ public static void BuildTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTargetTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTargetTransitionUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -465,8 +464,8 @@ public static void BuildTargetTransitionUsageMember(SysML2.NET.Core.POCO.Core.Ty /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var effectiveOwnedMemberFeature = SysML2.NET.Serializer.TextualNotation.Writers.SharedTextualNotationBuilder.QueryEffectiveOwnedMemberFeature(poco); @@ -483,8 +482,8 @@ public static void BuildMetadataBodyUsageMember(SysML2.NET.Core.POCO.Core.Types. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -508,8 +507,8 @@ public static void BuildOwnedFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedExpressionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedExpressionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -532,8 +531,8 @@ public static void BuildOwnedExpressionReferenceMember(SysML2.NET.Core.POCO.Core /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedExpressionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedExpressionMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildOwnedExpressionMemberHandCoded(poco, writerContext, stringBuilder); @@ -545,8 +544,8 @@ public static void BuildOwnedExpressionMember(SysML2.NET.Core.POCO.Core.Types.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSequenceExpressionListMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSequenceExpressionListMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var effectiveOwnedMemberFeature = SysML2.NET.Serializer.TextualNotation.Writers.SharedTextualNotationBuilder.QueryEffectiveOwnedMemberFeature(poco); @@ -563,8 +562,8 @@ public static void BuildSequenceExpressionListMember(SysML2.NET.Core.POCO.Core.T /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFunctionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFunctionReferenceMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var effectiveOwnedMemberFeature = SysML2.NET.Serializer.TextualNotation.Writers.SharedTextualNotationBuilder.QueryEffectiveOwnedMemberFeature(poco); @@ -581,8 +580,8 @@ public static void BuildFunctionReferenceMember(SysML2.NET.Core.POCO.Core.Types. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamedArgumentMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamedArgumentMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var effectiveOwnedMemberFeature = SysML2.NET.Serializer.TextualNotation.Writers.SharedTextualNotationBuilder.QueryEffectiveOwnedMemberFeature(poco); FeatureTextualNotationBuilder.BuildNamedArgument(effectiveOwnedMemberFeature, writerContext, stringBuilder); @@ -595,8 +594,8 @@ public static void BuildNamedArgumentMember(SysML2.NET.Core.POCO.Core.Types.IFea /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var effectiveOwnedMemberFeature = SysML2.NET.Serializer.TextualNotation.Writers.SharedTextualNotationBuilder.QueryEffectiveOwnedMemberFeature(poco); @@ -613,8 +612,8 @@ public static void BuildExpressionBodyMember(SysML2.NET.Core.POCO.Core.Types.IFe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -637,8 +636,8 @@ public static void BuildPayloadFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataBodyFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataBodyFeatureMember(SysML2.NET.Core.POCO.Core.Types.IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var effectiveOwnedMemberFeature = SysML2.NET.Serializer.TextualNotation.Writers.SharedTextualNotationBuilder.QueryEffectiveOwnedMemberFeature(poco); FeatureTextualNotationBuilder.BuildMetadataBodyFeature(effectiveOwnedMemberFeature, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs index 2fe415ed..e6715fb2 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureReferenceExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FeatureReferenceExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSatisfactionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSatisfactionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -64,8 +63,8 @@ public static void BuildSatisfactionReferenceExpression(SysML2.NET.Core.POCO.Ker /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedExpressionReference(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedExpressionReference(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -88,8 +87,8 @@ public static void BuildOwnedExpressionReference(SysML2.NET.Core.POCO.Kernel.Exp /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFunctionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFunctionReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -112,8 +111,8 @@ public static void BuildFunctionReferenceExpression(SysML2.NET.Core.POCO.Kernel. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureReferenceExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -147,8 +146,8 @@ public static void BuildFeatureReferenceExpression(SysML2.NET.Core.POCO.Kernel.E /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBodyExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBodyExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IFeatureReferenceExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs index c7a4f18a..36132f04 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FeatureTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -64,8 +63,8 @@ public static void BuildValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature po /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureSpecializationPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureSpecializationPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildFeatureSpecializationPartHandCoded(poco, writerContext, stringBuilder); } @@ -76,8 +75,8 @@ public static void BuildFeatureSpecializationPart(SysML2.NET.Core.POCO.Core.Feat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureSpecialization(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureSpecialization(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -106,8 +105,8 @@ public static void BuildFeatureSpecialization(SysML2.NET.Core.POCO.Core.Features /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); BuildTypedBy(poco, writerContext, stringBuilder); @@ -136,8 +135,8 @@ public static void BuildTypings(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypedBy(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypedBy(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(": "); @@ -161,8 +160,8 @@ public static void BuildTypedBy(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSubsettings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSubsettings(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); BuildSubsets(poco, writerContext, stringBuilder); @@ -191,8 +190,8 @@ public static void BuildSubsettings(SysML2.NET.Core.POCO.Core.Features.IFeature /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSubsets(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSubsets(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(" :> "); @@ -216,8 +215,8 @@ public static void BuildSubsets(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildReferences(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildReferences(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(" ::> "); @@ -241,8 +240,8 @@ public static void BuildReferences(SysML2.NET.Core.POCO.Core.Features.IFeature p /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCrosses(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCrosses(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(" => "); @@ -266,8 +265,8 @@ public static void BuildCrosses(SysML2.NET.Core.POCO.Core.Features.IFeature poco /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRedefinitions(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRedefinitions(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); BuildRedefines(poco, writerContext, stringBuilder); @@ -296,8 +295,8 @@ public static void BuildRedefinitions(SysML2.NET.Core.POCO.Core.Features.IFeatur /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRedefines(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRedefines(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(" :>> "); @@ -321,8 +320,8 @@ public static void BuildRedefines(SysML2.NET.Core.POCO.Core.Features.IFeature po /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -361,8 +360,8 @@ public static void BuildOwnedFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMultiplicityPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMultiplicityPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildMultiplicityPartHandCoded(poco, writerContext, stringBuilder); } @@ -373,8 +372,8 @@ public static void BuildMultiplicityPart(SysML2.NET.Core.POCO.Core.Features.IFea /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedCrossMultiplicity(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedCrossMultiplicity(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -397,8 +396,8 @@ public static void BuildOwnedCrossMultiplicity(SysML2.NET.Core.POCO.Core.Feature /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPayloadFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPayloadFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildPayloadFeatureHandCoded(poco, writerContext, stringBuilder); } @@ -409,8 +408,8 @@ public static void BuildPayloadFeature(SysML2.NET.Core.POCO.Core.Features.IFeatu /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPayloadFeatureSpecializationPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPayloadFeatureSpecializationPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildPayloadFeatureSpecializationPartHandCoded(poco, writerContext, stringBuilder); } @@ -421,8 +420,8 @@ public static void BuildPayloadFeatureSpecializationPart(SysML2.NET.Core.POCO.Co /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureChainPrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureChainPrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -463,8 +462,8 @@ public static void BuildFeatureChainPrefix(SysML2.NET.Core.POCO.Core.Features.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTriggerValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTriggerValuePart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -487,8 +486,8 @@ public static void BuildTriggerValuePart(SysML2.NET.Core.POCO.Core.Features.IFea /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -511,8 +510,8 @@ public static void BuildArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poc /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildArgumentExpression(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildArgumentExpression(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -535,8 +534,8 @@ public static void BuildArgumentExpression(SysML2.NET.Core.POCO.Core.Features.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureElement(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureElement(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -580,8 +579,8 @@ public static void BuildFeatureElement(SysML2.NET.Core.POCO.Core.Features.IFeatu /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEndFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEndFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.IsConstant) @@ -604,8 +603,8 @@ public static void BuildEndFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFea /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBasicFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBasicFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.Direction.HasValue) @@ -648,8 +647,8 @@ public static void BuildBasicFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureDeclaration(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureDeclaration(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.IsSufficient) @@ -671,8 +670,8 @@ public static void BuildFeatureDeclaration(SysML2.NET.Core.POCO.Core.Features.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureIdentification(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureIdentification(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildFeatureIdentificationHandCoded(poco, writerContext, stringBuilder); } @@ -683,8 +682,8 @@ public static void BuildFeatureIdentification(SysML2.NET.Core.POCO.Core.Features /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureRelationshipPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureRelationshipPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -710,8 +709,8 @@ public static void BuildFeatureRelationshipPart(SysML2.NET.Core.POCO.Core.Featur /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildChainingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildChainingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("chains "); @@ -740,8 +739,8 @@ public static void BuildChainingPart(SysML2.NET.Core.POCO.Core.Features.IFeature /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInvertingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInvertingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("inverse "); @@ -766,8 +765,8 @@ public static void BuildInvertingPart(SysML2.NET.Core.POCO.Core.Features.IFeatur /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypeFeaturingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypeFeaturingPart(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); var ownedTypeFeaturingCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedTypeFeaturing", poco.ownedTypeFeaturing); @@ -809,8 +808,8 @@ public static void BuildTypeFeaturingPart(SysML2.NET.Core.POCO.Core.Features.IFe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -849,8 +848,8 @@ public static void BuildFeatureChain(SysML2.NET.Core.POCO.Core.Features.IFeature /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -873,8 +872,8 @@ public static void BuildMetadataArgument(SysML2.NET.Core.POCO.Core.Features.IFea /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypeReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypeReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -897,8 +896,8 @@ public static void BuildTypeReference(SysML2.NET.Core.POCO.Core.Features.IFeatur /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -921,8 +920,8 @@ public static void BuildPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNonFeatureChainPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNonFeatureChainPrimaryArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -945,8 +944,8 @@ public static void BuildNonFeatureChainPrimaryArgument(SysML2.NET.Core.POCO.Core /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBodyArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBodyArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -969,8 +968,8 @@ public static void BuildBodyArgument(SysML2.NET.Core.POCO.Core.Features.IFeature /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFunctionReferenceArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFunctionReferenceArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -993,8 +992,8 @@ public static void BuildFunctionReferenceArgument(SysML2.NET.Core.POCO.Core.Feat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureReference(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.AppendQualifiedName(stringBuilder, poco, writerContext, poco); stringBuilder.Append(' '); @@ -1007,8 +1006,8 @@ public static void BuildFeatureReference(SysML2.NET.Core.POCO.Core.Features.IFea /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConstructorResult(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConstructorResult(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildArgumentList(poco, writerContext, stringBuilder); @@ -1020,8 +1019,8 @@ public static void BuildConstructorResult(SysML2.NET.Core.POCO.Core.Features.IFe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("("); switch (poco) @@ -1044,8 +1043,8 @@ public static void BuildArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPositionalArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPositionalArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -1084,8 +1083,8 @@ public static void BuildPositionalArgumentList(SysML2.NET.Core.POCO.Core.Feature /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamedArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamedArgumentList(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -1124,8 +1123,8 @@ public static void BuildNamedArgumentList(SysML2.NET.Core.POCO.Core.Features.IFe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamedArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamedArgument(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -1160,8 +1159,8 @@ public static void BuildNamedArgument(SysML2.NET.Core.POCO.Core.Features.IFeatur /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataBodyFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataBodyFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("feature "); @@ -1197,8 +1196,8 @@ public static void BuildMetadataBodyFeature(SysML2.NET.Core.POCO.Core.Features.I /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeature(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); BuildFeatureHandCoded(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs index 180dabfb..f37bf435 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureTypingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FeatureTypingTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.Type) && poco.Type is SysML2.NET.Core.POCO.Core.Features.IFeature chainedTypeAsFeature) { @@ -61,8 +60,8 @@ public static void BuildOwnedFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildReferenceTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildReferenceTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.Type != null) @@ -79,8 +78,8 @@ public static void BuildReferenceTyping(SysML2.NET.Core.POCO.Core.Features.IFeat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureTyping(SysML2.NET.Core.POCO.Core.Features.IFeatureTyping poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs index 2c23f5a7..e40a6f0c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FeatureValueTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FeatureValueTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTriggerFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTriggerFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -64,8 +63,8 @@ public static void BuildTriggerFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureV /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.value != null) @@ -81,8 +80,8 @@ public static void BuildArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildArgumentExpressionValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildArgumentExpressionValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -105,8 +104,8 @@ public static void BuildArgumentExpressionValue(SysML2.NET.Core.POCO.Kernel.Feat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -129,8 +128,8 @@ public static void BuildFeatureBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAssignmentTargetBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAssignmentTargetBinding(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -153,8 +152,8 @@ public static void BuildAssignmentTargetBinding(SysML2.NET.Core.POCO.Kernel.Feat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSatisfactionFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSatisfactionFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -177,8 +176,8 @@ public static void BuildSatisfactionFeatureValue(SysML2.NET.Core.POCO.Kernel.Fea /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.value != null) @@ -198,8 +197,8 @@ public static void BuildMetadataValue(SysML2.NET.Core.POCO.Kernel.FeatureValues. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.value != null) @@ -215,8 +214,8 @@ public static void BuildPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.Feature /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNonFeatureChainPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNonFeatureChainPrimaryArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.value != null) @@ -232,8 +231,8 @@ public static void BuildNonFeatureChainPrimaryArgumentValue(SysML2.NET.Core.POCO /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBodyArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBodyArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.value != null) @@ -253,8 +252,8 @@ public static void BuildBodyArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureVal /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFunctionReferenceArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFunctionReferenceArgumentValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.value != null) @@ -274,8 +273,8 @@ public static void BuildFunctionReferenceArgumentValue(SysML2.NET.Core.POCO.Kern /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureValue(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); BuildFeatureValueHandCoded(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs index 3030b6e6..699ff0f8 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FlowDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowDefinition(SysML2.NET.Core.POCO.Systems.Flows.IFlowDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowDefinition(SysML2.NET.Core.POCO.Systems.Flows.IFlowDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("flow "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs index f4e29c24..9e4b5b2c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowEndTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FlowEndTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowEnd(SysML2.NET.Core.POCO.Kernel.Interactions.IFlowEnd poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowEnd(SysML2.NET.Core.POCO.Kernel.Interactions.IFlowEnd poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs index 58d9b6fc..3f55b433 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FlowTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlow(SysML2.NET.Core.POCO.Kernel.Interactions.IFlow poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlow(SysML2.NET.Core.POCO.Kernel.Interactions.IFlow poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeaturePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("flow "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs index 86284460..acac35de 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FlowUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FlowUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMessage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMessage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("message "); @@ -57,8 +56,8 @@ public static void BuildMessage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage po /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMessageDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMessageDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildMessageDeclarationHandCoded(poco, writerContext, stringBuilder); } @@ -69,8 +68,8 @@ public static void BuildMessageDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildFlowDeclarationHandCoded(poco, writerContext, stringBuilder); } @@ -81,8 +80,8 @@ public static void BuildFlowDeclaration(SysML2.NET.Core.POCO.Systems.Flows.IFlow /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowUsage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowUsage(SysML2.NET.Core.POCO.Systems.Flows.IFlowUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("flow "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs index f8bcf75b..6f853911 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ForLoopActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ForLoopActionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildForLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IForLoopActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildForLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IForLoopActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs index 935e949d..1e0c8b25 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ForkNodeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ForkNodeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildForkNode(SysML2.NET.Core.POCO.Systems.Actions.IForkNode poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildForkNode(SysML2.NET.Core.POCO.Systems.Actions.IForkNode poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, writerContext, stringBuilder); if (poco.IsComposite) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs index f0cd26a8..ae8575a0 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FramedConcernMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FramedConcernMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFramedConcernMember(SysML2.NET.Core.POCO.Systems.Requirements.IFramedConcernMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFramedConcernMember(SysML2.NET.Core.POCO.Systems.Requirements.IFramedConcernMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs index 8ba94383..02844bfc 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/FunctionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class FunctionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFunction(SysML2.NET.Core.POCO.Kernel.Functions.IFunction poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFunction(SysML2.NET.Core.POCO.Kernel.Functions.IFunction poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("function "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs index 49665086..b20c7f5e 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IfActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class IfActionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildIfNode(SysML2.NET.Core.POCO.Systems.Actions.IIfActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildIfNode(SysML2.NET.Core.POCO.Systems.Actions.IIfActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs index 7b60385f..0274943e 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ImportTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ImportTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildImportDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.IImport poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildImportDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.IImport poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -61,8 +60,8 @@ public static void BuildImportDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.I /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildImport(SysML2.NET.Core.POCO.Root.Namespaces.IImport poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildImport(SysML2.NET.Core.POCO.Root.Namespaces.IImport poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append(poco.Visibility.ToString().ToLower()); stringBuilder.Append(' '); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs index ce9d48a5..4a0976b3 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IncludeUseCaseUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class IncludeUseCaseUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildIncludeUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IIncludeUseCaseUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildIncludeUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IIncludeUseCaseUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs index a13a6c35..9f335673 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IndexExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class IndexExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildIndexExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IIndexExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildIndexExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IIndexExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs index f3212d2b..e94d8193 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InteractionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class InteractionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInteraction(SysML2.NET.Core.POCO.Kernel.Interactions.IInteraction poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInteraction(SysML2.NET.Core.POCO.Kernel.Interactions.IInteraction poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("interaction "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs index 277a3880..cdb42a17 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InterfaceDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class InterfaceDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceDefinition(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceDefinition(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("interface "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs index 8f757ee8..a55c91ba 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InterfaceUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class InterfaceUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceUsageDeclaration(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceUsageDeclaration(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildInterfaceUsageDeclarationHandCoded(poco, writerContext, stringBuilder); } @@ -52,8 +51,8 @@ public static void BuildInterfaceUsageDeclaration(SysML2.NET.Core.POCO.Systems.I /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -73,8 +72,8 @@ public static void BuildInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.II /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBinaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBinaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -109,8 +108,8 @@ public static void BuildBinaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfa /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("("); @@ -163,8 +162,8 @@ public static void BuildNaryInterfacePart(SysML2.NET.Core.POCO.Systems.Interface /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceUsage(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceUsage(SysML2.NET.Core.POCO.Systems.Interfaces.IInterfaceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("interface "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs index ec73827c..3afd24d0 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/IntersectingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class IntersectingTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildIntersecting(SysML2.NET.Core.POCO.Core.Types.IIntersecting poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildIntersecting(SysML2.NET.Core.POCO.Core.Types.IIntersecting poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); if (poco.IntersectingType != null) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs index 12b8a48d..9f9dda40 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InvariantTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class InvariantTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInvariant(SysML2.NET.Core.POCO.Kernel.Functions.IInvariant poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInvariant(SysML2.NET.Core.POCO.Kernel.Functions.IInvariant poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeaturePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("inv "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs index b2603e6e..93317c1b 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/InvocationExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class InvocationExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFunctionOperationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFunctionOperationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -112,8 +111,8 @@ public static void BuildFunctionOperationExpression(SysML2.NET.Core.POCO.Kernel. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInvocationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInvocationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IInvocationExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs index c01cc770..199f2a8f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ItemDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ItemDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildItemDefinition(SysML2.NET.Core.POCO.Systems.Items.IItemDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildItemDefinition(SysML2.NET.Core.POCO.Systems.Items.IItemDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("item "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs index 684f9d93..d9924373 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ItemUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ItemUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildItemUsage(SysML2.NET.Core.POCO.Systems.Items.IItemUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildItemUsage(SysML2.NET.Core.POCO.Systems.Items.IItemUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("item "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs index 45c22577..49ba3806 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/JoinNodeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class JoinNodeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildJoinNode(SysML2.NET.Core.POCO.Systems.Actions.IJoinNode poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildJoinNode(SysML2.NET.Core.POCO.Systems.Actions.IJoinNode poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, writerContext, stringBuilder); if (poco.IsComposite) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs index fc3d4f1c..a26e8eb7 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LibraryPackageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class LibraryPackageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildLibraryPackage(SysML2.NET.Core.POCO.Kernel.Packages.ILibraryPackage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildLibraryPackage(SysML2.NET.Core.POCO.Kernel.Packages.ILibraryPackage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); if (poco.IsStandard) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs index 51b9f178..8766667e 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralBooleanTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class LiteralBooleanTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildLiteralBoolean(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralBoolean poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildLiteralBoolean(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralBoolean poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append(poco.Value.ToString().ToLower()); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs index afd4a5b2..4bc7beca 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class LiteralExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildLiteralExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildLiteralExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs index 007e15fd..6a186fb7 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralInfinityTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class LiteralInfinityTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildLiteralInfinity(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInfinity poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildLiteralInfinity(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInfinity poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("*"); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs index 20a73450..8a2d2c50 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralIntegerTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class LiteralIntegerTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildLiteralInteger(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInteger poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildLiteralInteger(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralInteger poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append(poco.Value.ToString()); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs index 6b2557e3..89d1ceb9 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/LiteralStringTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class LiteralStringTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildLiteralString(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralString poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildLiteralString(SysML2.NET.Core.POCO.Kernel.Expressions.ILiteralString poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append(poco.Value); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs index f1afb22d..9a0abd38 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipExposeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MembershipExposeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMembershipExpose(SysML2.NET.Core.POCO.Systems.Views.IMembershipExpose poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMembershipExpose(SysML2.NET.Core.POCO.Systems.Views.IMembershipExpose poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { MembershipImportTextualNotationBuilder.BuildMembershipImport(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs index 3697eba6..078e4807 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipImportTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MembershipImportTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMembershipImport(SysML2.NET.Core.POCO.Root.Namespaces.IMembershipImport poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMembershipImport(SysML2.NET.Core.POCO.Root.Namespaces.IMembershipImport poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.ImportedMembership != null) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs index 9d807724..2df46688 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMemberPrefix(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMemberPrefix(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.Visibility != SysML2.NET.Core.Root.Namespaces.VisibilityKind.Public) @@ -59,8 +58,8 @@ public static void BuildMemberPrefix(SysML2.NET.Core.POCO.Root.Namespaces.IMembe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAliasMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAliasMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildMemberPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("alias "); @@ -97,8 +96,8 @@ public static void BuildAliasMember(SysML2.NET.Core.POCO.Root.Namespaces.IMember /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.MemberElement != null) @@ -130,8 +129,8 @@ public static void BuildFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.MemberElement != null) @@ -149,8 +148,8 @@ public static void BuildFeatureReferenceMember(SysML2.NET.Core.POCO.Root.Namespa /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildElementReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildElementReferenceMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.MemberElement != null) @@ -167,8 +166,8 @@ public static void BuildElementReferenceMember(SysML2.NET.Core.POCO.Root.Namespa /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInstantiatedTypeMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInstantiatedTypeMember(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.MemberElement != null) @@ -205,8 +204,8 @@ public static void BuildInstantiatedTypeMember(SysML2.NET.Core.POCO.Root.Namespa /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataBodyElement(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataBodyElement(SysML2.NET.Core.POCO.Root.Namespaces.IMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs index bb5c89d5..08cb166c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MergeNodeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MergeNodeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMergeNode(SysML2.NET.Core.POCO.Systems.Actions.IMergeNode poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMergeNode(SysML2.NET.Core.POCO.Systems.Actions.IMergeNode poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildControlNodePrefix(poco, writerContext, stringBuilder); if (poco.IsComposite) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs index efaa2cca..3dcee2a2 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetaclassTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MetaclassTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetaclass(SysML2.NET.Core.POCO.Kernel.Metadata.IMetaclass poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetaclass(SysML2.NET.Core.POCO.Kernel.Metadata.IMetaclass poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("metaclass "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs index 81599f37..78ad90fe 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataAccessExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MetadataAccessExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataReference(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataReference(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -64,8 +63,8 @@ public static void BuildMetadataReference(SysML2.NET.Core.POCO.Kernel.Expression /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataAccessExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataAccessExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IMetadataAccessExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs index ef839361..31fdf4cb 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MetadataDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataDefinition(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataDefinition(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.IsAbstract) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs index 35641e35..2cc3ec63 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataFeatureTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MetadataFeatureTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPrefixMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPrefixMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -64,8 +63,8 @@ public static void BuildPrefixMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metada /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataFeatureDeclaration(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataFeatureDeclaration(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -96,8 +95,8 @@ public static void BuildMetadataFeatureDeclaration(SysML2.NET.Core.POCO.Kernel.M /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataFeature(SysML2.NET.Core.POCO.Kernel.Metadata.IMetadataFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs index faf5e7ce..0628c986 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MetadataUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MetadataUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPrefixMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPrefixMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -64,8 +63,8 @@ public static void BuildPrefixMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataUsageDeclaration(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataUsageDeclaration(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -96,8 +95,8 @@ public static void BuildMetadataUsageDeclaration(SysML2.NET.Core.POCO.Systems.Me /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataUsage(SysML2.NET.Core.POCO.Systems.Metadata.IMetadataUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs index b62ba902..1935d7c4 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MultiplicityRangeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MultiplicityRangeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildMultiplicityBounds(poco, writerContext, stringBuilder); @@ -53,8 +52,8 @@ public static void BuildOwnedMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multi /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMultiplicityBounds(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMultiplicityBounds(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("["); @@ -97,8 +96,8 @@ public static void BuildMultiplicityBounds(SysML2.NET.Core.POCO.Kernel.Multiplic /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMultiplicityRange(SysML2.NET.Core.POCO.Kernel.Multiplicities.IMultiplicityRange poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("["); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs index 5b243ade..99af8031 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/MultiplicityTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class MultiplicityTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEmptyMultiplicity(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEmptyMultiplicity(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } @@ -52,8 +51,8 @@ public static void BuildEmptyMultiplicity(SysML2.NET.Core.POCO.Core.Types.IMulti /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMultiplicitySubset(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMultiplicitySubset(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("multiplicity "); ElementTextualNotationBuilder.BuildIdentification(poco, writerContext, stringBuilder); @@ -68,8 +67,8 @@ public static void BuildMultiplicitySubset(SysML2.NET.Core.POCO.Core.Types.IMult /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMultiplicity(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMultiplicity(SysML2.NET.Core.POCO.Core.Types.IMultiplicity poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs index de860951..0dc0327c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceExposeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class NamespaceExposeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamespaceExpose(SysML2.NET.Core.POCO.Systems.Views.INamespaceExpose poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamespaceExpose(SysML2.NET.Core.POCO.Systems.Views.INamespaceExpose poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { NamespaceImportTextualNotationBuilder.BuildNamespaceImport(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs index 27bb53fe..3fed0fd2 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceImportTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class NamespaceImportTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamespaceImport(SysML2.NET.Core.POCO.Root.Namespaces.INamespaceImport poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamespaceImport(SysML2.NET.Core.POCO.Root.Namespaces.INamespaceImport poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildNamespaceImportHandCoded(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs index 2f747812..14d16d27 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NamespaceTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class NamespaceTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRootNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRootNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) @@ -80,8 +79,8 @@ public static void BuildRootNamespace(SysML2.NET.Core.POCO.Root.Namespaces.IName /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamespaceDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamespaceDeclaration(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("namespace "); ElementTextualNotationBuilder.BuildIdentification(poco, writerContext, stringBuilder); @@ -94,8 +93,8 @@ public static void BuildNamespaceDeclaration(SysML2.NET.Core.POCO.Root.Namespace /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamespaceBody(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamespaceBody(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -105,11 +104,13 @@ public static void BuildNamespaceBody(SysML2.NET.Core.POCO.Root.Namespaces.IName { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { BuildNamespaceBodyElement(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -121,8 +122,8 @@ public static void BuildNamespaceBody(SysML2.NET.Core.POCO.Root.Namespaces.IName /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamespaceBodyElement(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamespaceBodyElement(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); switch (ownedRelationshipCursor.Current) @@ -152,8 +153,8 @@ public static void BuildNamespaceBodyElement(SysML2.NET.Core.POCO.Root.Namespace /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamespace(SysML2.NET.Core.POCO.Root.Namespaces.INamespace poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs index 26384460..73750019 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/NullExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class NullExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNullExpression(SysML2.NET.Core.POCO.Kernel.Expressions.INullExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNullExpression(SysML2.NET.Core.POCO.Kernel.Expressions.INullExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("null "); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs index ece95ef6..ef135a5d 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ObjectiveMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ObjectiveMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildObjectiveMember(SysML2.NET.Core.POCO.Systems.Cases.IObjectiveMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildObjectiveMember(SysML2.NET.Core.POCO.Systems.Cases.IObjectiveMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs index 32cd40e5..5d156ffa 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OccurrenceDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class OccurrenceDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOccurrenceDefinitionPrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOccurrenceDefinitionPrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -81,8 +80,8 @@ public static void BuildOccurrenceDefinitionPrefix(SysML2.NET.Core.POCO.Systems. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildIndividualDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildIndividualDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -121,8 +120,8 @@ public static void BuildIndividualDefinition(SysML2.NET.Core.POCO.Systems.Occurr /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOccurrenceDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOccurrenceDefinition(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("occurrence "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs index c7b7d0ec..39eea7dd 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OccurrenceUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class OccurrenceUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOccurrenceUsagePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOccurrenceUsagePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, writerContext, stringBuilder); @@ -75,8 +74,8 @@ public static void BuildOccurrenceUsagePrefix(SysML2.NET.Core.POCO.Systems.Occur /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildIndividualUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildIndividualUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, writerContext, stringBuilder); if (poco.IsIndividual) @@ -99,8 +98,8 @@ public static void BuildIndividualUsage(SysML2.NET.Core.POCO.Systems.Occurrences /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPortionUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPortionUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, writerContext, stringBuilder); @@ -129,8 +128,8 @@ public static void BuildPortionUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IO /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildControlNodePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildControlNodePrefix(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildRefPrefix(poco, writerContext, stringBuilder); @@ -164,8 +163,8 @@ public static void BuildControlNodePrefix(SysML2.NET.Core.POCO.Systems.Occurrenc /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOccurrenceUsage(SysML2.NET.Core.POCO.Systems.Occurrences.IOccurrenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("occurrence "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs index 7a0f731e..a3805449 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OperatorExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class OperatorExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConditionalExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConditionalExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try @@ -109,8 +108,8 @@ public static void BuildConditionalExpression(SysML2.NET.Core.POCO.Kernel.Expres /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConditionalBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConditionalBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try @@ -165,8 +164,8 @@ public static void BuildConditionalBinaryOperatorExpression(SysML2.NET.Core.POCO /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try @@ -221,8 +220,8 @@ public static void BuildBinaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Exp /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUnaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUnaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try @@ -266,8 +265,8 @@ public static void BuildUnaryOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expr /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildClassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildClassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try @@ -317,8 +316,8 @@ public static void BuildClassificationExpression(SysML2.NET.Core.POCO.Kernel.Exp /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetaclassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetaclassificationExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try @@ -362,8 +361,8 @@ public static void BuildMetaclassificationExpression(SysML2.NET.Core.POCO.Kernel /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildExtentExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildExtentExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try @@ -396,8 +395,8 @@ public static void BuildExtentExpression(SysML2.NET.Core.POCO.Kernel.Expressions /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBracketExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBracketExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try @@ -442,8 +441,8 @@ public static void BuildBracketExpression(SysML2.NET.Core.POCO.Kernel.Expression /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSequenceOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSequenceOperatorExpression(SysML2.NET.Core.POCO.Kernel.Expressions.IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs index 4aa8aaa4..20d7ac6a 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/OwningMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class OwningMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAnnotatingMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAnnotatingMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -64,8 +63,8 @@ public static void BuildAnnotatingMember(SysML2.NET.Core.POCO.Root.Namespaces.IO /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPackageMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPackageMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -92,8 +91,8 @@ public static void BuildPackageMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwni /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -117,8 +116,8 @@ public static void BuildDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IO /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedCrossFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedCrossFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -141,8 +140,8 @@ public static void BuildOwnedCrossFeatureMember(SysML2.NET.Core.POCO.Root.Namesp /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -165,8 +164,8 @@ public static void BuildOwnedMultiplicity(SysML2.NET.Core.POCO.Root.Namespaces.I /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMultiplicityExpressionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMultiplicityExpressionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); switch (ownedRelatedElementCursor.Current) @@ -189,8 +188,8 @@ public static void BuildMultiplicityExpressionMember(SysML2.NET.Core.POCO.Root.N /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEmptyMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEmptyMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -213,8 +212,8 @@ public static void BuildEmptyMultiplicityMember(SysML2.NET.Core.POCO.Root.Namesp /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConjugatedPortDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConjugatedPortDefinitionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -237,8 +236,8 @@ public static void BuildConjugatedPortDefinitionMember(SysML2.NET.Core.POCO.Root /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedCrossMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedCrossMultiplicityMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -261,8 +260,8 @@ public static void BuildOwnedCrossMultiplicityMember(SysML2.NET.Core.POCO.Root.N /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedFeatureChainMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -285,8 +284,8 @@ public static void BuildOwnedFeatureChainMember(SysML2.NET.Core.POCO.Root.Namesp /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTransitionSuccessionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTransitionSuccessionMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -309,8 +308,8 @@ public static void BuildTransitionSuccessionMember(SysML2.NET.Core.POCO.Root.Nam /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPrefixMetadataMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPrefixMetadataMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); stringBuilder.Append("#"); @@ -334,8 +333,8 @@ public static void BuildPrefixMetadataMember(SysML2.NET.Core.POCO.Root.Namespace /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamespaceMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamespaceMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -355,8 +354,8 @@ public static void BuildNamespaceMember(SysML2.NET.Core.POCO.Root.Namespaces.IOw /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNonFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNonFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -380,8 +379,8 @@ public static void BuildNonFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IO /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNamespaceFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNamespaceFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -405,8 +404,8 @@ public static void BuildNamespaceFeatureMember(SysML2.NET.Core.POCO.Root.Namespa /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -426,8 +425,8 @@ public static void BuildFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwni /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypeFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypeFeatureMember(SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs index 35991f0f..f2966a41 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PackageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class PackageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPackageDeclaration(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPackageDeclaration(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("package "); ElementTextualNotationBuilder.BuildIdentification(poco, writerContext, stringBuilder); @@ -54,8 +53,8 @@ public static void BuildPackageDeclaration(SysML2.NET.Core.POCO.Kernel.Packages. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPackageBody(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPackageBody(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -65,11 +64,13 @@ public static void BuildPackageBody(SysML2.NET.Core.POCO.Kernel.Packages.IPackag { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { BuildPackageBodyElement(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -81,8 +82,8 @@ public static void BuildPackageBody(SysML2.NET.Core.POCO.Kernel.Packages.IPackag /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPackageBodyElement(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPackageBodyElement(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); switch (ownedRelationshipCursor.Current) @@ -116,8 +117,8 @@ public static void BuildPackageBodyElement(SysML2.NET.Core.POCO.Kernel.Packages. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFilterPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFilterPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -151,8 +152,8 @@ public static void BuildFilterPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPack /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPackage(SysML2.NET.Core.POCO.Kernel.Packages.IPackage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs index d79e8327..3cd6096e 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ParameterMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ParameterMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMessageEventMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMessageEventMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -64,8 +63,8 @@ public static void BuildMessageEventMember(SysML2.NET.Core.POCO.Kernel.Behaviors /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPayloadParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPayloadParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -88,8 +87,8 @@ public static void BuildPayloadParameterMember(SysML2.NET.Core.POCO.Kernel.Behav /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.ownedMemberParameter != null) @@ -105,8 +104,8 @@ public static void BuildArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IPa /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildArgumentExpressionMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildArgumentExpressionMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -129,8 +128,8 @@ public static void BuildArgumentExpressionMember(SysML2.NET.Core.POCO.Kernel.Beh /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -153,8 +152,8 @@ public static void BuildNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behavior /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEmptyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEmptyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -177,8 +176,8 @@ public static void BuildEmptyParameterMember(SysML2.NET.Core.POCO.Kernel.Behavio /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAssignmentTargetMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAssignmentTargetMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -201,8 +200,8 @@ public static void BuildAssignmentTargetMember(SysML2.NET.Core.POCO.Kernel.Behav /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildExpressionParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildExpressionParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -225,8 +224,8 @@ public static void BuildExpressionParameterMember(SysML2.NET.Core.POCO.Kernel.Be /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionBodyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionBodyParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -249,8 +248,8 @@ public static void BuildActionBodyParameterMember(SysML2.NET.Core.POCO.Kernel.Be /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildIfNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildIfNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -273,8 +272,8 @@ public static void BuildIfNodeParameterMember(SysML2.NET.Core.POCO.Kernel.Behavi /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -297,8 +296,8 @@ public static void BuildMetadataArgumentMember(SysML2.NET.Core.POCO.Kernel.Behav /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypeReferenceMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypeReferenceMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var effectiveOwnedMemberFeature = SysML2.NET.Serializer.TextualNotation.Writers.SharedTextualNotationBuilder.QueryEffectiveOwnedMemberFeature(poco); FeatureTextualNotationBuilder.BuildTypeReference(effectiveOwnedMemberFeature, writerContext, stringBuilder); @@ -311,8 +310,8 @@ public static void BuildTypeReferenceMember(SysML2.NET.Core.POCO.Kernel.Behavior /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.ownedMemberParameter != null) @@ -328,8 +327,8 @@ public static void BuildPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behavi /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNonFeatureChainPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNonFeatureChainPrimaryArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.ownedMemberParameter != null) @@ -345,8 +344,8 @@ public static void BuildNonFeatureChainPrimaryArgumentMember(SysML2.NET.Core.POC /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBodyArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBodyArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.ownedMemberParameter != null) @@ -362,8 +361,8 @@ public static void BuildBodyArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFunctionReferenceArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFunctionReferenceArgumentMember(SysML2.NET.Core.POCO.Kernel.Behaviors.IParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.ownedMemberParameter != null) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs index 28635de5..b44a82ac 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PartDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class PartDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPartDefinition(SysML2.NET.Core.POCO.Systems.Parts.IPartDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPartDefinition(SysML2.NET.Core.POCO.Systems.Parts.IPartDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("part "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs index e43deac6..cd09d230 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PartUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class PartUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActorUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActorUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("actor "); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -60,8 +59,8 @@ public static void BuildActorUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStakeholderUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStakeholderUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("stakeholder "); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -80,8 +79,8 @@ public static void BuildStakeholderUsage(SysML2.NET.Core.POCO.Systems.Parts.IPar /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPartUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPartUsage(SysML2.NET.Core.POCO.Systems.Parts.IPartUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("part "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs index 44412987..c7568f1c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PayloadFeatureTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class PayloadFeatureTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowPayloadFeature(SysML2.NET.Core.POCO.Kernel.Interactions.IPayloadFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowPayloadFeature(SysML2.NET.Core.POCO.Kernel.Interactions.IPayloadFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { FeatureTextualNotationBuilder.BuildPayloadFeature(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs index 13ffbfb7..6961b9eb 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PerformActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class PerformActionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPerformActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPerformActionUsageDeclaration(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); if (poco.OwnedRelationship.OfType().Any()) @@ -84,8 +83,8 @@ public static void BuildPerformActionUsageDeclaration(SysML2.NET.Core.POCO.Syste /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStatePerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStatePerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildPerformActionUsageDeclaration(poco, writerContext, stringBuilder); TypeTextualNotationBuilder.BuildActionBody(poco, writerContext, stringBuilder); @@ -98,8 +97,8 @@ public static void BuildStatePerformActionUsage(SysML2.NET.Core.POCO.Systems.Act /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTransitionPerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTransitionPerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildPerformActionUsageDeclaration(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -108,11 +107,13 @@ public static void BuildTransitionPerformActionUsage(SysML2.NET.Core.POCO.System { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); while (ownedRelationshipCursor.Current != null) { TypeTextualNotationBuilder.BuildActionBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -125,8 +126,8 @@ public static void BuildTransitionPerformActionUsage(SysML2.NET.Core.POCO.System /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPerformActionUsage(SysML2.NET.Core.POCO.Systems.Actions.IPerformActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("perform "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs index 5dd787f0..272f3705 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortConjugationTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class PortConjugationTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPortConjugation(SysML2.NET.Core.POCO.Systems.Ports.IPortConjugation poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPortConjugation(SysML2.NET.Core.POCO.Systems.Ports.IPortConjugation poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs index 41bedcea..f3ec4c5f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class PortDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IPortDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPortDefinition(SysML2.NET.Core.POCO.Systems.Ports.IPortDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); DefinitionTextualNotationBuilder.BuildDefinitionPrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs index 44ce7bd0..80c517f9 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class PortUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefaultInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefaultInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.IsEnd) { @@ -57,8 +56,8 @@ public static void BuildDefaultInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.I /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -106,8 +105,8 @@ public static void BuildInterfaceEnd(SysML2.NET.Core.POCO.Systems.Ports.IPortUsa /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPortUsage(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPortUsage(SysML2.NET.Core.POCO.Systems.Ports.IPortUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("port "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs index 7041f137..c406e7a1 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PortionKindTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class PortionKindTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPortionKind(SysML2.NET.Core.Systems.Occurrences.PortionKind poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPortionKind(SysML2.NET.Core.Systems.Occurrences.PortionKind poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs index 12ecb5d9..e7a90603 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/PredicateTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class PredicateTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPredicate(SysML2.NET.Core.POCO.Kernel.Functions.IPredicate poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPredicate(SysML2.NET.Core.POCO.Kernel.Functions.IPredicate poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("predicate "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs index 93499b38..5f25e8b5 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RedefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class RedefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.RedefinedFeature) && poco.RedefinedFeature is SysML2.NET.Core.POCO.Core.Features.IFeature chainedRedefinedFeatureAsFeature) { @@ -61,8 +60,8 @@ public static void BuildOwnedRedefinition(SysML2.NET.Core.POCO.Core.Features.IRe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.RedefinedFeature != null) @@ -79,8 +78,8 @@ public static void BuildFlowFeatureRedefinition(SysML2.NET.Core.POCO.Core.Featur /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildParameterRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildParameterRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.RedefinedFeature != null) @@ -97,8 +96,8 @@ public static void BuildParameterRedefinition(SysML2.NET.Core.POCO.Core.Features /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRedefinition(SysML2.NET.Core.POCO.Core.Features.IRedefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName)) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs index ac8be967..81014679 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReferenceSubsettingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ReferenceSubsettingTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedReferenceSubsetting(SysML2.NET.Core.POCO.Core.Features.IReferenceSubsetting poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedReferenceSubsetting(SysML2.NET.Core.POCO.Core.Features.IReferenceSubsetting poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.ReferencedFeature) && poco.ReferencedFeature is SysML2.NET.Core.POCO.Core.Features.IFeature chainedReferencedFeatureAsFeature) { @@ -61,8 +60,8 @@ public static void BuildOwnedReferenceSubsetting(SysML2.NET.Core.POCO.Core.Featu /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowEndSubsetting(SysML2.NET.Core.POCO.Core.Features.IReferenceSubsetting poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowEndSubsetting(SysML2.NET.Core.POCO.Core.Features.IReferenceSubsetting poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.ReferencedFeature) && poco.ReferencedFeature is SysML2.NET.Core.POCO.Core.Features.IFeature chainedReferencedFeatureAsFeature) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs index 35dce30b..e46b1357 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReferenceUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ReferenceUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedCrossFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedCrossFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildBasicUsagePrefix(poco, writerContext, stringBuilder); UsageTextualNotationBuilder.BuildUsageDeclaration(poco, writerContext, stringBuilder); @@ -54,8 +53,8 @@ public static void BuildOwnedCrossFeature(SysML2.NET.Core.POCO.Systems.Definitio /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefaultReferenceUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefaultReferenceUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildRefPrefix(poco, writerContext, stringBuilder); UsageTextualNotationBuilder.BuildUsage(poco, writerContext, stringBuilder); @@ -68,8 +67,8 @@ public static void BuildDefaultReferenceUsage(SysML2.NET.Core.POCO.Systems.Defin /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildVariantReference(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildVariantReference(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -98,8 +97,8 @@ public static void BuildVariantReference(SysML2.NET.Core.POCO.Systems.Definition /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSourceEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSourceEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -127,8 +126,8 @@ public static void BuildSourceEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsag /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -176,8 +175,8 @@ public static void BuildConnectorEnd(SysML2.NET.Core.POCO.Systems.DefinitionAndU /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFlowFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFlowFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -200,8 +199,8 @@ public static void BuildFlowFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUs /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildPayloadParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildPayloadParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildPayloadParameterHandCoded(poco, writerContext, stringBuilder); } @@ -212,8 +211,8 @@ public static void BuildPayloadParameter(SysML2.NET.Core.POCO.Systems.Definition /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNodeParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNodeParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -236,8 +235,8 @@ public static void BuildNodeParameter(SysML2.NET.Core.POCO.Systems.DefinitionAnd /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEmptyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEmptyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } @@ -248,8 +247,8 @@ public static void BuildEmptyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsa /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildAssignmentTargetParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildAssignmentTargetParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -278,8 +277,8 @@ public static void BuildAssignmentTargetParameter(SysML2.NET.Core.POCO.Systems.D /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildForVariableDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildForVariableDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { UsageTextualNotationBuilder.BuildUsageDeclaration(poco, writerContext, stringBuilder); @@ -291,8 +290,8 @@ public static void BuildForVariableDeclaration(SysML2.NET.Core.POCO.Systems.Defi /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEmptyFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEmptyFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } @@ -303,8 +302,8 @@ public static void BuildEmptyFeature(SysML2.NET.Core.POCO.Systems.DefinitionAndU /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSubjectUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSubjectUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("subject "); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -323,8 +322,8 @@ public static void BuildSubjectUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndU /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSatisfactionParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSatisfactionParameter(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -347,8 +346,8 @@ public static void BuildSatisfactionParameter(SysML2.NET.Core.POCO.Systems.Defin /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataBodyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataBodyUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("ref "); @@ -384,8 +383,8 @@ public static void BuildMetadataBodyUsage(SysML2.NET.Core.POCO.Systems.Definitio /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildReferenceUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildReferenceUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs index 21628c92..5741eac6 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RelationshipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class RelationshipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRelationshipBody(SysML2.NET.Core.POCO.Root.Elements.IRelationship poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRelationshipBody(SysML2.NET.Core.POCO.Root.Elements.IRelationship poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -52,6 +51,7 @@ public static void BuildRelationshipBody(SysML2.NET.Core.POCO.Root.Elements.IRel var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Annotations.IAnnotation annotationGuard && annotationGuard.OwnedRelatedElement.OfType().Any()) { @@ -67,6 +67,7 @@ public static void BuildRelationshipBody(SysML2.NET.Core.POCO.Root.Elements.IRel ownedRelationshipCursor.Move(); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -78,8 +79,8 @@ public static void BuildRelationshipBody(SysML2.NET.Core.POCO.Root.Elements.IRel /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRelationshipOwnedElement(SysML2.NET.Core.POCO.Root.Elements.IRelationship poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRelationshipOwnedElement(SysML2.NET.Core.POCO.Root.Elements.IRelationship poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildRelationshipOwnedElementHandCoded(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs index 214b1d60..fda16cfe 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RenderingDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class RenderingDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRenderingDefinition(SysML2.NET.Core.POCO.Systems.Views.IRenderingDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRenderingDefinition(SysML2.NET.Core.POCO.Systems.Views.IRenderingDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("rendering "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs index c28b6a90..feb838b9 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RenderingUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class RenderingUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildViewRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildViewRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildViewRenderingUsageHandCoded(poco, writerContext, stringBuilder); } @@ -52,8 +51,8 @@ public static void BuildViewRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IR /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRenderingUsage(SysML2.NET.Core.POCO.Systems.Views.IRenderingUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("rendering "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs index 5b735a63..154579bd 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementConstraintMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class RequirementConstraintMembershipTextualNotationBuilde /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRequirementConstraintMember(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementConstraintMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRequirementConstraintMember(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementConstraintMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -70,8 +69,8 @@ public static void BuildRequirementConstraintMember(SysML2.NET.Core.POCO.Systems /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRequirementKind(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementConstraintMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRequirementKind(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementConstraintMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco.Kind) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs index 17e0d499..47386d3d 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class RequirementDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRequirementDefinition(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRequirementDefinition(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("requirement "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs index 9907a628..cb113edb 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class RequirementUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildObjectiveRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildObjectiveRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Root.Namespaces.IOwningMembership) @@ -60,8 +59,8 @@ public static void BuildObjectiveRequirementUsage(SysML2.NET.Core.POCO.Systems.R /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRequirementVerificationUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRequirementVerificationUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildRequirementVerificationUsageHandCoded(poco, writerContext, stringBuilder); } @@ -72,8 +71,8 @@ public static void BuildRequirementVerificationUsage(SysML2.NET.Core.POCO.System /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.IRequirementUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("requirement "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs index 6bd705f4..f8890553 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/RequirementVerificationMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class RequirementVerificationMembershipTextualNotationBuil /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRequirementVerificationMember(SysML2.NET.Core.POCO.Systems.VerificationCases.IRequirementVerificationMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRequirementVerificationMember(SysML2.NET.Core.POCO.Systems.VerificationCases.IRequirementVerificationMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs index 346723bd..5444f202 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ResultExpressionMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ResultExpressionMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildResultExpressionMember(SysML2.NET.Core.POCO.Kernel.Functions.IResultExpressionMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildResultExpressionMember(SysML2.NET.Core.POCO.Kernel.Functions.IResultExpressionMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs index 2d19870b..2561d13b 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ReturnParameterMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ReturnParameterMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildReturnParameterMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildReturnParameterMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -70,8 +69,8 @@ public static void BuildReturnParameterMember(SysML2.NET.Core.POCO.Kernel.Functi /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildReturnFeatureMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildReturnFeatureMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -96,8 +95,8 @@ public static void BuildReturnFeatureMember(SysML2.NET.Core.POCO.Kernel.Function /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEmptyResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEmptyResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); @@ -120,8 +119,8 @@ public static void BuildEmptyResultMember(SysML2.NET.Core.POCO.Kernel.Functions. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConstructorResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConstructorResultMember(SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs index 9ea997a7..05153dc2 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SatisfyRequirementUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SatisfyRequirementUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSatisfyRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.ISatisfyRequirementUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSatisfyRequirementUsage(SysML2.NET.Core.POCO.Systems.Requirements.ISatisfyRequirementUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs index 536d2a98..b391db48 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SelectExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SelectExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSelectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ISelectExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSelectExpression(SysML2.NET.Core.POCO.Kernel.Expressions.ISelectExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { writerContext.OperatorContextStack.Push(poco); try diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs index c855fd28..d90bc0d5 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SendActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SendActionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSendNode(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSendNode(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); @@ -62,8 +61,8 @@ public static void BuildSendNode(SysML2.NET.Core.POCO.Systems.Actions.ISendActio /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSendNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSendNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -97,8 +96,8 @@ public static void BuildSendNodeDeclaration(SysML2.NET.Core.POCO.Systems.Actions /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSenderReceiverPart(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSenderReceiverPart(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildSenderReceiverPartHandCoded(poco, writerContext, stringBuilder); } @@ -109,8 +108,8 @@ public static void BuildSenderReceiverPart(SysML2.NET.Core.POCO.Systems.Actions. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStateSendActionUsage(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStateSendActionUsage(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildSendNodeDeclaration(poco, writerContext, stringBuilder); TypeTextualNotationBuilder.BuildActionBody(poco, writerContext, stringBuilder); @@ -123,8 +122,8 @@ public static void BuildStateSendActionUsage(SysML2.NET.Core.POCO.Systems.Action /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTransitionSendActionUsage(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTransitionSendActionUsage(SysML2.NET.Core.POCO.Systems.Actions.ISendActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildSendNodeDeclaration(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -133,11 +132,13 @@ public static void BuildTransitionSendActionUsage(SysML2.NET.Core.POCO.Systems.A { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); while (ownedRelationshipCursor.Current != null) { TypeTextualNotationBuilder.BuildActionBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SharedTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SharedTextualNotationBuilder.cs index 879ebcdb..e7b77444 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SharedTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SharedTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -43,8 +42,8 @@ public static partial class SharedTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBasicDefinitionPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBasicDefinitionPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.IsAbstract) { @@ -63,8 +62,8 @@ public static void BuildBasicDefinitionPrefix(SysML2.NET.Core.POCO.Systems.Defin /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDependencyDeclaration(SysML2.NET.Core.POCO.Root.Dependencies.IDependency poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDependencyDeclaration(SysML2.NET.Core.POCO.Root.Dependencies.IDependency poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var clientCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "client", poco.Client); var supplierCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "supplier", poco.Supplier); @@ -124,8 +123,8 @@ public static void BuildDependencyDeclaration(SysML2.NET.Core.POCO.Root.Dependen /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); BuildFeaturePrefixHandCoded(poco, writerContext, stringBuilder); @@ -154,8 +153,8 @@ public static void BuildFeaturePrefix(SysML2.NET.Core.POCO.Core.Features.IFeatur /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildLiteralReal(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildLiteralReal(SysML2.NET.Core.POCO.Kernel.FeatureValues.IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.value != null) @@ -171,8 +170,8 @@ public static void BuildLiteralReal(SysML2.NET.Core.POCO.Kernel.FeatureValues.IF /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNonBehaviorBodyItem(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNonBehaviorBodyItem(SysML2.NET.Core.POCO.Root.Elements.IElement poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildNonBehaviorBodyItemHandCoded(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs index 25a80480..63eca772 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SpecializationTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SpecializationTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildGeneralType(poco, writerContext, stringBuilder); @@ -53,8 +52,8 @@ public static void BuildOwnedSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpe /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSpecificType(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSpecificType(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.Specific) && poco.Specific is SysML2.NET.Core.POCO.Core.Features.IFeature chainedSpecificAsFeature) { @@ -74,8 +73,8 @@ public static void BuildSpecificType(SysML2.NET.Core.POCO.Core.Types.ISpecializa /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildGeneralType(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildGeneralType(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.General) && poco.General is SysML2.NET.Core.POCO.Core.Features.IFeature chainedGeneralAsFeature) { @@ -95,8 +94,8 @@ public static void BuildGeneralType(SysML2.NET.Core.POCO.Core.Types.ISpecializat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSpecialization(SysML2.NET.Core.POCO.Core.Types.ISpecialization poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName)) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs index 68386416..a0df76f3 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StakeholderMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class StakeholderMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStakeholderMember(SysML2.NET.Core.POCO.Systems.Requirements.IStakeholderMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStakeholderMember(SysML2.NET.Core.POCO.Systems.Requirements.IStakeholderMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs index c74f4c6b..a46bd03f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class StateDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStateDefBody(SysML2.NET.Core.POCO.Systems.States.IStateDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStateDefBody(SysML2.NET.Core.POCO.Systems.States.IStateDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -58,11 +57,13 @@ public static void BuildStateDefBody(SysML2.NET.Core.POCO.Systems.States.IStateD stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { TypeTextualNotationBuilder.BuildStateBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -74,8 +75,8 @@ public static void BuildStateDefBody(SysML2.NET.Core.POCO.Systems.States.IStateD /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStateDefinition(SysML2.NET.Core.POCO.Systems.States.IStateDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStateDefinition(SysML2.NET.Core.POCO.Systems.States.IStateDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("state "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs index 382442d1..5dd31f66 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateSubactionMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class StateSubactionMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEntryActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEntryActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -67,8 +66,8 @@ public static void BuildEntryActionMember(SysML2.NET.Core.POCO.Systems.States.IS /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDoActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDoActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -94,8 +93,8 @@ public static void BuildDoActionMember(SysML2.NET.Core.POCO.Systems.States.IStat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildExitActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildExitActionMember(SysML2.NET.Core.POCO.Systems.States.IStateSubactionMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs index aa22152a..4f5420a4 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StateUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class StateUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStateUsageBody(SysML2.NET.Core.POCO.Systems.States.IStateUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStateUsageBody(SysML2.NET.Core.POCO.Systems.States.IStateUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -58,11 +57,13 @@ public static void BuildStateUsageBody(SysML2.NET.Core.POCO.Systems.States.IStat stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { TypeTextualNotationBuilder.BuildStateBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -74,8 +75,8 @@ public static void BuildStateUsageBody(SysML2.NET.Core.POCO.Systems.States.IStat /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStateUsage(SysML2.NET.Core.POCO.Systems.States.IStateUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStateUsage(SysML2.NET.Core.POCO.Systems.States.IStateUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("state "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs index d87c4c97..2d0b1370 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StepTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class StepTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStep(SysML2.NET.Core.POCO.Kernel.Behaviors.IStep poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStep(SysML2.NET.Core.POCO.Kernel.Behaviors.IStep poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeaturePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("step "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs index 26effceb..a6b6a5b9 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/StructureTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class StructureTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStructure(SysML2.NET.Core.POCO.Kernel.Structures.IStructure poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStructure(SysML2.NET.Core.POCO.Kernel.Structures.IStructure poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("struct "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs index c03b6424..10265ffa 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubclassificationTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SubclassificationTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.Superclassifier != null) @@ -58,8 +57,8 @@ public static void BuildOwnedSubclassification(SysML2.NET.Core.POCO.Core.Classif /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSubclassification(SysML2.NET.Core.POCO.Core.Classifiers.ISubclassification poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName)) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs index 45a9fa4c..7045f3d1 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubjectMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SubjectMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); @@ -65,8 +64,8 @@ public static void BuildSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSatisfactionSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSatisfactionSubjectMember(SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs index ba2ab78a..04ec612f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SubsettingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SubsettingTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubsetting poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubsetting poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.SubsettedFeature) && poco.SubsettedFeature is SysML2.NET.Core.POCO.Core.Features.IFeature chainedSubsettedFeatureAsFeature) { @@ -61,8 +60,8 @@ public static void BuildOwnedSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubs /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubsetting poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSubsetting(SysML2.NET.Core.POCO.Core.Features.ISubsetting poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName)) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs index be31241f..aec894e2 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionAsUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SuccessionAsUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSourceSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSourceSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -64,8 +63,8 @@ public static void BuildSourceSuccession(SysML2.NET.Core.POCO.Systems.Connection /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTargetSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTargetSuccession(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -100,8 +99,8 @@ public static void BuildTargetSuccession(SysML2.NET.Core.POCO.Systems.Connection /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSuccessionAsUsage(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSuccessionAsUsage(SysML2.NET.Core.POCO.Systems.Connections.ISuccessionAsUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); UsageTextualNotationBuilder.BuildUsagePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs index b254d3a4..f26feaea 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionFlowTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SuccessionFlowTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSuccessionFlow(SysML2.NET.Core.POCO.Kernel.Interactions.ISuccessionFlow poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSuccessionFlow(SysML2.NET.Core.POCO.Kernel.Interactions.ISuccessionFlow poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeaturePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("succession "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs index 7ec320b2..20bf9c6c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionFlowUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SuccessionFlowUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSuccessionFlowUsage(SysML2.NET.Core.POCO.Systems.Flows.ISuccessionFlowUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSuccessionFlowUsage(SysML2.NET.Core.POCO.Systems.Flows.ISuccessionFlowUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("succession "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs index 371fbc63..0bd8c063 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/SuccessionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class SuccessionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTransitionSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTransitionSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -75,8 +74,8 @@ public static void BuildTransitionSuccession(SysML2.NET.Core.POCO.Kernel.Connect /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSuccessionDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSuccessionDeclaration(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildSuccessionDeclarationHandCoded(poco, writerContext, stringBuilder); } @@ -87,8 +86,8 @@ public static void BuildSuccessionDeclaration(SysML2.NET.Core.POCO.Kernel.Connec /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSuccession(SysML2.NET.Core.POCO.Kernel.Connectors.ISuccession poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeaturePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("succession "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs index a1b5a151..a7baa9c3 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TerminateActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class TerminateActionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTerminateNode(SysML2.NET.Core.POCO.Systems.Actions.ITerminateActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTerminateNode(SysML2.NET.Core.POCO.Systems.Actions.ITerminateActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs index 446e2d0a..48559b75 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class TextualRepresentationTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTextualRepresentation(SysML2.NET.Core.POCO.Root.Annotations.ITextualRepresentation poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTextualRepresentation(SysML2.NET.Core.POCO.Root.Annotations.ITextualRepresentation poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName)) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs index 3d31bb02..c7fbf904 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionFeatureMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class TransitionFeatureMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTriggerActionMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTriggerActionMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); stringBuilder.Append("accept "); @@ -66,8 +65,8 @@ public static void BuildTriggerActionMember(SysML2.NET.Core.POCO.Systems.States. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildGuardExpressionMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildGuardExpressionMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); stringBuilder.Append("if "); @@ -92,8 +91,8 @@ public static void BuildGuardExpressionMember(SysML2.NET.Core.POCO.Systems.State /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEffectBehaviorMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEffectBehaviorMember(SysML2.NET.Core.POCO.Systems.States.ITransitionFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); stringBuilder.Append("do "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs index 0a23c5e6..c22139a2 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TransitionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class TransitionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildGuardedTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildGuardedTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -76,8 +75,8 @@ public static void BuildGuardedTargetSuccession(SysML2.NET.Core.POCO.Systems.Sta /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefaultTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefaultTargetSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("else "); @@ -101,8 +100,8 @@ public static void BuildDefaultTargetSuccession(SysML2.NET.Core.POCO.Systems.Sta /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildGuardedSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildGuardedSuccession(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -158,8 +157,8 @@ public static void BuildGuardedSuccession(SysML2.NET.Core.POCO.Systems.States.IT /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTargetTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTargetTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -196,8 +195,8 @@ public static void BuildTargetTransitionUsage(SysML2.NET.Core.POCO.Systems.State /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTransitionUsage(SysML2.NET.Core.POCO.Systems.States.ITransitionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("transition "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs index 5cb80b2d..38fcc687 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TriggerInvocationExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class TriggerInvocationExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTriggerExpression(SysML2.NET.Core.POCO.Systems.Actions.ITriggerInvocationExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTriggerExpression(SysML2.NET.Core.POCO.Systems.Actions.ITriggerInvocationExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildTriggerExpressionHandCoded(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs index b1679e32..b8b08093 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeFeaturingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class TypeFeaturingTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOwnedTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOwnedTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.FeaturingType != null) @@ -58,8 +57,8 @@ public static void BuildOwnedTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.IT /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypeFeaturing(SysML2.NET.Core.POCO.Core.Features.ITypeFeaturing poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { stringBuilder.Append("featuring "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs index 3ebd6a79..88cef9c3 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class TypeTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefinitionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefinitionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -51,11 +50,13 @@ public static void BuildDefinitionBody(SysML2.NET.Core.POCO.Core.Types.IType poc { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { BuildDefinitionBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -67,8 +68,8 @@ public static void BuildDefinitionBody(SysML2.NET.Core.POCO.Core.Types.IType poc /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDefinitionBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDefinitionBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildDefinitionBodyItemHandCoded(poco, writerContext, stringBuilder); } @@ -79,8 +80,8 @@ public static void BuildDefinitionBodyItem(SysML2.NET.Core.POCO.Core.Types.IType /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -90,11 +91,13 @@ public static void BuildInterfaceBody(SysML2.NET.Core.POCO.Core.Types.IType poco { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { BuildInterfaceBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -106,8 +109,8 @@ public static void BuildInterfaceBody(SysML2.NET.Core.POCO.Core.Types.IType poco /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildInterfaceBodyItemHandCoded(poco, writerContext, stringBuilder); } @@ -118,8 +121,8 @@ public static void BuildInterfaceBodyItem(SysML2.NET.Core.POCO.Core.Types.IType /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -129,11 +132,13 @@ public static void BuildActionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, T { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { BuildActionBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -145,8 +150,8 @@ public static void BuildActionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, T /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildActionBodyItemHandCoded(poco, writerContext, stringBuilder); } @@ -157,8 +162,8 @@ public static void BuildActionBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poc /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStateBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStateBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildStateBodyItemHandCoded(poco, writerContext, stringBuilder); } @@ -169,8 +174,8 @@ public static void BuildStateBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCalculationBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCalculationBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -180,11 +185,13 @@ public static void BuildCalculationBody(SysML2.NET.Core.POCO.Core.Types.IType po { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); if (ownedRelationshipCursor.Current != null) { BuildCalculationBodyPart(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -196,8 +203,8 @@ public static void BuildCalculationBody(SysML2.NET.Core.POCO.Core.Types.IType po /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCalculationBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCalculationBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current is not null and not SysML2.NET.Core.POCO.Kernel.Functions.IResultExpressionMembership) @@ -230,8 +237,8 @@ public static void BuildCalculationBodyPart(SysML2.NET.Core.POCO.Core.Types.ITyp /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCalculationBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCalculationBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Kernel.Functions.IReturnParameterMembership returnParameterMembership) @@ -252,8 +259,8 @@ public static void BuildCalculationBodyItem(SysML2.NET.Core.POCO.Core.Types.ITyp /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRequirementBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRequirementBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -263,11 +270,13 @@ public static void BuildRequirementBody(SysML2.NET.Core.POCO.Core.Types.IType po { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { BuildRequirementBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -279,8 +288,8 @@ public static void BuildRequirementBody(SysML2.NET.Core.POCO.Core.Types.IType po /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRequirementBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRequirementBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership subjectMembership) @@ -326,8 +335,8 @@ public static void BuildRequirementBodyItem(SysML2.NET.Core.POCO.Core.Types.ITyp /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCaseBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCaseBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -338,6 +347,7 @@ public static void BuildCaseBody(SysML2.NET.Core.POCO.Core.Types.IType poco, Tex var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); while (ownedRelationshipCursor.Current != null) { BuildCaseBodyItem(poco, writerContext, stringBuilder); @@ -360,6 +370,7 @@ public static void BuildCaseBody(SysML2.NET.Core.POCO.Core.Types.IType poco, Tex stringBuilder.Append(' '); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -371,8 +382,8 @@ public static void BuildCaseBody(SysML2.NET.Core.POCO.Core.Types.IType poco, Tex /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildCaseBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildCaseBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.Requirements.ISubjectMembership subjectMembership) @@ -403,8 +414,8 @@ public static void BuildCaseBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco, /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildMetadataBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildMetadataBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -415,6 +426,7 @@ public static void BuildMetadataBody(SysML2.NET.Core.POCO.Core.Types.IType poco, var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); while (ownedRelationshipCursor.Current != null) { switch (ownedRelationshipCursor.Current) @@ -435,6 +447,7 @@ public static void BuildMetadataBody(SysML2.NET.Core.POCO.Core.Types.IType poco, ownedRelationshipCursor.Move(); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -446,8 +459,8 @@ public static void BuildMetadataBody(SysML2.NET.Core.POCO.Core.Types.IType poco, /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypePrefix(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypePrefix(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -481,8 +494,8 @@ public static void BuildTypePrefix(SysML2.NET.Core.POCO.Core.Types.IType poco, T /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -526,8 +539,8 @@ public static void BuildTypeDeclaration(SysML2.NET.Core.POCO.Core.Types.IType po /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildSpecializationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildSpecializationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(" :> "); @@ -567,8 +580,8 @@ public static void BuildSpecializationPart(SysML2.NET.Core.POCO.Core.Types.IType /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildConjugationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildConjugationPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append(" ~"); @@ -592,8 +605,8 @@ public static void BuildConjugationPart(SysML2.NET.Core.POCO.Core.Types.IType po /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypeRelationshipPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypeRelationshipPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -619,8 +632,8 @@ public static void BuildTypeRelationshipPart(SysML2.NET.Core.POCO.Core.Types.ITy /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDisjoiningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDisjoiningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("disjoint "); @@ -661,8 +674,8 @@ public static void BuildDisjoiningPart(SysML2.NET.Core.POCO.Core.Types.IType poc /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUnioningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUnioningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("unions "); @@ -702,8 +715,8 @@ public static void BuildUnioningPart(SysML2.NET.Core.POCO.Core.Types.IType poco, /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildIntersectingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildIntersectingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("intersects "); @@ -743,8 +756,8 @@ public static void BuildIntersectingPart(SysML2.NET.Core.POCO.Core.Types.IType p /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildDifferencingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildDifferencingPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); stringBuilder.Append("differences "); @@ -784,8 +797,8 @@ public static void BuildDifferencingPart(SysML2.NET.Core.POCO.Core.Types.IType p /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypeBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypeBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -795,11 +808,13 @@ public static void BuildTypeBody(SysML2.NET.Core.POCO.Core.Types.IType poco, Tex { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { BuildTypeBodyElement(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -811,8 +826,8 @@ public static void BuildTypeBody(SysML2.NET.Core.POCO.Core.Types.IType poco, Tex /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildTypeBodyElement(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildTypeBodyElement(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); switch (ownedRelationshipCursor.Current) @@ -846,8 +861,8 @@ public static void BuildTypeBodyElement(SysML2.NET.Core.POCO.Core.Types.IType po /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFunctionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFunctionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -857,11 +872,13 @@ public static void BuildFunctionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); if (ownedRelationshipCursor.Current != null) { BuildFunctionBodyPart(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -873,8 +890,8 @@ public static void BuildFunctionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildFunctionBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildFunctionBodyPart(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) @@ -913,8 +930,8 @@ public static void BuildFunctionBodyPart(SysML2.NET.Core.POCO.Core.Types.IType p /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInstantiatedTypeReference(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInstantiatedTypeReference(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.AppendQualifiedName(stringBuilder, poco, writerContext, poco); stringBuilder.Append(' '); @@ -927,8 +944,8 @@ public static void BuildInstantiatedTypeReference(SysML2.NET.Core.POCO.Core.Type /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildType(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildType(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildTypePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("type "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs index 50558cb8..c50548f5 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UnioningTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class UnioningTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUnioning(SysML2.NET.Core.POCO.Core.Types.IUnioning poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUnioning(SysML2.NET.Core.POCO.Core.Types.IUnioning poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); if (poco.UnioningType != null) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs index 4166c00e..7294471a 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class UsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -61,8 +60,8 @@ public static void BuildUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndU /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildRefPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildRefPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.Direction.HasValue) @@ -103,8 +102,8 @@ public static void BuildRefPrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsag /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBasicUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBasicUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildRefPrefix(poco, writerContext, stringBuilder); @@ -122,8 +121,8 @@ public static void BuildBasicUsagePrefix(SysML2.NET.Core.POCO.Systems.Definition /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEndUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEndUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); if (poco.IsEnd) @@ -155,8 +154,8 @@ public static void BuildEndUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAn /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUsageExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUsageExtensionKeyword(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -179,8 +178,8 @@ public static void BuildUsageExtensionKeyword(SysML2.NET.Core.POCO.Systems.Defin /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUnextendedUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUnextendedUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -200,8 +199,8 @@ public static void BuildUnextendedUsagePrefix(SysML2.NET.Core.POCO.Systems.Defin /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildUnextendedUsagePrefix(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -219,8 +218,8 @@ public static void BuildUsagePrefix(SysML2.NET.Core.POCO.Systems.DefinitionAndUs /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUsageDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUsageDeclaration(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { ElementTextualNotationBuilder.BuildIdentification(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -238,8 +237,8 @@ public static void BuildUsageDeclaration(SysML2.NET.Core.POCO.Systems.Definition /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUsageCompletion(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUsageCompletion(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -257,8 +256,8 @@ public static void BuildUsageCompletion(SysML2.NET.Core.POCO.Systems.DefinitionA /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUsageBody(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUsageBody(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { TypeTextualNotationBuilder.BuildDefinitionBody(poco, writerContext, stringBuilder); @@ -270,8 +269,8 @@ public static void BuildUsageBody(SysML2.NET.Core.POCO.Systems.DefinitionAndUsag /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildNonOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildNonOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -306,8 +305,8 @@ public static void BuildNonOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.D /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -327,8 +326,8 @@ public static void BuildOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.Defi /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildStructureUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildStructureUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -387,8 +386,8 @@ public static void BuildStructureUsageElement(SysML2.NET.Core.POCO.Systems.Defin /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildBehaviorUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildBehaviorUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -450,8 +449,8 @@ public static void BuildBehaviorUsageElement(SysML2.NET.Core.POCO.Systems.Defini /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildVariantUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildVariantUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -528,8 +527,8 @@ public static void BuildVariantUsageElement(SysML2.NET.Core.POCO.Systems.Definit /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceNonOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceNonOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -558,8 +557,8 @@ public static void BuildInterfaceNonOccurrenceUsageElement(SysML2.NET.Core.POCO. /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildInterfaceOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildInterfaceOccurrenceUsageElement(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -582,8 +581,8 @@ public static void BuildInterfaceOccurrenceUsageElement(SysML2.NET.Core.POCO.Sys /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildActionTargetSuccession(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildActionTargetSuccession(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { switch (poco) { @@ -609,8 +608,8 @@ public static void BuildActionTargetSuccession(SysML2.NET.Core.POCO.Systems.Defi /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildExtendedUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildExtendedUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildUnextendedUsagePrefix(poco, writerContext, stringBuilder); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -629,8 +628,8 @@ public static void BuildExtendedUsage(SysML2.NET.Core.POCO.Systems.DefinitionAnd /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUsage(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { BuildUsageDeclaration(poco, writerContext, stringBuilder); BuildUsageCompletion(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs index cc64c3eb..ec040d05 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UseCaseDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class UseCaseDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUseCaseDefinition(SysML2.NET.Core.POCO.Systems.UseCases.IUseCaseDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUseCaseDefinition(SysML2.NET.Core.POCO.Systems.UseCases.IUseCaseDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("use "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs index 9280610d..0ee6c641 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/UseCaseUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class UseCaseUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IUseCaseUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildUseCaseUsage(SysML2.NET.Core.POCO.Systems.UseCases.IUseCaseUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("use "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs index 74eddeb7..e70c58f6 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VariantMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class VariantMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildVariantUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildVariantUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("variant "); @@ -59,8 +58,8 @@ public static void BuildVariantUsageMember(SysML2.NET.Core.POCO.Systems.Definiti /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildEnumerationUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildEnumerationUsageMember(SysML2.NET.Core.POCO.Systems.DefinitionAndUsage.IVariantMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs index e33daa2c..13b4eb2d 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VerificationCaseDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class VerificationCaseDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildVerificationCaseDefinition(SysML2.NET.Core.POCO.Systems.VerificationCases.IVerificationCaseDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildVerificationCaseDefinition(SysML2.NET.Core.POCO.Systems.VerificationCases.IVerificationCaseDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("verification "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs index a86d75d0..7fa53471 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VerificationCaseUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class VerificationCaseUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildVerificationCaseUsage(SysML2.NET.Core.POCO.Systems.VerificationCases.IVerificationCaseUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildVerificationCaseUsage(SysML2.NET.Core.POCO.Systems.VerificationCases.IVerificationCaseUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("verification "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs index 5b398ebf..9f01fbb1 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ViewDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildViewDefinitionBody(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildViewDefinitionBody(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -51,11 +50,13 @@ public static void BuildViewDefinitionBody(SysML2.NET.Core.POCO.Systems.Views.IV { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { BuildViewDefinitionBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -67,8 +68,8 @@ public static void BuildViewDefinitionBody(SysML2.NET.Core.POCO.Systems.Views.IV /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildViewDefinitionBodyItem(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildViewDefinitionBodyItem(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.Views.IViewRenderingMembership viewRenderingMembership) @@ -94,8 +95,8 @@ public static void BuildViewDefinitionBodyItem(SysML2.NET.Core.POCO.Systems.View /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildViewDefinition(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildViewDefinition(SysML2.NET.Core.POCO.Systems.Views.IViewDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("view "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs index cc7fc463..5822c2a4 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewRenderingMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ViewRenderingMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildViewRenderingMember(SysML2.NET.Core.POCO.Systems.Views.IViewRenderingMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildViewRenderingMember(SysML2.NET.Core.POCO.Systems.Views.IViewRenderingMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); MembershipTextualNotationBuilder.BuildMemberPrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs index 41e5d998..2e11d691 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ViewUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildViewBody(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildViewBody(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { @@ -51,11 +50,13 @@ public static void BuildViewBody(SysML2.NET.Core.POCO.Systems.Views.IViewUsage p { stringBuilder.Append(' '); stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); while (ownedRelationshipCursor.Current != null) { BuildViewBodyItem(poco, writerContext, stringBuilder); } + stringBuilder.DecreaseIndent(); stringBuilder.AppendLine("}"); } @@ -67,8 +68,8 @@ public static void BuildViewBody(SysML2.NET.Core.POCO.Systems.Views.IViewUsage p /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildViewBodyItem(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildViewBodyItem(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); if (ownedRelationshipCursor.Current is SysML2.NET.Core.POCO.Systems.Views.IViewRenderingMembership viewRenderingMembership) @@ -99,8 +100,8 @@ public static void BuildViewBodyItem(SysML2.NET.Core.POCO.Systems.Views.IViewUsa /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildViewUsage(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildViewUsage(SysML2.NET.Core.POCO.Systems.Views.IViewUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("view "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs index 993a3228..6b221bff 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewpointDefinitionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ViewpointDefinitionTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildViewpointDefinition(SysML2.NET.Core.POCO.Systems.Views.IViewpointDefinition poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildViewpointDefinition(SysML2.NET.Core.POCO.Systems.Views.IViewpointDefinition poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceDefinitionTextualNotationBuilder.BuildOccurrenceDefinitionPrefix(poco, writerContext, stringBuilder); stringBuilder.Append("viewpoint "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs index d79e2507..74170279 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ViewpointUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class ViewpointUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildViewpointUsage(SysML2.NET.Core.POCO.Systems.Views.IViewpointUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildViewpointUsage(SysML2.NET.Core.POCO.Systems.Views.IViewpointUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { OccurrenceUsageTextualNotationBuilder.BuildOccurrenceUsagePrefix(poco, writerContext, stringBuilder); stringBuilder.Append("viewpoint "); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs index 2a1c62fb..d7287380 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/VisibilityKindTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class VisibilityKindTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildVisibilityIndicator(SysML2.NET.Core.Root.Namespaces.VisibilityKind poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildVisibilityIndicator(SysML2.NET.Core.Root.Namespaces.VisibilityKind poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs index eead486b..fbda4255 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/WhileLoopActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -25,7 +25,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; @@ -40,8 +39,8 @@ public static partial class WhileLoopActionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - public static void BuildWhileLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IWhileLoopActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that accumulates the entire textual notation with indentation + public static void BuildWhileLoopNode(SysML2.NET.Core.POCO.Systems.Actions.IWhileLoopActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); ActionUsageTextualNotationBuilder.BuildActionNodePrefix(poco, writerContext, stringBuilder); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/BindingConnectorTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/BindingConnectorTextualNotationBuilder.cs index 1f4f30cf..1b5f724e 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/BindingConnectorTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/BindingConnectorTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.Connectors; @@ -34,7 +33,7 @@ public static partial class BindingConnectorTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// BindingConnectorDeclaration : BindingConnector = /// FeatureDeclaration ( 'of' ownedRelationship += ConnectorEndMember '=' ownedRelationship += ConnectorEndMember )? @@ -44,7 +43,7 @@ public static partial class BindingConnectorTextualNotationBuilder /// helper — /// the rule shares its body with SuccessionDeclaration save for the two end-keyword literals. /// - private static void BuildBindingConnectorDeclarationHandCoded(IBindingConnector poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildBindingConnectorDeclarationHandCoded(IBindingConnector poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildTwoEndedConnectorDeclarationHandCoded(poco, "of ", "= ", writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/ClassifierTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/ClassifierTextualNotationBuilder.cs index 1cb90989..e1eba2b0 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/ClassifierTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/ClassifierTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Core.Classifiers; using SysML2.NET.Core.POCO.Core.Types; @@ -42,7 +41,7 @@ public static partial class ClassifierTextualNotationBuilder /// /// The from which the rule should be built /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// ClassifierDeclaration : Classifier = /// (isSufficient ?= 'all')? Identification (OwnedMultiplicity)? @@ -51,7 +50,7 @@ public static partial class ClassifierTextualNotationBuilder /// The auto-gen handles isSufficient, Identification, and OwnedMultiplicity. /// This HandCoded method handles: (SuperclassingPart | ConjugationPart)+ TypeRelationshipPart* /// - private static void BuildClassifierDeclarationHandCoded(IClassifier poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildClassifierDeclarationHandCoded(IClassifier poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/ConcernUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/ConcernUsageTextualNotationBuilder.cs index 3c8ef5cb..68dbe57d 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/ConcernUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/ConcernUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -49,8 +48,8 @@ public static partial class ConcernUsageTextualNotationBuilder /// /// The being serialised /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildFramedConcernUsageHandCoded(IConcernUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildFramedConcernUsageHandCoded(IConcernUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/ConjugatedPortTypingTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/ConjugatedPortTypingTextualNotationBuilder.cs index 8499196c..89ac39cd 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/ConjugatedPortTypingTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/ConjugatedPortTypingTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Systems.Ports; @@ -42,8 +41,8 @@ public static partial class ConjugatedPortTypingTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildConjugatedPortTypingHandCoded(IConjugatedPortTyping poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildConjugatedPortTypingHandCoded(IConjugatedPortTyping poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { // Preserves the previous empty-stub behavior of BuildOriginalPortDefinition // for this call site. Full ~[QualifiedName] emission via the diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/ConnectionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/ConnectionUsageTextualNotationBuilder.cs index 48240a04..1cf9d4a0 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/ConnectionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/ConnectionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -37,7 +36,7 @@ public static partial class ConnectionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// ConnectionUsage = /// OccurrenceUsagePrefix — emitted by auto-gen BEFORE this @@ -48,7 +47,7 @@ public static partial class ConnectionUsageTextualNotationBuilder /// /// Auto-gen emits OccurrenceUsagePrefix before and UsageBody after. /// - private static void BuildConnectionUsageHandCoded(IConnectionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildConnectionUsageHandCoded(IConnectionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/ConnectorTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/ConnectorTextualNotationBuilder.cs index fdf1534e..4bf344ed 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/ConnectorTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/ConnectorTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -37,7 +36,7 @@ public static partial class ConnectorTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// BinaryConnectorDeclaration : Connector = /// ( FeatureDeclaration? 'from' | isSufficient ?= 'all' 'from'? )? @@ -46,7 +45,7 @@ public static partial class ConnectorTextualNotationBuilder /// Auto-gen emits the two ConnectorEndMember + 'to' AFTER this method. /// This method handles only the optional preamble: FeatureDeclaration? + 'from' or 'all' + 'from'?. /// - private static void BuildBinaryConnectorDeclarationHandCoded(IConnector poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildBinaryConnectorDeclarationHandCoded(IConnector poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -72,14 +71,14 @@ private static void BuildBinaryConnectorDeclarationHandCoded(IConnector poco, Te /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// Connector = FeaturePrefix 'connector' ( FeatureDeclaration? ValuePart? | ConnectorDeclaration ) TypeBody /// /// Auto-gen emits FeaturePrefix + 'connector ' before and TypeBody after this method. /// This method handles: ( FeatureDeclaration? ValuePart? | ConnectorDeclaration ) /// - private static void BuildConnectorHandCoded(IConnector poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildConnectorHandCoded(IConnector poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelationship.OfType().Any()) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/ConstraintUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/ConstraintUsageTextualNotationBuilder.cs index 8118e7fa..96ede44d 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/ConstraintUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/ConstraintUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -51,8 +50,8 @@ public static partial class ConstraintUsageTextualNotationBuilder /// /// The being serialised /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildRequirementConstraintUsageHandCoded(IConstraintUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildRequirementConstraintUsageHandCoded(IConstraintUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/ElementTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/ElementTextualNotationBuilder.cs index 3c81b847..93b60779 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/ElementTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/ElementTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Root.Elements; diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/ExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/ExpressionTextualNotationBuilder.cs index 550a6373..efae2498 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/ExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/ExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.Functions; @@ -35,8 +34,8 @@ public static partial class ExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildSequenceExpressionListHandCoded(IExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildSequenceExpressionListHandCoded(IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { // Dispatch: if the poco is an OperatorExpression with operator=',', emit as SequenceOperatorExpression; // otherwise emit as OwnedExpression (the optional trailing comma in the grammar is not emitted) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs index 2e31a41c..f9a97875 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -35,8 +34,8 @@ public static partial class FeatureMembershipTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildMemberFeature(IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildMemberFeature(IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } @@ -53,8 +52,8 @@ private static void BuildMemberFeature(IFeatureMembership poco, TextualNotationW /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - private static void BuildInitialNodeMemberHandCoded(IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildInitialNodeMemberHandCoded(IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { // Preserves the previous empty-stub behavior of BuildMemberFeature for this // call site. The full QualifiedName-emission still requires a dedicated @@ -72,8 +71,8 @@ private static void BuildInitialNodeMemberHandCoded(IFeatureMembership poco, Tex /// /// The from which the rule should be build /// The providing the serialization context for the current - /// The that contains the entire textual notation - private static void BuildOwnedExpressionMemberHandCoded(IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildOwnedExpressionMemberHandCoded(IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.ownedMemberFeature is SysML2.NET.Core.POCO.Kernel.Functions.IExpression elementAsExpression) { @@ -87,8 +86,8 @@ private static void BuildOwnedExpressionMemberHandCoded(IFeatureMembership poco, /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildEntryTransitionMemberHandCoded(IFeatureMembership poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildEntryTransitionMemberHandCoded(IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { // Dispatch on cursor element type: // - ITransitionUsage → GuardedTargetSuccession (no 'then' keyword) diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureTextualNotationBuilder.cs index 7eace692..d6799a9c 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -38,9 +37,9 @@ public static partial class FeatureTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// Trailing alternative of BasicFeaturePrefix: (isVariable?='var'|isConstant?='const'{isVariable=true})?. Note: 'const' implies isVariable=true, so check isConstant first. - private static void BuildBasicFeaturePrefixHandCoded(IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildBasicFeaturePrefixHandCoded(IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.IsConstant) { @@ -57,7 +56,7 @@ private static void BuildBasicFeaturePrefixHandCoded(IFeature poco, TextualNotat /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// FeatureDeclaration : Feature = /// ( isSufficient ?= 'all' )? — handled by auto-gen, NOT here @@ -68,7 +67,7 @@ private static void BuildBasicFeaturePrefixHandCoded(IFeature poco, TextualNotat /// FeatureRelationshipPart* /// /// - private static void BuildFeatureDeclarationHandCoded(IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildFeatureDeclarationHandCoded(IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -129,7 +128,7 @@ private static void BuildFeatureDeclarationHandCoded(IFeature poco, TextualNotat /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// Feature = /// ( FeaturePrefix ( 'feature' | ownedRelationship += PrefixMetadataMember ) FeatureDeclaration? @@ -144,7 +143,7 @@ private static void BuildFeatureDeclarationHandCoded(IFeature poco, TextualNotat /// BuildFeatureDeclaration is then called to emit the identification, specialization, /// conjugation, and relationship parts. /// - private static void BuildFeatureHandCoded(IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildFeatureHandCoded(IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { // Alt 1 uses FeaturePrefix (which handles abstract/variation/readonly/derived/end // and PrefixMetadataMember*). It applies when the feature carries modifiers that @@ -190,9 +189,9 @@ private static void BuildFeatureHandCoded(IFeature poco, TextualNotationWriterCo /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// FeatureIdentification:Feature='<'declaredShortName=NAME'>'(declaredName=NAME)?|declaredName=NAME - private static void BuildFeatureIdentificationHandCoded(IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildFeatureIdentificationHandCoded(IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (!string.IsNullOrWhiteSpace(poco.DeclaredShortName)) { @@ -230,8 +229,8 @@ private static void BuildFeatureIdentificationHandCoded(IFeature poco, TextualNo /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildFeatureSpecializationPartHandCoded(IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildFeatureSpecializationPartHandCoded(IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeatureSpecializationPartHandCoded(poco, writerContext, stringBuilder); } @@ -242,8 +241,8 @@ private static void BuildFeatureSpecializationPartHandCoded(IFeature poco, Textu /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildMultiplicityPartHandCoded(IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildMultiplicityPartHandCoded(IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { // Emit the OwnedMultiplicity if present (cursor advances on += processing) var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -273,14 +272,14 @@ private static void BuildMultiplicityPartHandCoded(IFeature poco, TextualNotatio /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// PayloadFeature : Feature = /// Identification? PayloadFeatureSpecializationPart ValuePart? /// | ownedRelationship += OwnedFeatureTyping ( ownedRelationship += OwnedMultiplicity )? /// | ownedRelationship += OwnedMultiplicity ownedRelationship += OwnedFeatureTyping /// - private static void BuildPayloadFeatureHandCoded(IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildPayloadFeatureHandCoded(IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -336,7 +335,7 @@ private static void BuildPayloadFeatureHandCoded(IFeature poco, TextualNotationW /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// PayloadFeatureSpecializationPart : Feature = /// ( FeatureSpecialization )+ MultiplicityPart? FeatureSpecialization* @@ -346,7 +345,7 @@ private static void BuildPayloadFeatureHandCoded(IFeature poco, TextualNotationW /// (Alt 2 uses '+' instead of '*') is a parse-time validation concern, not a /// serialization difference. /// - private static void BuildPayloadFeatureSpecializationPartHandCoded(IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildPayloadFeatureSpecializationPartHandCoded(IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFeatureSpecializationPartHandCoded(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureValueTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureValueTextualNotationBuilder.cs index fa786d97..afe3e79f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureValueTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureValueTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.FeatureValues; using SysML2.NET.Core.POCO.Kernel.Functions; @@ -36,8 +35,8 @@ public static partial class FeatureValueTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildFeatureValueHandCoded(IFeatureValue poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildFeatureValueHandCoded(IFeatureValue poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.IsDefault) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/FlowTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/FlowTextualNotationBuilder.cs index e06bf051..4b8991b0 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/FlowTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/FlowTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.Interactions; @@ -34,7 +33,7 @@ public static partial class FlowTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// FlowDeclaration : Flow = /// FeatureDeclaration ValuePart? @@ -47,7 +46,7 @@ public static partial class FlowTextualNotationBuilder /// to the shared helper — /// the rule shares its body with SuccessionFlow's FlowDeclaration. /// - private static void BuildFlowDeclarationHandCoded(IFlow poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildFlowDeclarationHandCoded(IFlow poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFlowDeclarationHandCoded(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/FlowUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/FlowUsageTextualNotationBuilder.cs index 21558577..51dd61d6 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/FlowUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/FlowUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -37,7 +36,7 @@ public static partial class FlowUsageTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// FlowDeclaration : FlowUsage = /// UsageDeclaration ValuePart? @@ -47,7 +46,7 @@ public static partial class FlowUsageTextualNotationBuilder /// /// Auto-gen emits OccurrenceUsagePrefix + 'flow ' before and DefinitionBody after. /// - private static void BuildFlowDeclarationHandCoded(IFlowUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildFlowDeclarationHandCoded(IFlowUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -109,7 +108,7 @@ private static void BuildFlowDeclarationHandCoded(IFlowUsage poco, TextualNotati /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// MessageDeclaration : FlowUsage = /// UsageDeclaration ValuePart? @@ -119,7 +118,7 @@ private static void BuildFlowDeclarationHandCoded(IFlowUsage poco, TextualNotati /// /// Auto-gen emits OccurrenceUsagePrefix + 'message ' before and DefinitionBody after. /// - private static void BuildMessageDeclarationHandCoded(IFlowUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildMessageDeclarationHandCoded(IFlowUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/IfActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/IfActionUsageTextualNotationBuilder.cs index 7ea811c1..6b7473cd 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/IfActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/IfActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Systems.Actions; diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/IndentedStringBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/IndentedStringBuilder.cs new file mode 100644 index 00000000..5ea42300 --- /dev/null +++ b/SysML2.NET.Serializer.TextualNotation/Writers/IndentedStringBuilder.cs @@ -0,0 +1,192 @@ +// ------------------------------------------------------------------------------------------------- +// +// +// Copyright (C) 2022-2026 Starion Group S.A. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// +// ------------------------------------------------------------------------------------------------ + +namespace SysML2.NET.Serializer.TextualNotation.Writers +{ + using System.Text; + + /// + /// A thin wrapper around that produces an indentation-aware + /// textual stream. The wrapper exposes the same Append / AppendLine surface + /// the textual-notation builders rely on, and adds an integer indentation level via + /// and . Whenever an + /// Append call writes the first non-newline content of a new logical line, the + /// wrapper transparently prepends repetitions of a four-space + /// indent unit. and close the + /// current line and arm the wrapper to emit the indent on the next non-newline write. + /// + /// + /// Introduced as part of issue STARIONGROUP/SysML2.NET#281: the previous textual-notation + /// writers emitted a flat stream of tokens with all block bodies at column 0. The + /// indent push/pop calls are emitted exclusively by the textual-notation code generator + /// (SysML2.NET.CodeGenerator/HandleBarHelpers/TerminalWriter.cs) around the + /// grammar's block-delimiter terminals { and }; hand-coded writers never + /// adjust the indent level directly. + /// + public sealed class IndentedStringBuilder + { + /// + /// The unit of indentation prepended once per at the start + /// of each new logical line. Four spaces, per the SysML v2 textual-notation tutorial + /// in Resources/specification/Intro to the SysML v2 Language-Textual Notation.pdf.txt. + /// + private const string IndentUnit = " "; + + /// + /// The underlying all writes are forwarded to. + /// + private readonly StringBuilder builder = new(); + + /// + /// Tracks whether the next Append call is the first non-newline content of a + /// new logical line. Set to true initially and after every + /// / ; cleared by + /// once the indent prefix has been emitted. + /// + private bool atLineStart = true; + + /// + /// Gets the current indentation level. A level of 0 means no prefix is emitted + /// at the start of new lines; each unit increment adds one + /// (four spaces) of prefix. + /// + public int IndentLevel { get; private set; } + + /// + /// Increments by one. Called by the textual-notation code + /// generator immediately after a block-opening { terminal has been emitted, so + /// that all subsequent lines inside the block are prefixed by an additional indent + /// unit. + /// + public void IncreaseIndent() + { + this.IndentLevel++; + } + + /// + /// Decrements by one. Called by the textual-notation code + /// generator immediately before a block-closing } terminal is emitted, so that + /// the closing brace itself aligns with the level of the block's owning declaration + /// rather than the level of the block's contents. Guards against underflow: if the + /// level is already 0 the call is a no-op, ensuring a malformed grammar with + /// an unmatched closing brace cannot push the level negative. + /// + public void DecreaseIndent() + { + if (this.IndentLevel > 0) + { + this.IndentLevel--; + } + } + + /// + /// Appends a single to the underlying buffer. If this is the + /// first non-newline content of a new logical line, the configured indent prefix is + /// emitted first. + /// + /// The character to append. + /// The current instance, to allow chaining. + public IndentedStringBuilder Append(char value) + { + this.EmitIndentIfNeeded(); + this.builder.Append(value); + return this; + } + + /// + /// Appends a to the underlying buffer. If this is the first + /// non-newline content of a new logical line, the configured indent prefix is emitted + /// first. A null or empty is a no-op and does not + /// arm the indent prefix. + /// + /// The string to append; may be null or empty. + /// The current instance, to allow chaining. + public IndentedStringBuilder Append(string value) + { + if (string.IsNullOrEmpty(value)) + { + return this; + } + + this.EmitIndentIfNeeded(); + this.builder.Append(value); + return this; + } + + /// + /// Appends the default line terminator to the underlying buffer and arms the wrapper + /// to emit the indent prefix on the next non-newline write. + /// + /// The current instance, to allow chaining. + public IndentedStringBuilder AppendLine() + { + this.builder.AppendLine(); + this.atLineStart = true; + return this; + } + + /// + /// Appends followed by the default line terminator to the + /// underlying buffer. If this is the first non-newline content of a new logical line, + /// the configured indent prefix is emitted first; the wrapper is then armed to emit + /// the indent prefix on the next non-newline write. + /// + /// The string to append before the line terminator. + /// The current instance, to allow chaining. + public IndentedStringBuilder AppendLine(string value) + { + this.EmitIndentIfNeeded(); + this.builder.AppendLine(value); + this.atLineStart = true; + return this; + } + + /// + /// Converts the accumulated content of the underlying to + /// a . + /// + /// The textual notation accumulated so far. + public override string ToString() + { + return this.builder.ToString(); + } + + /// + /// Emits repetitions of to the + /// underlying buffer if the wrapper is positioned at the start of a new line, then + /// clears the flag. Called from every content-emitting + /// overload; (the no-argument overload) bypasses it + /// because emitting an indent followed by nothing but a line terminator would + /// produce trailing whitespace on an otherwise-empty line. + /// + private void EmitIndentIfNeeded() + { + if (this.atLineStart && this.IndentLevel > 0) + { + for (var level = 0; level < this.IndentLevel; level++) + { + this.builder.Append(IndentUnit); + } + } + + this.atLineStart = false; + } + } +} diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/InterfaceUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/InterfaceUsageTextualNotationBuilder.cs index 23962ab9..99b33cd3 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/InterfaceUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/InterfaceUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -37,7 +36,7 @@ public static partial class InterfaceUsageTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// InterfaceUsageDeclaration : InterfaceUsage = /// UsageDeclaration ValuePart? ( 'connect' InterfacePart )? @@ -45,7 +44,7 @@ public static partial class InterfaceUsageTextualNotationBuilder /// /// Auto-gen delegates entirely to this method. /// - private static void BuildInterfaceUsageDeclarationHandCoded(IInterfaceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildInterfaceUsageDeclarationHandCoded(IInterfaceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/InvocationExpressionTextualNotationBuilder.cs index df147f77..524f7818 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/InvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/InvocationExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.Expressions; @@ -34,8 +33,8 @@ public static partial class InvocationExpressionTextualNotationBuilder /// /// The from which the rule should be built /// The - /// The - private static void BuildInvocationTypeMember(IInvocationExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The + private static void BuildInvocationTypeMember(IInvocationExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/LiteralExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/LiteralExpressionTextualNotationBuilder.cs index d7f51c17..4f6bec77 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/LiteralExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/LiteralExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.Expressions; @@ -34,8 +33,8 @@ public static partial class LiteralExpressionTextualNotationBuilder /// /// The /// The used to get access to CursorCollection for the current - /// The - private static void BuildValue(ILiteralExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The + private static void BuildValue(ILiteralExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/NamespaceImportTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/NamespaceImportTextualNotationBuilder.cs index 81d95edc..b4280339 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/NamespaceImportTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/NamespaceImportTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Kernel.Packages; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -37,8 +36,8 @@ public static partial class NamespaceImportTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildNamespaceImportHandCoded(INamespaceImport poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildNamespaceImportHandCoded(INamespaceImport poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.OwnedRelatedElement.Contains(poco.ImportedNamespace) && poco.ImportedNamespace is IPackage filterPackage) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/OperatorExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/OperatorExpressionTextualNotationBuilder.cs index 28ddf5c8..c8e88c44 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/OperatorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/OperatorExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Kernel.Expressions; @@ -46,8 +45,8 @@ public static partial class OperatorExpressionTextualNotationBuilder /// /// The being serialised /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildClassificationExpressionHandCoded(IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildClassificationExpressionHandCoded(IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -75,8 +74,8 @@ private static void BuildClassificationExpressionHandCoded(IOperatorExpression p /// /// The being serialised /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildMetaclassificationExpressionHandCoded(IOperatorExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildMetaclassificationExpressionHandCoded(IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/OwningMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/OwningMembershipTextualNotationBuilder.cs index 19003b73..20ecc699 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/OwningMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/OwningMembershipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Root.Namespaces; diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/PackageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/PackageTextualNotationBuilder.cs index 0c1c2b05..1ead1501 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/PackageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/PackageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.Packages; @@ -34,8 +33,8 @@ public static partial class PackageTextualNotationBuilder /// /// The from which the rule should be built /// The - /// The - private static void BuildFilterPackageImport(IPackage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The + private static void BuildFilterPackageImport(IPackage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/ReferenceUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/ReferenceUsageTextualNotationBuilder.cs index 29b37e6e..607ae755 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/ReferenceUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/ReferenceUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -38,7 +37,7 @@ public static partial class ReferenceUsageTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// PayloadParameter : ReferenceUsage = /// PayloadFeature @@ -47,7 +46,7 @@ public static partial class ReferenceUsageTextualNotationBuilder /// Alt 2 applies when the reference usage has identification AND a trigger-style /// feature value. Otherwise, delegate to PayloadFeature (Alt 1). /// - private static void BuildPayloadParameterHandCoded(IReferenceUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildPayloadParameterHandCoded(IReferenceUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var hasIdentification = !string.IsNullOrWhiteSpace(poco.DeclaredShortName) || !string.IsNullOrWhiteSpace(poco.DeclaredName); var hasTriggerValue = poco.OwnedRelationship.OfType().Any(); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/RelationshipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/RelationshipTextualNotationBuilder.cs index cc2d2068..7f4f8546 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/RelationshipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/RelationshipTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Root.Annotations; using SysML2.NET.Core.POCO.Root.Elements; @@ -36,8 +35,8 @@ public static partial class RelationshipTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildRelationshipOwnedElementHandCoded(IRelationship poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildRelationshipOwnedElementHandCoded(IRelationship poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { // Alternative 1: process one OwnedRelatedElement if the ownedRelatedElement cursor has a current value var ownedRelatedElementCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelatedElement", poco.OwnedRelatedElement); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/RenderingUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/RenderingUsageTextualNotationBuilder.cs index 8a27bd96..8d07597f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/RenderingUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/RenderingUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -44,8 +43,8 @@ public static partial class RenderingUsageTextualNotationBuilder /// /// The being serialised /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildViewRenderingUsageHandCoded(IRenderingUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildViewRenderingUsageHandCoded(IRenderingUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/RequirementUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/RequirementUsageTextualNotationBuilder.cs index 51ea1e7b..372c5eb1 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/RequirementUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/RequirementUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -50,8 +49,8 @@ public static partial class RequirementUsageTextualNotationBuilder /// /// The being serialised /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildRequirementVerificationUsageHandCoded(IRequirementUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildRequirementVerificationUsageHandCoded(IRequirementUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/SendActionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/SendActionUsageTextualNotationBuilder.cs index 6f07956b..8342a176 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/SendActionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/SendActionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Systems.Actions; @@ -43,8 +42,8 @@ public static partial class SendActionUsageTextualNotationBuilder /// /// The being serialised /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildSendNodeHandCoded(ISendActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildSendNodeHandCoded(ISendActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -79,8 +78,8 @@ private static void BuildSendNodeHandCoded(ISendActionUsage poco, TextualNotatio /// /// The being serialised /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildSenderReceiverPartHandCoded(ISendActionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildSenderReceiverPartHandCoded(ISendActionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs index 2c1eb432..0557c413 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -22,7 +22,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System; using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; @@ -61,8 +60,8 @@ public static partial class SharedTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildFeaturePrefixHandCoded(IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildFeaturePrefixHandCoded(IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, OwnedRelationshipPropertyName, poco.OwnedRelationship); @@ -100,8 +99,8 @@ private static void BuildFeaturePrefixHandCoded(IFeature poco, TextualNotationWr /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildNonBehaviorBodyItemHandCoded(IElement poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildNonBehaviorBodyItemHandCoded(IElement poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, OwnedRelationshipPropertyName, poco.OwnedRelationship); @@ -178,8 +177,8 @@ private static void BuildNonBehaviorBodyItemHandCoded(IElement poco, TextualNota /// /// The that holds the real value expression /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildRealValueHandCoded(IExpression poco, TextualNotationWriterContext _, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildRealValueHandCoded(IExpression poco, TextualNotationWriterContext _, IndentedStringBuilder stringBuilder) { if (poco is ILiteralRational literalRational) { @@ -206,8 +205,8 @@ private static void BuildRealValueHandCoded(IExpression poco, TextualNotationWri /// Keyword literal that precedes the first ConnectorEndMember (e.g. "of " or "first ") /// Keyword literal that precedes the second ConnectorEndMember (e.g. "= " or "then ") /// The used to get access to the cursor cache for the current - /// The that contains the entire textual notation - internal static void BuildTwoEndedConnectorDeclarationHandCoded(IFeature poco, string firstEndKeyword, string secondEndKeyword, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + internal static void BuildTwoEndedConnectorDeclarationHandCoded(IFeature poco, string firstEndKeyword, string secondEndKeyword, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, OwnedRelationshipPropertyName, poco.OwnedRelationship); @@ -277,8 +276,8 @@ internal static void BuildTwoEndedConnectorDeclarationHandCoded(IFeature poco, s /// /// The from which the rule should be built /// The used to get access to the cursor cache for the current - /// The that contains the entire textual notation - internal static void BuildFlowDeclarationHandCoded(IFlow poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + internal static void BuildFlowDeclarationHandCoded(IFlow poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, OwnedRelationshipPropertyName, poco.OwnedRelationship); @@ -356,8 +355,8 @@ internal static void BuildFlowDeclarationHandCoded(IFlow poco, TextualNotationWr /// /// The from which the rule should be built /// The used to get access to the cursor cache for the current - /// The that contains the entire textual notation - internal static void BuildActionOrStateBodyItemNonBehaviorTailHandCoded(IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + internal static void BuildActionOrStateBodyItemNonBehaviorTailHandCoded(IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, OwnedRelationshipPropertyName, poco.OwnedRelationship); @@ -419,15 +418,15 @@ internal static void BuildActionOrStateBodyItemNonBehaviorTailHandCoded(IType po /// /// The from which the rule should be built /// The used to get access to the cursor cache for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// Delegate that builds the OccurrenceUsageMember alternative — pass FeatureMembershipTextualNotationBuilder.BuildOccurrenceUsageMember for DefinitionBodyItem and BuildInterfaceOccurrenceUsageMember for InterfaceBodyItem /// Delegate that builds the NonOccurrenceUsageMember alternative — pass FeatureMembershipTextualNotationBuilder.BuildNonOccurrenceUsageMember for DefinitionBodyItem and BuildInterfaceNonOccurrenceUsageMember for InterfaceBodyItem internal static void BuildDefinitionOrInterfaceBodyItemHandCoded( IType poco, TextualNotationWriterContext writerContext, - StringBuilder stringBuilder, - Action buildOccurrenceUsageMember, - Action buildNonOccurrenceUsageMember) + IndentedStringBuilder stringBuilder, + Action buildOccurrenceUsageMember, + Action buildNonOccurrenceUsageMember) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, OwnedRelationshipPropertyName, poco.OwnedRelationship); @@ -506,8 +505,8 @@ internal static void BuildDefinitionOrInterfaceBodyItemHandCoded( /// /// The from which the rule should be built /// The used to get access to the cursor cache for the current - /// The that contains the entire textual notation - internal static void BuildFeatureSpecializationPartHandCoded(IFeature poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + internal static void BuildFeatureSpecializationPartHandCoded(IFeature poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, OwnedRelationshipPropertyName, poco.OwnedRelationship); @@ -556,9 +555,9 @@ internal static void BuildFeatureSpecializationPartHandCoded(IFeature poco, Text /// the raw string is stored on the POCO but the emitted token must respect the /// lexical-rule constraints of the grammar. /// - /// The to append to + /// The to append to /// The raw name string as stored on the POCO; or whitespace is a no-op - internal static void AppendName(StringBuilder stringBuilder, string name) + internal static void AppendName(IndentedStringBuilder stringBuilder, string name) { if (string.IsNullOrWhiteSpace(name)) { @@ -575,9 +574,9 @@ internal static void AppendName(StringBuilder stringBuilder, string name) /// line's leading * prefix is removed. This method reverses that /// transformation for serialization. /// - /// The to append to + /// The to append to /// The body text to format as a REGULAR_COMMENT - internal static void AppendRegularComment(StringBuilder stringBuilder, string body) + internal static void AppendRegularComment(IndentedStringBuilder stringBuilder, string body) { stringBuilder.AppendLine(); @@ -622,7 +621,7 @@ internal static void AppendRegularComment(StringBuilder stringBuilder, string bo /// references to the same (target, source-scope) pair are returned from the /// memo without re-walking any chain. /// - /// The to append to + /// The to append to /// The referenced whose name is appended /// The providing the cache /// @@ -630,7 +629,7 @@ internal static void AppendRegularComment(StringBuilder stringBuilder, string bo /// relationship POCO whose property is being unparsed). Its local scope drives the /// memoisation key. Pass the enclosing-builder's poco at every call site. /// - internal static void AppendQualifiedName(StringBuilder stringBuilder, IElement target, TextualNotationWriterContext writerContext, IElement sourcePoco) + internal static void AppendQualifiedName(IndentedStringBuilder stringBuilder, IElement target, TextualNotationWriterContext writerContext, IElement sourcePoco) { if (target == null) { diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/SuccessionFlowTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/SuccessionFlowTextualNotationBuilder.cs index 2e5a85ec..86756720 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/SuccessionFlowTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/SuccessionFlowTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.Interactions; @@ -34,7 +33,7 @@ public static partial class SuccessionFlowTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// FlowDeclaration : Flow = /// FeatureDeclaration ValuePart? @@ -47,7 +46,7 @@ public static partial class SuccessionFlowTextualNotationBuilder /// Same grammar as Flow's FlowDeclaration; ISuccessionFlow extends IFlow. Body delegates to the /// shared helper. /// - private static void BuildFlowDeclarationHandCoded(ISuccessionFlow poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildFlowDeclarationHandCoded(ISuccessionFlow poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildFlowDeclarationHandCoded(poco, writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/SuccessionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/SuccessionTextualNotationBuilder.cs index 2e9572c4..9a25f75f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/SuccessionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/SuccessionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.Connectors; @@ -34,7 +33,7 @@ public static partial class SuccessionTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// SuccessionDeclaration : Succession = /// FeatureDeclaration ( 'first' ownedRelationship += ConnectorEndMember 'then' ownedRelationship += ConnectorEndMember )? @@ -44,7 +43,7 @@ public static partial class SuccessionTextualNotationBuilder /// helper — /// the rule shares its body with BindingConnectorDeclaration save for the two end-keyword literals. /// - private static void BuildSuccessionDeclarationHandCoded(ISuccession poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildSuccessionDeclarationHandCoded(ISuccession poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { SharedTextualNotationBuilder.BuildTwoEndedConnectorDeclarationHandCoded(poco, "first ", "then ", writerContext, stringBuilder); } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/TransitionUsageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/TransitionUsageTextualNotationBuilder.cs index 05230517..5a375ed0 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/TransitionUsageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/TransitionUsageTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.POCO.Kernel.Behaviors; using SysML2.NET.Core.POCO.Systems.States; @@ -35,7 +34,7 @@ public static partial class TransitionUsageTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// TargetTransitionUsage : TransitionUsage = /// ownedRelationship += EmptyParameterMember — emitted by auto-gen BEFORE this @@ -57,7 +56,7 @@ public static partial class TransitionUsageTextualNotationBuilder /// TransitionSuccessionMember + ActionBody after. This method handles only the /// optional middle section. /// - private static void BuildTargetTransitionUsageHandCoded(ITransitionUsage poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildTargetTransitionUsageHandCoded(ITransitionUsage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/TriggerInvocationExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/TriggerInvocationExpressionTextualNotationBuilder.cs index 6bcc2700..fb0d0cea 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/TriggerInvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/TriggerInvocationExpressionTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using System.Text; using SysML2.NET.Core.Systems.Actions; using SysML2.NET.Core.POCO.Kernel.Behaviors; @@ -37,8 +36,8 @@ public static partial class TriggerInvocationExpressionTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildTriggerExpressionHandCoded(ITriggerInvocationExpression poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildTriggerExpressionHandCoded(ITriggerInvocationExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs index 37c0f358..0778cd1f 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/TypeTextualNotationBuilder.cs @@ -1,11 +1,11 @@ // ------------------------------------------------------------------------------------------------- // // -// Copyright 2022-2026 Starion Group S.A. +// Copyright (C) 2022-2026 Starion Group S.A. // -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // @@ -21,7 +21,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { using System.Linq; - using System.Text; using SysML2.NET.Core.POCO.Core.Types; using SysML2.NET.Core.POCO.Root.Namespaces; @@ -38,8 +37,8 @@ public static partial class TypeTextualNotationBuilder /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildActionBodyItemHandCoded(IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildActionBodyItemHandCoded(IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); @@ -127,8 +126,8 @@ private static void BuildActionBodyItemHandCoded(IType poco, TextualNotationWrit /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildDefinitionBodyItemHandCoded(IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildDefinitionBodyItemHandCoded(IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { // DefinitionBodyItem shares its body with InterfaceBodyItem; the two rules differ only in the // Occurrence / NonOccurrence membership builders, supplied here as method-group delegates. @@ -146,8 +145,8 @@ private static void BuildDefinitionBodyItemHandCoded(IType poco, TextualNotation /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildTypeDeclarationHandCoded(IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildTypeDeclarationHandCoded(IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { if (poco.IsSufficient) { @@ -216,8 +215,8 @@ private static void BuildTypeDeclarationHandCoded(IType poco, TextualNotationWri /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildInterfaceBodyItemHandCoded(IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + /// The that contains the entire textual notation + private static void BuildInterfaceBodyItemHandCoded(IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { // InterfaceBodyItem shares its body with DefinitionBodyItem; the two rules differ only in the // Occurrence / NonOccurrence membership builders, supplied here as method-group delegates. @@ -235,7 +234,7 @@ private static void BuildInterfaceBodyItemHandCoded(IType poco, TextualNotationW /// /// The from which the rule should be build /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation + /// The that contains the entire textual notation /// /// StateBodyItem : Type = /// NonBehaviorBodyItem @@ -248,7 +247,7 @@ private static void BuildInterfaceBodyItemHandCoded(IType poco, TextualNotationW /// | ownedRelationship += DoActionMember /// | ownedRelationship += ExitActionMember /// - private static void BuildStateBodyItemHandCoded(IType poco, TextualNotationWriterContext writerContext, StringBuilder stringBuilder) + private static void BuildStateBodyItemHandCoded(IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); From ab15cba78f745d279827f2ff92cd633191414f76 Mon Sep 17 00:00:00 2001 From: atheate Date: Thu, 4 Jun 2026 08:55:15 +0200 Subject: [PATCH 2/4] Improve spacing control --- .../RuleProcessor.ElementProcessing.cs | 8 +- .../HandleBarHelpers/RulesHelper.cs | 82 +++++ .../IndentedStringBuilderTestFixture.cs | 196 ++++++++--- .../TextualNotationBuilderTestFixture.cs | 17 + .../CommentTextualNotationBuilder.cs | 2 +- .../DocumentationTextualNotationBuilder.cs | 2 +- .../ExpressionTextualNotationBuilder.cs | 21 +- ...ualRepresentationTextualNotationBuilder.cs | 2 +- .../TypeTextualNotationBuilder.cs | 70 ++-- .../Writers/IndentedStringBuilder.cs | 324 ++++++++++++++++-- .../Writers/SharedTextualNotationBuilder.cs | 23 +- 11 files changed, 637 insertions(+), 110 deletions(-) diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.ElementProcessing.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.ElementProcessing.cs index 2268fd97..d95050a2 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.ElementProcessing.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RuleProcessor.ElementProcessing.cs @@ -342,7 +342,13 @@ internal void ProcessAssignmentElement(EncodedTextWriter writer, IClass umlClass { if (assignmentElement.Value is NonTerminalElement { Name: "REGULAR_COMMENT" }) { - writer.WriteSafeString($"SharedTextualNotationBuilder.AppendRegularComment(stringBuilder, poco.{targetPropertyName});"); + // Documentation rule (`doc /* … */`) surrounds the comment with + // blank lines so doc blocks are visually separated from their + // owning members. Every other rule that assigns a REGULAR_COMMENT + // body (currently only `Comment`) renders adjacent to its + // neighbouring statements per the SST convention. + var surroundWithBlankLines = string.Equals(ruleGenerationContext.NamedElementToGenerate?.Name, "Documentation", StringComparison.Ordinal); + writer.WriteSafeString($"SharedTextualNotationBuilder.AppendRegularComment(stringBuilder, poco.{targetPropertyName}, surroundWithBlankLines: {(surroundWithBlankLines ? "true" : "false")});"); } else if (assignmentElement.Value is NonTerminalElement { Name: "NAME" }) { diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index 6f701380..0e8dbf93 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -96,6 +96,7 @@ public static void RegisterRulesHelper(this IHandlebars handlebars) var isOperatorExpressionRule = IsOperatorExpressionRule(textualRule, umlClass); var isOwnedExpressionRule = string.Equals(textualRule.RuleName, "OwnedExpression", StringComparison.Ordinal); + var isInlineBraceBodyRule = IsInlineBraceBodyRule(textualRule); if (isOwnedExpressionRule) { @@ -109,8 +110,29 @@ public static void RegisterRulesHelper(this IHandlebars handlebars) writer.WriteSafeString("try" + Environment.NewLine + "{" + Environment.NewLine); } + // Inline-brace-body rules — rules whose body alternative has the exact + // shape `'{' SingleNonTerminal '}'` with no quantifier and no `+=` + // accumulator — render their { … } wrapper on a single line per + // the SST tutorial convention (e.g. constraint and expression bodies). + // The three rules that match in the KEBNF are + // FunctionBody, ExpressionBody, and CalculationBody; + // every other brace-bounded rule uses a *-quantified list and + // renders multi-line. The wrapping suppresses AppendLine newlines inside + // the rule body and re-terminates the logical line on exit so the next + // owning statement starts on its own line. + if (isInlineBraceBodyRule) + { + writer.WriteSafeString("stringBuilder.EnterInlineBlock();" + Environment.NewLine); + writer.WriteSafeString("try" + Environment.NewLine + "{" + Environment.NewLine); + } + processor.ProcessAlternatives(writer, umlClass, textualRule.Alternatives, ruleGenerationContext); + if (isInlineBraceBodyRule) + { + writer.WriteSafeString("}" + Environment.NewLine + "finally" + Environment.NewLine + "{" + Environment.NewLine + "stringBuilder.ExitInlineBlock();" + Environment.NewLine + "stringBuilder.AppendLine();" + Environment.NewLine + "}" + Environment.NewLine); + } + if (isOperatorExpressionRule) { writer.WriteSafeString("}" + Environment.NewLine + "finally" + Environment.NewLine + "{" + Environment.NewLine + "writerContext.OperatorContextStack.Pop();" + Environment.NewLine + "}" + Environment.NewLine); @@ -156,6 +178,66 @@ private static bool IsOperatorExpressionRule(TextualNotationRule rule, IClass um return false; } + /// + /// Determines whether has any alternative of the exact shape + /// '{' SingleNonTerminal '}' with no quantifier and no += accumulator + /// on the inner non-terminal. The KEBNF grammar uses this shape exclusively for + /// expression-body wrappers — FunctionBody, ExpressionBody and + /// CalculationBody — whose canonical SST rendering is a single inline line + /// { expr }. Every other brace-bounded rule uses a *-quantified list + /// (e.g. '{' PackageBodyElement* '}') and renders multi-line. + /// + /// The textual notation rule being generated. + /// + /// true when the rule contains the inline brace-body shape and therefore + /// needs its braced alternative wrapped with + /// stringBuilder.EnterInlineBlock() / stringBuilder.ExitInlineBlock(). + /// + private static bool IsInlineBraceBodyRule(TextualNotationRule rule) + { + if (rule == null) + { + return false; + } + + foreach (var alternative in rule.Alternatives) + { + if (alternative.Elements.Count != 3) + { + continue; + } + + if (alternative.Elements[0] is not TerminalElement openBrace || openBrace.Value != "{") + { + continue; + } + + if (alternative.Elements[2] is not TerminalElement closeBrace || closeBrace.Value != "}") + { + continue; + } + + if (alternative.Elements[1] is not NonTerminalElement nonTerminal) + { + continue; + } + + if (!string.IsNullOrEmpty(nonTerminal.Suffix)) + { + continue; + } + + if (nonTerminal.Container is AssignmentElement) + { + continue; + } + + return true; + } + + return false; + } + /// /// Resolves the effective target class for a no-target rule by analyzing its assignments. /// diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/IndentedStringBuilderTestFixture.cs b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/IndentedStringBuilderTestFixture.cs index cba15491..39dc9f62 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/IndentedStringBuilderTestFixture.cs +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/IndentedStringBuilderTestFixture.cs @@ -27,13 +27,11 @@ namespace SysML2.NET.Serializer.TextualNotation.Tests.Writers using SysML2.NET.Serializer.TextualNotation.Writers; /// - /// Test fixture for : verifies that the wrapper emits - /// the configured 4-space indent prefix at the start of every new line, that - /// / - /// nest correctly, that the underflow - /// guard prevents going negative, and - /// that empty-line never produces - /// trailing whitespace. + /// Test fixture for : verifies indent emission, + /// IncreaseIndent/DecreaseIndent nesting and underflow guard, leading-whitespace-at-line + /// -start suppression, consecutive-space collapse, and tight-left / tight-both terminal + /// stripping aligned with the SST tutorial conventions (no space before ;, + /// ,, ), ]; no space around ., ::, ..). /// [TestFixture] public class IndentedStringBuilderTestFixture @@ -72,44 +70,12 @@ public void VerifyIndentedStringBuilder() Assert.That(builder.ToString(), Is.EqualTo($"package Foo {{{Environment.NewLine} part p; /*comment*/")); - // Null/empty Append is a no-op AND does NOT disarm the indent prefix. - builder.AppendLine(); - builder.Append((string)null).Append(string.Empty).Append("attribute mass;"); - - Assert.That(builder.ToString(), Is.EqualTo( - $"package Foo {{{Environment.NewLine} part p; /*comment*/{Environment.NewLine} attribute mass;")); - - // Nested block — IncreaseIndent stacks; DecreaseIndent before closing brace lets - // `}` align with its parent declaration. - builder.AppendLine(); - builder.AppendLine("part def Engine {"); - builder.IncreaseIndent(); - builder.AppendLine("attribute power;"); - builder.DecreaseIndent(); - builder.AppendLine("}"); - builder.DecreaseIndent(); - builder.AppendLine("}"); - - var expected = - $"package Foo {{{Environment.NewLine}" + - $" part p; /*comment*/{Environment.NewLine}" + - $" attribute mass;{Environment.NewLine}" + - $" part def Engine {{{Environment.NewLine}" + - $" attribute power;{Environment.NewLine}" + - $" }}{Environment.NewLine}" + - $"}}{Environment.NewLine}"; - - using (Assert.EnterMultipleScope()) - { - Assert.That(builder.IndentLevel, Is.EqualTo(0)); - Assert.That(builder.ToString(), Is.EqualTo(expected)); - } - // Underflow guard — DecreaseIndent at level 0 is a no-op, never goes negative. - builder.DecreaseIndent(); - builder.DecreaseIndent(); + var underflowBuilder = new IndentedStringBuilder(); + underflowBuilder.DecreaseIndent(); + underflowBuilder.DecreaseIndent(); - Assert.That(builder.IndentLevel, Is.EqualTo(0)); + Assert.That(underflowBuilder.IndentLevel, Is.EqualTo(0)); // Empty-line AppendLine() never produces trailing whitespace, even with indent armed. var emptyLineBuilder = new IndentedStringBuilder(); @@ -119,6 +85,150 @@ public void VerifyIndentedStringBuilder() Assert.That(emptyLineBuilder.ToString(), Is.EqualTo($"{Environment.NewLine} x")); + // Leading whitespace at line start is suppressed — the indent has already been + // (or will be) emitted, so the leading space of " standard" is dropped. + var leadingBuilder = new IndentedStringBuilder(); + leadingBuilder.Append(" standard ").Append(" library ").Append("package"); + + Assert.That(leadingBuilder.ToString(), Is.EqualTo("standard library package")); + + // Consecutive ASCII spaces are collapsed across calls. + var collapseBuilder = new IndentedStringBuilder(); + collapseBuilder.Append("Array ").Append(' ').Append('{'); + + Assert.That(collapseBuilder.ToString(), Is.EqualTo("Array {")); + + // Tight-left punctuation strips the preceding trailing space. + // ";", ",", ")", "]" emit with no space before, single space (from payload) after. + var tightLeftBuilder = new IndentedStringBuilder(); + tightLeftBuilder + .Append("Collections::* ") + .AppendLine(";") + .Append("foo") + .Append(' ') + .Append(", ") + .Append("bar") + .Append(' ') + .Append("]"); + + Assert.That(tightLeftBuilder.ToString(), Is.EqualTo($"Collections::*;{Environment.NewLine}foo, bar]")); + + // `[` is tight-left: a preceding trailing space is stripped so multiplicity / + // indexer brackets attach directly to the previous identifier + // (`Number[1..*]`, not `Number [1..*]`). + var multiplicitySuffixBuilder = new IndentedStringBuilder(); + multiplicitySuffixBuilder + .Append("Number ") + .Append("[") + .Append("1") + .Append("]"); + + Assert.That(multiplicitySuffixBuilder.ToString(), Is.EqualTo("Number[1]")); + + // `#` is tight-left: index / select expressions attach directly to the + // preceding identifier (`frontWheel#(1)`, not `frontWheel #(1)`). + var indexExpressionBuilder = new IndentedStringBuilder(); + indexExpressionBuilder + .Append("frontWheel ") + .Append("#") + .Append("(") + .Append("1") + .Append(")"); + + Assert.That(indexExpressionBuilder.ToString(), Is.EqualTo("frontWheel#(1)")); + + // AppendLine strips trailing space from the buffer before emitting the line + // terminator: a `doc ` keyword followed by an inner AppendLine() blank line + // produces `doc`, not `doc`. + var trailingSpaceBuilder = new IndentedStringBuilder(); + trailingSpaceBuilder.Append("doc ").AppendLine(); + + Assert.That(trailingSpaceBuilder.ToString(), Is.EqualTo($"doc{Environment.NewLine}")); + + // Tight-both terminals also suppress a leading space in the IMMEDIATELY + // following Append payload. Reproduces the multiplicity codegen pattern that + // emits `Append(".. "); Append(' ');` for the optional `..` separator — the + // wrapper must collapse the post-`..` space so `[1..*]` is not `[1.. *]`. + var tightBothFollowedBySpaceBuilder = new IndentedStringBuilder(); + tightBothFollowedBySpaceBuilder + .Append("[") + .Append("1") + .Append(".. ") + .Append(' ') + .Append("*") + .Append("]"); + + Assert.That(tightBothFollowedBySpaceBuilder.ToString(), Is.EqualTo("[1..*]")); + + // Tight-right opener characters ("[", "(", "~", "#") suppress any leading space + // in the next payload — codegen often emits e.g. " kg" via the leading-space + // helper after "[", which would otherwise produce "[ kg]". + var tightRightBuilder = new IndentedStringBuilder(); + tightRightBuilder + .Append("2000") + .Append("[") + .Append(" kg") + .Append("]") + .Append(' ') + .Append("foo") + .Append("(") + .Append(" x") + .Append(",") + .Append(' ') + .Append("y") + .Append(")") + .Append(' ') + .Append("~") + .Append(" negative") + .Append(' ') + .Append("#") + .Append(" annotation"); + + Assert.That(tightRightBuilder.ToString(), Is.EqualTo("2000[kg] foo(x, y) ~negative#annotation")); + + // Tight-both punctuation strips the preceding trailing space AND emits with no + // trailing space: ".", "::", "..". + // Codegen often emits these with a trailing space in the literal (e.g. ":: "); + // the wrapper detects the core token and strips both sides. + var tightBothBuilder = new IndentedStringBuilder(); + tightBothBuilder + .Append("mRef ") + .Append(".") + .Append("dimensions") + .Append(' ') + .Append(":: ") + .Append("Nested") + .Append(' ') + .Append(".. ") + .Append("end"); + + Assert.That(tightBothBuilder.ToString(), Is.EqualTo("mRef.dimensions::Nested..end")); + + // Mixed integration scenario — nested block + tight tokens + indentation, + // exercising the full pipeline together. + var integrationBuilder = new IndentedStringBuilder(); + integrationBuilder.Append("package ").Append("Foo").Append(' ').AppendLine("{"); + integrationBuilder.IncreaseIndent(); + integrationBuilder.Append(" private ").Append("import ").Append("Collections").Append(":: ").Append("*").AppendLine(";"); + integrationBuilder.Append("attribute ").Append("mass").Append(":").Append(' ').Append("Real ").AppendLine(";"); + integrationBuilder.DecreaseIndent(); + integrationBuilder.AppendLine("}"); + + var integrationExpected = + $"package Foo {{{Environment.NewLine}" + + $" private import Collections::*;{Environment.NewLine}" + + $" attribute mass: Real;{Environment.NewLine}" + + $"}}{Environment.NewLine}"; + + using (Assert.EnterMultipleScope()) + { + Assert.That(integrationBuilder.IndentLevel, Is.EqualTo(0)); + Assert.That(integrationBuilder.ToString(), Is.EqualTo(integrationExpected)); + Assert.That(integrationBuilder.ToString(), Does.Not.Contain(" ;")); // no space before ; + Assert.That(integrationBuilder.ToString(), Does.Not.Contain(" ::")); // no space before :: + Assert.That(integrationBuilder.ToString(), Does.Not.Contain(":: ")); // no space after :: + } + // Fluent chaining — every mutator returns the same instance. var chainBuilder = new IndentedStringBuilder(); var chainResult = chainBuilder.Append("a").Append(' ').Append("b").AppendLine().AppendLine("c"); diff --git a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationBuilderTestFixture.cs b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationBuilderTestFixture.cs index 59fff3ff..07f2d07d 100644 --- a/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationBuilderTestFixture.cs +++ b/SysML2.NET.Serializer.TextualNotation.Tests/Writers/TextualNotationBuilderTestFixture.cs @@ -111,6 +111,23 @@ public void Verify_that_textual_notation_is_produced_from_Quantities_root_namesp Assert.That(textualNotation, Does.Contain(":>> elements")); Assert.That(textualNotation, Does.Contain("assert constraint orderSum")); Assert.That(textualNotation, Does.Contain("assert constraint boundMatch")); + + // Whitespace-normalisation regression guards (see IndentedStringBuilder): + Assert.That(textualNotation, Does.Not.Contain(" ;"), "no space before statement terminator"); + Assert.That(textualNotation, Does.Not.Contain(" ::"), "no space before qualified-name separator"); + Assert.That(textualNotation, Does.Not.Contain(":: "), "no space after qualified-name separator"); + Assert.That(textualNotation, Does.Not.Contain(" ,"), "no space before comma"); + Assert.That(textualNotation, Does.Not.Contain(" )"), "no space before closing parenthesis"); + Assert.That(textualNotation, Does.Not.Contain(" ]"), "no space before closing bracket"); + + // Non-doc comments (`Comment` rule, no `doc` keyword) must sit adjacent to + // their neighbouring statements — no blank line before or after the `/*`/`*/`. + // The Quantities model emits one such standalone `/* Define generic aliases … */` + // block between two `alias` statements; assert no blank line precedes it. + Assert.That( + textualNotation, + Does.Contain($"alias ThreeDVectorQuantityValue for '3dVectorQuantityValue';{Environment.NewLine} /*"), + "non-doc comment must follow the previous statement on the next line without a blank-line gap"); }); } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs index bd6bbb50..86468138 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/CommentTextualNotationBuilder.cs @@ -92,7 +92,7 @@ public static void BuildComment(SysML2.NET.Core.POCO.Root.Annotations.IComment p stringBuilder.Append(' '); } - SharedTextualNotationBuilder.AppendRegularComment(stringBuilder, poco.Body); + SharedTextualNotationBuilder.AppendRegularComment(stringBuilder, poco.Body, surroundWithBlankLines: false); } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs index 0e1a7d21..d7784f86 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/DocumentationTextualNotationBuilder.cs @@ -52,7 +52,7 @@ public static void BuildDocumentation(SysML2.NET.Core.POCO.Root.Annotations.IDoc stringBuilder.Append(' '); } - SharedTextualNotationBuilder.AppendRegularComment(stringBuilder, poco.Body); + SharedTextualNotationBuilder.AppendRegularComment(stringBuilder, poco.Body, surroundWithBlankLines: true); } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs index 742f0ffa..94b529fd 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/ExpressionTextualNotationBuilder.cs @@ -228,12 +228,21 @@ public static void BuildBaseExpression(SysML2.NET.Core.POCO.Kernel.Functions.IEx /// The that accumulates the entire textual notation with indentation public static void BuildExpressionBody(SysML2.NET.Core.POCO.Kernel.Functions.IExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { - stringBuilder.Append(' '); - stringBuilder.AppendLine("{"); - stringBuilder.IncreaseIndent(); - TypeTextualNotationBuilder.BuildFunctionBodyPart(poco, writerContext, stringBuilder); - stringBuilder.DecreaseIndent(); - stringBuilder.AppendLine("}"); + stringBuilder.EnterInlineBlock(); + try + { + stringBuilder.Append(' '); + stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); + TypeTextualNotationBuilder.BuildFunctionBodyPart(poco, writerContext, stringBuilder); + stringBuilder.DecreaseIndent(); + stringBuilder.AppendLine("}"); + } + finally + { + stringBuilder.ExitInlineBlock(); + stringBuilder.AppendLine(); + } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs index 48559b75..d271b0cf 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TextualRepresentationTextualNotationBuilder.cs @@ -52,7 +52,7 @@ public static void BuildTextualRepresentation(SysML2.NET.Core.POCO.Root.Annotati stringBuilder.Append("language "); stringBuilder.Append(poco.Language); - SharedTextualNotationBuilder.AppendRegularComment(stringBuilder, poco.Body); + SharedTextualNotationBuilder.AppendRegularComment(stringBuilder, poco.Body, surroundWithBlankLines: false); } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs index 88cef9c3..2bd68f70 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/AutoGenTextualNotationBuilder/TypeTextualNotationBuilder.cs @@ -177,22 +177,31 @@ public static void BuildStateBodyItem(SysML2.NET.Core.POCO.Core.Types.IType poco /// The that accumulates the entire textual notation with indentation public static void BuildCalculationBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { - if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) - { - stringBuilder.AppendLine(";"); - } - else + stringBuilder.EnterInlineBlock(); + try { - stringBuilder.Append(' '); - stringBuilder.AppendLine("{"); - stringBuilder.IncreaseIndent(); - var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - if (ownedRelationshipCursor.Current != null) + if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { - BuildCalculationBodyPart(poco, writerContext, stringBuilder); + stringBuilder.AppendLine(";"); } - stringBuilder.DecreaseIndent(); - stringBuilder.AppendLine("}"); + else + { + stringBuilder.Append(' '); + stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); + var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); + if (ownedRelationshipCursor.Current != null) + { + BuildCalculationBodyPart(poco, writerContext, stringBuilder); + } + stringBuilder.DecreaseIndent(); + stringBuilder.AppendLine("}"); + } + } + finally + { + stringBuilder.ExitInlineBlock(); + stringBuilder.AppendLine(); } } @@ -864,22 +873,31 @@ public static void BuildTypeBodyElement(SysML2.NET.Core.POCO.Core.Types.IType po /// The that accumulates the entire textual notation with indentation public static void BuildFunctionBody(SysML2.NET.Core.POCO.Core.Types.IType poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { - if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) - { - stringBuilder.AppendLine(";"); - } - else + stringBuilder.EnterInlineBlock(); + try { - stringBuilder.Append(' '); - stringBuilder.AppendLine("{"); - stringBuilder.IncreaseIndent(); - var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - if (ownedRelationshipCursor.Current != null) + if (writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship).Current == null) { - BuildFunctionBodyPart(poco, writerContext, stringBuilder); + stringBuilder.AppendLine(";"); } - stringBuilder.DecreaseIndent(); - stringBuilder.AppendLine("}"); + else + { + stringBuilder.Append(' '); + stringBuilder.AppendLine("{"); + stringBuilder.IncreaseIndent(); + var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); + if (ownedRelationshipCursor.Current != null) + { + BuildFunctionBodyPart(poco, writerContext, stringBuilder); + } + stringBuilder.DecreaseIndent(); + stringBuilder.AppendLine("}"); + } + } + finally + { + stringBuilder.ExitInlineBlock(); + stringBuilder.AppendLine(); } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/IndentedStringBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/IndentedStringBuilder.cs index 5ea42300..4169dcf8 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/IndentedStringBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/IndentedStringBuilder.cs @@ -20,25 +20,64 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { + using System.Collections.Generic; using System.Text; /// - /// A thin wrapper around that produces an indentation-aware - /// textual stream. The wrapper exposes the same Append / AppendLine surface - /// the textual-notation builders rely on, and adds an integer indentation level via - /// and . Whenever an - /// Append call writes the first non-newline content of a new logical line, the - /// wrapper transparently prepends repetitions of a four-space - /// indent unit. and close the - /// current line and arm the wrapper to emit the indent on the next non-newline write. + /// A thin wrapper around that produces an indentation-aware, + /// whitespace-normalised textual stream. The wrapper exposes the same Append / + /// AppendLine surface the textual-notation builders rely on, and adds an integer + /// indentation level via and . + /// Whenever an Append call writes the first non-newline content of a new logical + /// line, the wrapper transparently prepends repetitions of a + /// four-space indent unit. and + /// close the current line and arm the wrapper to emit the indent on the next non-newline + /// write. /// /// + /// /// Introduced as part of issue STARIONGROUP/SysML2.NET#281: the previous textual-notation /// writers emitted a flat stream of tokens with all block bodies at column 0. The /// indent push/pop calls are emitted exclusively by the textual-notation code generator /// (SysML2.NET.CodeGenerator/HandleBarHelpers/TerminalWriter.cs) around the /// grammar's block-delimiter terminals { and }; hand-coded writers never /// adjust the indent level directly. + /// + /// + /// Whitespace normalisation (added post-#281): the SST tutorial (Release 2026-03) + /// codifies a canonical textual style via worked examples but the KEBNF grammar itself + /// (KerML §8.2.2.1) treats white space purely as an ignored separator. The wrapper + /// encodes the SST conventions through three rules that apply to every Append + /// regardless of call-site: + /// + /// + /// + /// Leading whitespace at logical line start is suppressed — when the wrapper is + /// armed to emit the indent prefix, any leading space characters in the payload are + /// dropped before the first real content character triggers the indent emission. This + /// removes the leading-space defect ( standard library package). + /// + /// + /// Consecutive ASCII spaces are collapsed — never emit two spaces in a row outside + /// the indent prefix. This removes every double-space defect + /// (standard library, Array {, [1.. *], = mRef, etc.). + /// + /// + /// Tight-left and tight-both terminals strip the preceding trailing space — when + /// the payload is recognised as one of the SST-canonical tight punctuation tokens + /// (,, ), ], ;, ., ::, ..), any trailing + /// space already in the buffer is removed before the token is emitted. Tight-both tokens + /// additionally have their own trailing space stripped from the payload, so + /// :: emits as :: not :: . This removes + /// Collections::* ;, mRef .dimensions, [1.. *] and friends. + /// + /// + /// + /// The classification is intentionally minimal — only the punctuation tokens whose + /// canonical form is unambiguous in the SST examples are listed. Operators like + /// :>, :>>, :=, = remain infix with a space on both + /// sides; they emit through the regular character-level path. + /// /// public sealed class IndentedStringBuilder { @@ -49,6 +88,40 @@ public sealed class IndentedStringBuilder /// private const string IndentUnit = " "; + /// + /// Terminals whose canonical SST form has NO space before but DO have a space after + /// (the trailing space is part of the inter-token separator the next emission needs). + /// ; is included here so with the statement + /// terminator also strips the preceding trailing space. + /// [ is included so multiplicity / indexer brackets attach directly to the + /// preceding identifier (Number[1..*], array[i]) per the SST tutorial + /// convention; at logical line start (e.g. the multiplicity-prefix [1] wheel) + /// there is no preceding space to strip, so this remains backward-compatible. + /// # is included so index / select expressions attach directly to the + /// preceding identifier (frontWheel#(1)); at logical line start (e.g. + /// #metadata annotations) there is no preceding space to strip. + /// ( is intentionally NOT in this set — it is contextual (foo(x) tight + /// vs not (x or y) separated) and a runtime distinction would require either + /// grammar-aware emission or a dedicated helper. + /// + private static readonly HashSet TightLeftTerminals = [",", ")", "]", ";", "[", "#"]; + + /// + /// Terminals whose canonical SST form has NO space on either side: qualified-name + /// separator ::, range separator .., and dotted-access .. + /// + private static readonly HashSet TightBothTerminals = [".", "::", ".."]; + + /// + /// Characters that, when they appear as the last buffered character, suppress any + /// leading space in the next payload — the SST tutorial shows no space between an + /// opening bracket / prefix operator and the content that follows + /// ([1..5], foo(x), ~negative, #metadata). Tracked at + /// character granularity so it composes naturally with the consecutive-space + /// collapse in . + /// + private static readonly HashSet TightRightChars = ['[', '(', '~', '#']; + /// /// The underlying all writes are forwarded to. /// @@ -62,6 +135,29 @@ public sealed class IndentedStringBuilder /// private bool atLineStart = true; + /// + /// Depth counter for the inline-block mode. When non-zero, line-terminating writes + /// (, ) emit their payload + /// followed by a single ASCII space INSTEAD of a line terminator, and the indent + /// push/pop calls (, ) are + /// no-ops. Used by the textual-notation code generator to render constraint bodies + /// ({ expr }) on a single line per the SST tutorial convention, while leaving + /// multi-statement bodies (calculations, packages, definitions) on their multi-line + /// canonical form. + /// + private int inlineBlockDepth; + + /// + /// Single-shot flag set the moment a token has just + /// been emitted. The next invocation that + /// receives an ASCII space character drops it and clears the flag, ensuring no + /// inter-token space appears immediately after a tight-both terminal (e.g. + /// [1..*], not [1.. *]; Collections::*, not + /// Collections:: *). Cleared by any non-space character emission, so it never + /// affects content beyond the very next emission. + /// + private bool suppressNextLeadingSpace; + /// /// Gets the current indentation level. A level of 0 means no prefix is emitted /// at the start of new lines; each unit increment adds one @@ -73,10 +169,15 @@ public sealed class IndentedStringBuilder /// Increments by one. Called by the textual-notation code /// generator immediately after a block-opening { terminal has been emitted, so /// that all subsequent lines inside the block are prefixed by an additional indent - /// unit. + /// unit. No-op while inside an inline block (see ). /// public void IncreaseIndent() { + if (this.inlineBlockDepth > 0) + { + return; + } + this.IndentLevel++; } @@ -86,10 +187,16 @@ public void IncreaseIndent() /// the closing brace itself aligns with the level of the block's owning declaration /// rather than the level of the block's contents. Guards against underflow: if the /// level is already 0 the call is a no-op, ensuring a malformed grammar with - /// an unmatched closing brace cannot push the level negative. + /// an unmatched closing brace cannot push the level negative. No-op while inside an + /// inline block (see ). /// public void DecreaseIndent() { + if (this.inlineBlockDepth > 0) + { + return; + } + if (this.IndentLevel > 0) { this.IndentLevel--; @@ -97,24 +204,51 @@ public void DecreaseIndent() } /// - /// Appends a single to the underlying buffer. If this is the - /// first non-newline content of a new logical line, the configured indent prefix is - /// emitted first. + /// Enters inline-block mode. While inline-block depth is non-zero, every + /// line-terminating write (, ) + /// emits its payload followed by a single ASCII space INSTEAD of a line terminator, + /// and / are no-ops. + /// Used by the textual-notation code generator to render constraint bodies + /// ({ expr }) on a single line per the SST tutorial convention. Calls nest: + /// the wrapper exits inline-block mode only when every + /// has been matched by an . + /// + public void EnterInlineBlock() + { + this.inlineBlockDepth++; + } + + /// + /// Exits one level of inline-block mode previously entered via + /// . Guards against underflow: a call at depth zero is + /// a no-op. + /// + public void ExitInlineBlock() + { + if (this.inlineBlockDepth > 0) + { + this.inlineBlockDepth--; + } + } + + /// + /// Appends a single to the underlying buffer, applying the + /// leading-whitespace-at-line-start and consecutive-space-collapse normalisation + /// rules described on the type. /// /// The character to append. /// The current instance, to allow chaining. public IndentedStringBuilder Append(char value) { - this.EmitIndentIfNeeded(); - this.builder.Append(value); + this.AppendCharNormalized(value); return this; } /// - /// Appends a to the underlying buffer. If this is the first - /// non-newline content of a new logical line, the configured indent prefix is emitted - /// first. A null or empty is a no-op and does not - /// arm the indent prefix. + /// Appends a to the underlying buffer, applying tight-left / + /// tight-both stripping for recognised punctuation tokens and the per-character + /// normalisation rules described on the type. A null or empty + /// is a no-op. /// /// The string to append; may be null or empty. /// The current instance, to allow chaining. @@ -125,18 +259,37 @@ public IndentedStringBuilder Append(string value) return this; } - this.EmitIndentIfNeeded(); - this.builder.Append(value); + var isTightBoth = this.ApplyTightTokenNormalisation(ref value); + + foreach (var character in value) + { + this.AppendCharNormalized(character); + } + + if (isTightBoth) + { + this.suppressNextLeadingSpace = true; + } + return this; } /// /// Appends the default line terminator to the underlying buffer and arms the wrapper - /// to emit the indent prefix on the next non-newline write. + /// to emit the indent prefix on the next non-newline write. While inside an inline + /// block (see ), emits a single ASCII space instead of + /// the line terminator, so the next emission stays on the same logical line. /// /// The current instance, to allow chaining. public IndentedStringBuilder AppendLine() { + if (this.inlineBlockDepth > 0) + { + this.AppendCharNormalized(' '); + return this; + } + + this.StripTrailingSpace(); this.builder.AppendLine(); this.atLineStart = true; return this; @@ -144,16 +297,44 @@ public IndentedStringBuilder AppendLine() /// /// Appends followed by the default line terminator to the - /// underlying buffer. If this is the first non-newline content of a new logical line, - /// the configured indent prefix is emitted first; the wrapper is then armed to emit - /// the indent prefix on the next non-newline write. + /// underlying buffer. If is a recognised tight-left or + /// tight-both punctuation token (e.g. ;, }), any trailing space already + /// in the buffer is stripped first. Per-character normalisation applies to the + /// payload regardless. The wrapper is then armed to emit the indent prefix on the + /// next non-newline write. While inside an inline block (see + /// ), emits the payload followed by a single ASCII + /// space instead of the line terminator, so the next emission stays on the same + /// logical line. /// /// The string to append before the line terminator. /// The current instance, to allow chaining. public IndentedStringBuilder AppendLine(string value) { - this.EmitIndentIfNeeded(); - this.builder.AppendLine(value); + if (string.IsNullOrEmpty(value)) + { + return this.AppendLine(); + } + + var isTightBoth = this.ApplyTightTokenNormalisation(ref value); + + foreach (var character in value) + { + this.AppendCharNormalized(character); + } + + if (isTightBoth) + { + this.suppressNextLeadingSpace = true; + } + + if (this.inlineBlockDepth > 0) + { + this.AppendCharNormalized(' '); + return this; + } + + this.StripTrailingSpace(); + this.builder.AppendLine(); this.atLineStart = true; return this; } @@ -168,6 +349,95 @@ public override string ToString() return this.builder.ToString(); } + /// + /// Applies the tight-token preamble: when is a recognised + /// tight-left or tight-both terminal (optionally with a single trailing space, as the + /// code generator emits e.g. ", " / ":: "), strips any trailing space + /// already in the buffer. For tight-both terminals the trailing space of + /// is also stripped from the payload so the next content + /// sits directly against the terminal. + /// + /// + /// The payload string. Passed by reference so the trailing space can be removed + /// in-place for tight-both terminals. + /// + private bool ApplyTightTokenNormalisation(ref string value) + { + var coreToken = value.Length > 1 && value[^1] == ' ' ? value[..^1] : value; + + if (TightLeftTerminals.Contains(coreToken) || TightBothTerminals.Contains(coreToken)) + { + this.StripTrailingSpace(); + } + + if (TightBothTerminals.Contains(coreToken)) + { + value = coreToken; + return true; + } + + return false; + } + + /// + /// Appends a single character with the leading-whitespace-at-line-start and + /// consecutive-space-collapse normalisation rules applied. + /// + /// The character to append. + private void AppendCharNormalized(char character) + { + if (character == ' ') + { + if (this.atLineStart) + { + return; + } + + if (this.suppressNextLeadingSpace) + { + this.suppressNextLeadingSpace = false; + return; + } + + if (this.builder.Length == 0) + { + return; + } + + var previousCharacter = this.builder[this.builder.Length - 1]; + + if (previousCharacter == ' ') + { + return; + } + + if (TightRightChars.Contains(previousCharacter)) + { + return; + } + + this.builder.Append(' '); + return; + } + + this.suppressNextLeadingSpace = false; + this.EmitIndentIfNeeded(); + this.builder.Append(character); + } + + /// + /// Removes any trailing ASCII space characters from the underlying buffer. Used by + /// the tight-token normalisation to ensure punctuation like ; or :: is + /// emitted immediately after the previous token without an interposed space. + /// + private void StripTrailingSpace() + { + while (this.builder.Length > 0 && this.builder[this.builder.Length - 1] == ' ') + { + this.builder.Length--; + } + } + /// /// Emits repetitions of to the /// underlying buffer if the wrapper is positioned at the start of a new line, then diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs index 0557c413..5f38e9b2 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/SharedTextualNotationBuilder.cs @@ -576,10 +576,21 @@ internal static void AppendName(IndentedStringBuilder stringBuilder, string name /// /// The to append to /// The body text to format as a REGULAR_COMMENT - internal static void AppendRegularComment(IndentedStringBuilder stringBuilder, string body) + /// + /// When true, emits a blank line immediately before /* and immediately + /// after */ (only meaningful for multi-line comment bodies). Used by the + /// Documentation rule so doc /* … */ blocks are visually separated + /// from surrounding members. When false (the default), the comment body is + /// emitted adjacent to its neighbouring statements — the SST convention for + /// non-doc-prefixed comments. + /// + internal static void AppendRegularComment(IndentedStringBuilder stringBuilder, string body, bool surroundWithBlankLines = false) { - stringBuilder.AppendLine(); - + if (surroundWithBlankLines) + { + stringBuilder.AppendLine(); + } + if (string.IsNullOrWhiteSpace(body)) { stringBuilder.AppendLine("/* */"); @@ -606,7 +617,11 @@ internal static void AppendRegularComment(IndentedStringBuilder stringBuilder, s } stringBuilder.AppendLine(" */"); - stringBuilder.AppendLine(); + + if (surroundWithBlankLines) + { + stringBuilder.AppendLine(); + } } /// From b94bac19ebe17a9c655ae9470790089875fb4494 Mon Sep 17 00:00:00 2001 From: atheate Date: Thu, 4 Jun 2026 09:14:30 +0200 Subject: [PATCH 3/4] fix couple of SQ issue --- ...FeatureMembershipTextualNotationBuilder.cs | 13 ------ ...ocationExpressionTextualNotationBuilder.cs | 1 + ...LiteralExpressionTextualNotationBuilder.cs | 41 ------------------- ...peratorExpressionTextualNotationBuilder.cs | 33 +++++++++------ .../Writers/PackageTextualNotationBuilder.cs | 2 +- 5 files changed, 23 insertions(+), 67 deletions(-) delete mode 100644 SysML2.NET.Serializer.TextualNotation/Writers/LiteralExpressionTextualNotationBuilder.cs diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs index f9a97875..6f4617c6 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/FeatureMembershipTextualNotationBuilder.cs @@ -20,8 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - - using SysML2.NET.Core.POCO.Core.Features; using SysML2.NET.Core.POCO.Core.Types; /// @@ -29,16 +27,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers /// public static partial class FeatureMembershipTextualNotationBuilder { - /// - /// Build the memberFeature=[QualifiedName] of the rule - /// - /// The from which the rule should be build - /// The used to get access to CursorCollection for the current - /// The that contains the entire textual notation - private static void BuildMemberFeature(IFeatureMembership poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) - { - } - /// /// Builds the Textual Notation string for the rule InitialNodeMember. /// InitialNodeMember:FeatureMembership=MemberPrefix'first'memberFeature=[QualifiedName]RelationshipBody @@ -106,6 +94,5 @@ private static void BuildEntryTransitionMemberHandCoded(IFeatureMembership poco, ownedRelatedElementCursor.Move(); } } - } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/InvocationExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/InvocationExpressionTextualNotationBuilder.cs index 524f7818..ea8d3141 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/InvocationExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/InvocationExpressionTextualNotationBuilder.cs @@ -36,6 +36,7 @@ public static partial class InvocationExpressionTextualNotationBuilder /// The private static void BuildInvocationTypeMember(IInvocationExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { + // Placeholder for non-existing rule } } } diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/LiteralExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/LiteralExpressionTextualNotationBuilder.cs deleted file mode 100644 index 4f6bec77..00000000 --- a/SysML2.NET.Serializer.TextualNotation/Writers/LiteralExpressionTextualNotationBuilder.cs +++ /dev/null @@ -1,41 +0,0 @@ -// ------------------------------------------------------------------------------------------------- -// -// -// Copyright (C) 2022-2026 Starion Group S.A. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// -// ------------------------------------------------------------------------------------------------ - -namespace SysML2.NET.Serializer.TextualNotation.Writers -{ - - using SysML2.NET.Core.POCO.Kernel.Expressions; - - /// - /// Hand-Coded part of the - /// - public static partial class LiteralExpressionTextualNotationBuilder - { - /// - /// Build the Value rule for real - /// - /// The - /// The used to get access to CursorCollection for the current - /// The - private static void BuildValue(ILiteralExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) - { - } - } -} diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/OperatorExpressionTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/OperatorExpressionTextualNotationBuilder.cs index c8e88c44..ddb21292 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/OperatorExpressionTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/OperatorExpressionTextualNotationBuilder.cs @@ -48,22 +48,12 @@ public static partial class OperatorExpressionTextualNotationBuilder /// The that contains the entire textual notation private static void BuildClassificationExpressionHandCoded(IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { - var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); - - stringBuilder.Append(poco.Operator); - stringBuilder.Append(' '); - - if (ownedRelationshipCursor.Current is IParameterMembership parameterMembership) - { - ParameterMembershipTextualNotationBuilder.BuildTypeReferenceMember(parameterMembership, writerContext, stringBuilder); - } - - ownedRelationshipCursor.Move(); + BuildCommonClassificationExpression(poco, writerContext, stringBuilder); } /// /// Builds the Textual Notation string for the (…) alternation inside the - /// MetaclassificationExpression rule. + /// MetaclassificationExpression and ClassificationExpression rule. /// ( operator = ClassificationTestOperator ownedRelationship += TypeReferenceMember /// | operator = MetaCastOperator ownedRelationship += TypeResultMember ) /// Identical structure to — the @@ -76,6 +66,25 @@ private static void BuildClassificationExpressionHandCoded(IOperatorExpression p /// The used to get access to CursorCollection for the current /// The that contains the entire textual notation private static void BuildMetaclassificationExpressionHandCoded(IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) + { + BuildCommonClassificationExpression(poco, writerContext, stringBuilder); + } + + /// + /// Builds the Textual Notation string for the (…) common alternation inside the + /// MetaclassificationExpression rule. + /// ( operator = ClassificationTestOperator ownedRelationship += TypeReferenceMember + /// | operator = MetaCastOperator ownedRelationship += TypeResultMember ) + /// Identical structure to — the + /// operator literal is one of 'istype', 'hastype', '@', 'meta'. + /// Both membership alternatives share the same body and runtime type hierarchy, so a single + /// call + /// handles both branches. + /// + /// The being serialised + /// The used to get access to CursorCollection for the current + /// The that contains the entire textual notation + private static void BuildCommonClassificationExpression(IOperatorExpression poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { var ownedRelationshipCursor = writerContext.CursorCache.GetOrCreateCursor(poco.Id, "ownedRelationship", poco.OwnedRelationship); diff --git a/SysML2.NET.Serializer.TextualNotation/Writers/PackageTextualNotationBuilder.cs b/SysML2.NET.Serializer.TextualNotation/Writers/PackageTextualNotationBuilder.cs index 1ead1501..a22f1911 100644 --- a/SysML2.NET.Serializer.TextualNotation/Writers/PackageTextualNotationBuilder.cs +++ b/SysML2.NET.Serializer.TextualNotation/Writers/PackageTextualNotationBuilder.cs @@ -20,7 +20,6 @@ namespace SysML2.NET.Serializer.TextualNotation.Writers { - using SysML2.NET.Core.POCO.Kernel.Packages; /// @@ -36,6 +35,7 @@ public static partial class PackageTextualNotationBuilder /// The private static void BuildFilterPackageImport(IPackage poco, TextualNotationWriterContext writerContext, IndentedStringBuilder stringBuilder) { + // Placeholder for non existing rule } } } From 256c886626789de33a1fcf9506fdcf1570593292 Mon Sep 17 00:00:00 2001 From: atheate Date: Thu, 4 Jun 2026 09:53:07 +0200 Subject: [PATCH 4/4] SQ issues --- .../HandleBarHelpers/RulesHelper.cs | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs index 0e8dbf93..9efa052c 100644 --- a/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs +++ b/SysML2.NET.CodeGenerator/HandleBarHelpers/RulesHelper.cs @@ -94,7 +94,7 @@ public static void RegisterRulesHelper(this IHandlebars handlebars) ruleGenerationContext.AllRules.AddRange(allRules); - var isOperatorExpressionRule = IsOperatorExpressionRule(textualRule, umlClass); + var isOperatorExpressionRule = IsOperatorExpressionRule(umlClass); var isOwnedExpressionRule = string.Equals(textualRule.RuleName, "OwnedExpression", StringComparison.Ordinal); var isInlineBraceBodyRule = IsInlineBraceBodyRule(textualRule); @@ -152,30 +152,16 @@ public static void RegisterRulesHelper(this IHandlebars handlebars) /// WriteRule to wrap the generated builder body with a precedence-stack /// push/pop so operand-rendering can decide on parens. /// - /// The textual notation rule being generated. /// The rule's target . /// true when the target is OperatorExpression or a subclass. - private static bool IsOperatorExpressionRule(TextualNotationRule rule, IClass umlClass) + private static bool IsOperatorExpressionRule(IClass umlClass) { if (umlClass == null) { return false; } - if (string.Equals(umlClass.Name, "OperatorExpression", StringComparison.Ordinal)) - { - return true; - } - - foreach (var general in umlClass.QueryAllGeneralClassifiers()) - { - if (string.Equals(general.Name, "OperatorExpression", StringComparison.Ordinal)) - { - return true; - } - } - - return false; + return string.Equals(umlClass.Name, "OperatorExpression", StringComparison.Ordinal) || umlClass.QueryAllGeneralClassifiers().Any(general => string.Equals(general.Name, "OperatorExpression", StringComparison.Ordinal)); } /// @@ -200,19 +186,14 @@ private static bool IsInlineBraceBodyRule(TextualNotationRule rule) return false; } - foreach (var alternative in rule.Alternatives) + foreach (var alternative in rule.Alternatives.Where(alternative => alternative.Elements.Count == 3)) { - if (alternative.Elements.Count != 3) - { - continue; - } - - if (alternative.Elements[0] is not TerminalElement openBrace || openBrace.Value != "{") + if (alternative.Elements[0] is not TerminalElement { Value: "{" }) { continue; } - if (alternative.Elements[2] is not TerminalElement closeBrace || closeBrace.Value != "}") + if (alternative.Elements[2] is not TerminalElement { Value: "}" }) { continue; }