-
Notifications
You must be signed in to change notification settings - Fork 0
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
JNG-5840 transform relations - round 1 #244
Conversation
noherczeg
commented
Jul 16, 2024
•
edited by github-actions
bot
Loading
edited by github-actions
bot
JNG-5840 Transform relations - round 1 |
WalkthroughRecent updates to the project involve extensive modifications across multiple files, primarily enhancing error handling, refining caching mechanisms, and improving functionality related to operations, transformations, and testing. New operations were introduced, particularly for handling relations and fields within the JSL model. Additionally, several test cases were updated and new ones were added to ensure comprehensive validation of nested fields, relations, and various data types. Changes
Sequence Diagram(s)Equivalent Discriminated OperationsequenceDiagram
participant User
participant JSL!equivalentDiscriminated
participant CacheManager
User->>JSL!equivalentDiscriminated: Request equivalentDiscriminated(transformation, id, discriminator)
JSL!equivalentDiscriminated->>CacheManager: Check cache for element with ID
alt Element found in cache
CacheManager-->>JSL!equivalentDiscriminated: Return cached element
else Element not found
JSL!equivalentDiscriminated->>JSL!equivalentDiscriminated: Create new instance
JSL!equivalentDiscriminated->>CacheManager: Store new instance in cache
end
JSL!equivalentDiscriminated-->>User: Return element
Transfer Field Declaration OperationsequenceDiagram
participant User
participant JSL!TransferFieldDeclaration
participant JSL!TransferContainer
participant UI!ui::data::ClassType
User->>JSL!TransferFieldDeclaration: Request getActorDeclaration()
JSL!TransferFieldDeclaration->>JSL!TransferContainer: Get transfer container
JSL!TransferContainer-->>JSL!TransferFieldDeclaration: Return container
JSL!TransferFieldDeclaration->>UI!ui::data::ClassType: Get container equivalent class type
UI!ui::data::ClassType-->>JSL!TransferFieldDeclaration: Return class type
JSL!TransferFieldDeclaration-->>User: Return actor declaration
Poem
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (7)
Files skipped from review as they are similar to previous changes (7)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Outside diff range, codebase verification and nitpick comments (4)
judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/equivalentDiscriminated.eol (2)
9-9
: Typo in comment.Fix the typo in the comment.
- // Find the discriminated id in cahe first + // Find the discriminated id in cache first
35-47
: Clean up commented code.Remove the commented-out code if it is no longer needed.
- /* - for (t in transTrace.transformations) { - if (t.source == self and t.rule.name == transformation) { - t.targets.add(f); - } - } - */judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/jsl/actor/actorDeclaration.eol (1)
Line range hint
53-71
:
Consolidate duplicate logic.The logic for collecting menu declarations is duplicated. Consider refactoring to avoid code duplication.
operation JSL!ActorDeclaration getAllMenuDeclarations(): Set { return self.collectMenuDeclarations(); } operation JSL!ActorGroupDeclaration getAllMenuDeclarations(): Set { return self.collectMenuDeclarations(); } @cached operation JSL!ActorDeclaration collectMenuDeclarations(): Set { var menuDeclarations = new Set(); for (declaration : Any in self.members) { if (declaration.isTypeOf(JSL!ActorLinkDeclaration)) { menuDeclarations.add(declaration); } else if (declaration.isTypeOf(JSL!ActorGroupDeclaration)) { menuDeclarations.addAll(declaration.collectMenuDeclarations()); } } return menuDeclarations; }judo-tatami-jsl-jsl2ui/src/main/epsilon/operations/jsl/data/transferFieldDeclaration.eol (1)
Line range hint
48-56
:
Fix typo in error message.There is a typo in the error message.
- throw "Could not determinate attribute type: " + s.fqName(); + throw "Could not determine attribute type: " + s.fqName();