IDE Help

fronobulax

Developer
Staff member

A side effect of the above is that the package names embedded in the Java files no longer match the directory structure. All my gradle tasks still work but when I use IntelliJ for various tasks, including navigating through the code base they fail miserable because IntelliJ cannot find classes where it expects them.

There are at least 1,100 files where the package name and the directory structure don't match. IntelliJ has a Refactor command which may address this but a) I can't make it work and b) even if it does work I don't know how to apply it to multiple directory trees.

Assuming there is a way, I'm not sure whether the best strategy is one PR with 1,100+ files or find a way to break things down?

Ideas? Help? Settings to check/change?

Thanks.
 
If you are using intellij idea, my first attempt would be to right click the project in project browser > gradle > there should be something about reimporting the project.
Alternatively, F4 on a module, then go through all modules and reconfigure the Sources tab. Don't ask me how, I haven't had to do any of that in many years.
 
Fixed, I think.

I found the option to interact with gradle (pressing an icon that moused-over as gradle that was on the RHS), right clicked on the name of the project (KoLmafia), got an option to "Sync Gradle Project", did that and many red squiggly lines indicating errors disappeared.

Thank you.

I suspect there is operator error involved. When I first started using IntelliJ or its predecessor, for various reasons I tended to use command line tools to check in/out, update and build and the IDE mostly for source code level debugging. I still do a lot of things with GitDesktop and Gradle from a command line. If I paid more attention to the "integrated" part of IDE I might not have needed to fix this.
 
Back
Top