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

Encapsulate global constants in namespace of enclosing type #1002

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

mx990
Copy link
Member

@mx990 mx990 commented Jan 27, 2025

Encapsulate global constants in namespace of enclosing type:

  • change ST parser to encapsulate global constants in namespace of enclosing type,
  • add validation and quickfix for global constants declaration name,
  • update proposals for global constants in ST editor to use qualified name and import enclosing type,
  • update global constants in type library,
  • add refactoring for global constants types,
  • fix file editor input for ST editor.

mx990 added 6 commits January 27, 2025 15:27
Update proposals for global constants in ST editor to use qualified name
and import enclosing type.
The global cinstants editor uses a file editor input for the ST editor.
This adds back support for plain file editor inputs in the
resource-for-editor-input factory.
@mx990 mx990 requested review from azoitl and oberlehner January 27, 2025 14:32
Copy link

Test Results

   111 files  ±0     111 suites  ±0   49s ⏱️ -1s
29 177 tests ±0  29 177 ✅ ±0  0 💤 ±0  0 ❌ ±0 
29 178 runs  ±0  29 178 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit b4b2920. ± Comparison against base commit b44e713.

<With Var="IN"/>
</Event>
</EventInputs>
<EventOutputs>
<Event Name="CNF" Type="Event" Comment="Execution Confirmation">
<Event Name="CNF" Type="Event">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you remove the comment here ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interface of function FBs is (re-)generated by the ST reconciler on each save, so any comments are lost. But there should be no way to add any comments in the first place, besides editing the XML file manually.

@@ -123,7 +123,7 @@ public Change createChange(final IProgressMonitor monitor) throws CoreException,
if (type instanceof FBType) {
return createFBDataChange();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you should check here explicit for global const.
If we rename for example .adp , .dev, .seg ,... this code will be executed.
I don't know if that will work out

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we not need to update those other type entries anyhow?

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.

2 participants