Automated Tool to optimize import generation #22

Closed
opened 2022-04-14 05:44:10 +02:00 by Speiger · 0 comments
Owner

The Idea is that Imports are generated through templates.
Though sometimes mistakes are made.

So the idea is to write a import tool that reverses the logic.
First run through all the sourcecode in the IDE and force a "organize imports" that will make basically imports done properly sorted.

After that is done run a tool scan all the .java files that are auto generated and copy in all "imports". Then templificate the imports and compare which each implementation needs them.

Once that is done output the import section. Either through console or directly into the file itself.

Console would make most sense since that would secure templates never being written to, and just read from.

The Idea is that Imports are generated through templates. Though sometimes mistakes are made. So the idea is to write a import tool that reverses the logic. First run through all the sourcecode in the IDE and force a "organize imports" that will make basically imports done properly sorted. After that is done run a tool scan all the .java files that are auto generated and copy in all "imports". Then templificate the imports and compare which each implementation needs them. Once that is done output the import section. Either through console or directly into the file itself. Console would make most sense since that would secure templates never being written to, and just read from.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Speiger/Primitive-Collections#22
No description provided.