Skip to content

Conversation

@lm-sousa
Copy link
Member

No description provided.

Copy link

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 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 BiFunctionClassMap instead of FunctionClassMap, adding JavaWeaver as a parameter
  • Updated all joinpoint constructors and factory methods to accept and pass JavaWeaver instances
  • 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.
…Converters. An explicit entry is now present to ensure the proper joinpoint is created.
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