Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the JavaWeaver architecture to support multiple weaver instances by threading a JavaWeaver parameter through the codebase. Previously, the system relied on static/thread-local access to the weaver, which limited concurrent usage.
Changes:
- Refactored converter classes to use
BiFunctionClassMapinstead ofFunctionClassMap, addingJavaWeaveras a parameter - Updated all joinpoint constructors and factory methods to accept and pass
JavaWeaverinstances - Modified the TypeScript API to include
Weaver.getWeaverEngine()calls - Removed static weaver access methods in favor of instance-based access
Reviewed changes
Copilot reviewed 79 out of 79 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Kadabra-JS/src-api/kadabra/KadabraNodes.ts | Added Weaver.getWeaverEngine() calls to all factory methods |
| JavaWeaver/src/weaver/utils/weaving/converters/*.java | Migrated from FunctionClassMap to BiFunctionClassMap with JavaWeaver parameter |
| JavaWeaver/src/weaver/kadabra/joinpoints/*.java | Updated all constructors and factory methods to accept JavaWeaver parameter |
| JavaWeaver/src/weaver/kadabra/abstracts/AJavaWeaverJoinPoint.java | Added weaver parameter to constructor and updated helper methods |
| JavaWeaver/src/weaver/kadabra/JavaWeaver.java | Removed static getJavaWeaver() and getFactory() methods |
| JavaWeaver/.gitignore | Excluded AJavaWeaverJoinPoint.java from ignore pattern |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Updated FunctionalClassGenerator to accept JavaWeaver as a parameter for method generation. - Modified ActionUtils to pass JavaWeaver instance during code insertion and expression replacement. - Enhanced SelectUtils to utilize JavaWeaver in join point conversions for statements and expressions. - Refactored CtElement2JoinPoint and related converters to support JavaWeaver, ensuring all join point creations are consistent with the new structure. - Adjusted converters for executable, expression, statement, type, and XML node to include JavaWeaver, improving integration and functionality.
ff5656b to
a92b9ec
Compare
…Converters. An explicit entry is now present to ensure the proper joinpoint is created.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.