Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various fixes after udpate to stc v6 #304

Merged
merged 2 commits into from
May 1, 2024
Merged

Various fixes after udpate to stc v6 #304

merged 2 commits into from
May 1, 2024

Conversation

PTKu
Copy link
Member

@PTKu PTKu commented May 1, 2024

  1. The IterateSyntaxTreeForStringLiterals method has been commented out, disabling its execution.
  2. The IterateSyntaxTreeForPragmas method has been uncommented and modified. The token variable now refers to pragmaSyntax and the IsAttributeNamePragmaToken method checks the PragmaContent of the token.
  3. The AddToDictionaryIfLocalizedString method's parameter type has been changed from ISyntaxToken to PragmaSyntax. The TryToGetLocalizedStrings method now checks the PragmaContent of the token.
  4. The pos variable in the AddToDictionaryIfLocalizedString method now gets its value from token.SourceText.GetLineSpan(token.Span).StartLinePosition.
  5. The IsPragmaToken and IsStringToken methods' parameter type has been changed from ISyntaxToken to PragmaSyntax. The check for SyntaxKind.PragmaToken in IsPragmaToken has been commented out.
  6. The IsStringToken method now checks if the SyntaxKind of the token is TypedStringDToken, TypedStringSToken, UntypedStringDToken, or UntypedStringSToken.
  7. The CsOnlinerSourceBuilder and CsPlainSourceBuilder classes have been updated to include a foreach loop that iterates over the UsingDirectives of the fileSyntax object. This loop adds each UsingDirective to the source code with the appropriate namespace. The CsOnlinerSourceBuilder adds the namespace as is, while the CsPlainSourceBuilder prepends "Pocos." to the namespace.
  8. The class_extended_by_known_type.g.cs and file_with_usings.g.cs files have been updated to include additional using directives. These directives import namespaces related to the Simatic.Ax.Stateframework, Simatic.Ax.StatePattern, and various FileWithUsings namespaces.
  9. The class_extended_by_known_type.g.cs and file_with_usings.g.cs files have also been updated to include additional using directives under the Pocos namespace. These directives import the same namespaces as above, but under the Pocos namespace.

PTKu added 2 commits May 1, 2024 08:45
…n the `CsOnlinerSourceBuilder` and `CsPlainSourceBuilder` classes, which iterates over the `UsingDirectives` of the `fileSyntax` object and adds each `UsingDirective` to the source code with the appropriate namespace. Additionally, the `class_extended_by_known_type.g.cs` and `file_with_usings.g.cs` files have been updated to include more `using` directives, importing namespaces related to `Simatic.Ax.Stateframework`, `Simatic.Ax.StatePattern`, and various `FileWithUsings` namespaces.

1. The `CsOnlinerSourceBuilder` and `CsPlainSourceBuilder` classes have been updated to include a foreach loop that iterates over the `UsingDirectives` of the `fileSyntax` object. This loop adds each `UsingDirective` to the source code with the appropriate namespace. The `CsOnlinerSourceBuilder` adds the namespace as is, while the `CsPlainSourceBuilder` prepends "Pocos." to the namespace.
2. The `class_extended_by_known_type.g.cs` and `file_with_usings.g.cs` files have been updated to include additional `using` directives. These directives import namespaces related to the `Simatic.Ax.Stateframework`, `Simatic.Ax.StatePattern`, and various `FileWithUsings` namespaces.
3. The `class_extended_by_known_type.g.cs` and `file_with_usings.g.cs` files have also been updated to include additional `using` directives under the `Pocos` namespace. These directives import the same namespaces as above, but under the `Pocos` namespace.
…ods to change the parameter type from `ISyntaxToken` to `PragmaSyntax`. This includes the `AddToDictionaryIfLocalizedString`, `IsPragmaToken`, and `IsStringToken` methods. Additionally, the `IterateSyntaxTreeForPragmas` method has been uncommented and modified, and the `IterateSyntaxTreeForStringLiterals` method has been commented out. The `IsStringToken` method now checks for different `SyntaxKind` types.

1. The `IterateSyntaxTreeForStringLiterals` method has been commented out, disabling its execution.
2. The `IterateSyntaxTreeForPragmas` method has been uncommented and modified. The `token` variable now refers to `pragmaSyntax` and the `IsAttributeNamePragmaToken` method checks the `PragmaContent` of the `token`.
3. The `AddToDictionaryIfLocalizedString` method's parameter type has been changed from `ISyntaxToken` to `PragmaSyntax`. The `TryToGetLocalizedStrings` method now checks the `PragmaContent` of the `token`.
4. The `pos` variable in the `AddToDictionaryIfLocalizedString` method now gets its value from `token.SourceText.GetLineSpan(token.Span).StartLinePosition`.
5. The `IsPragmaToken` and `IsStringToken` methods' parameter type has been changed from `ISyntaxToken` to `PragmaSyntax`. The check for `SyntaxKind.PragmaToken` in `IsPragmaToken` has been commented out.
6. The `IsStringToken` method now checks if the `SyntaxKind` of the `token` is `TypedStringDToken`, `TypedStringSToken`, `UntypedStringDToken`, or `UntypedStringSToken`.
@PTKu PTKu merged commit 0df9240 into dev May 1, 2024
2 checks passed
@PTKu PTKu deleted the fix_after_update_stc_6 branch May 1, 2024 07:19
@PTKu PTKu restored the fix_after_update_stc_6 branch May 6, 2024 09:48
PTKu added a commit that referenced this pull request May 6, 2024
PTKu added a commit that referenced this pull request May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant