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

feat: Implement addRecord & getRecordByName for CompilationUnit #3836

Merged
merged 3 commits into from
Jan 6, 2023

Conversation

marcluque
Copy link
Contributor

Hi there,

while working on a project, I noticed missing implementations for getRecordByName and addRecord. I added their implementations and some simple tests for the implementations (similar to the existing ones for enum, etc.).

Let me know if something could be improved or is missing.

@jlerbsc
Copy link
Collaborator

jlerbsc commented Jan 6, 2023

Hi @marcluque Thank you for this suggestion but there is already an addType method. You can adapt the test cases and let the getRecordByName method.

@marcluque
Copy link
Contributor Author

marcluque commented Jan 6, 2023

Hi @jlerbsc, thanks for the quick feedback!
I pushed a new commit that removes addRecord. However, I left the test case and adapted it to use addType, let me know if that's desired.

@jlerbsc jlerbsc merged commit 226045a into javaparser:master Jan 6, 2023
@jlerbsc
Copy link
Collaborator

jlerbsc commented Jan 6, 2023

Thank you for your contribution.

@jlerbsc jlerbsc added this to the next release milestone Jan 6, 2023
@jlerbsc jlerbsc added the PR: Added A PR that introduces new behaviour (e.g. functionality, tests) label Jan 6, 2023
@marcluque marcluque deleted the more-record-support-in-cu branch January 6, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Added A PR that introduces new behaviour (e.g. functionality, tests)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants