Skip to content

Tedefo 4367 adds global variables and functions#112

Merged
rousso merged 6 commits intodevelopfrom
TEDEFO-4367-adds-global-variables-and-functions
Apr 22, 2025
Merged

Tedefo 4367 adds global variables and functions#112
rousso merged 6 commits intodevelopfrom
TEDEFO-4367-adds-global-variables-and-functions

Conversation

@rousso
Copy link
Copy Markdown
Contributor

@rousso rousso commented Apr 21, 2025

No description provided.

@rousso rousso self-assigned this Apr 21, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements global variables and functions support as part of Tedefo 4367 by refactoring identifier management and enhancing translator interfaces.

  • Removed redundant parameter composition calls in EfxExpressionTranslatorV1.
  • Introduced global identifier and function registries and added related utility methods in Context.
  • Enhanced several interfaces (ScriptGenerator, MarkupGenerator, TranslatorOptions, and EfxTranslator) with new methods and documentation to support global functions and user-defined function namespaces.

Reviewed Changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/main/java/eu/europa/ted/efx/sdk1/EfxExpressionTranslatorV1.java Removed redundant calls for parameter declaration/reference composition.
src/main/java/eu/europa/ted/efx/model/variables/Variable.java Adjusted constructor and field initialization ordering.
src/main/java/eu/europa/ted/efx/model/variables/ParameterList.java Introduced new container for parameters.
src/main/java/eu/europa/ted/efx/model/variables/Parameter.java Updated to use a single field (referenceExpression) and modified equality/hashCode implementations.
src/main/java/eu/europa/ted/efx/model/variables/Identifier.java Changed to an abstract class with improved documentation.
src/main/java/eu/europa/ted/efx/model/variables/Function.java Added global function representation.
src/main/java/eu/europa/ted/efx/model/Context.java Added global registries and related methods for identifiers and functions.
src/main/java/eu/europa/ted/efx/interfaces/ScriptGenerator.java, MarkupGenerator.java Updated with new methods for global function and variable declaration support.
src/main/java/eu/europa/ted/efx/EfxTranslatorOptions.java, EfxTranslator.java Enhanced options and translation flows with UDF namespace configuration and new overloaded translateTemplate methods.
Files not reviewed (1)
  • pom.xml: Language not supported

Comment thread src/main/java/eu/europa/ted/efx/model/variables/Parameter.java
Comment thread src/main/java/eu/europa/ted/efx/interfaces/MarkupGenerator.java Outdated
bertrand-lorentz and others added 3 commits April 22, 2025 13:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Use Objects.equals() and Objects.hash() instead of doing it ourselves,
and use all member variables.

Also make sure we use the result from the super class if there is one.
The commit was suggested by Copilot, but it removed the closing of the
javadoc comment...
Copy link
Copy Markdown
Contributor

@bertrand-lorentz bertrand-lorentz left a comment

Choose a reason for hiding this comment

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

Look OK for me now.

@rousso rousso merged commit 358ecaf into develop Apr 22, 2025
1 check passed
@rousso rousso deleted the TEDEFO-4367-adds-global-variables-and-functions branch April 22, 2025 13:31
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.

3 participants