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

java file merge #595

Open
clcy1243 opened this issue Jun 18, 2020 · 2 comments
Open

java file merge #595

clcy1243 opened this issue Jun 18, 2020 · 2 comments

Comments

@clcy1243
Copy link

Could u support java file merge? I try write generator plugin to support it, it's painful.

May be I should write a new maven plugin by way of overwrite MavenShellCallBack

@jeffgbutler
Copy link
Member

We support Java file merge in the Eclipse plugin. The merge makes use of Eclipse's Java parser and AST walker - which is a very difficult thing to implement.

I'm assuming it is possible to do it outside of Eclipse with something like https://javaparser.org/ and I have it on my list of things to investigate in the future.

@octoape
Copy link
Contributor

octoape commented Dec 17, 2023

I don't understand exactly how you want to merge, maybe the following pattern could solve the problem without merging:
https://github.com/jsonshen/MyBatisX/blob/master/examples/src/main/java/org/shenjia/mybatis/examples/dao/MultiColPkDao.java
MultiColPkDao.java file is manually maintained by the user will not be overwritten, MultiColPkMapper.java is completely auto-generated code.

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

No branches or pull requests

3 participants