Locate specific class in file without the help of IDE


Hello, I am an Android/Java developer who recently got into Kotlin.

So I was wondering. Is it a good practice to just throw a bunch of data classes/interface/normal classes or whatever into the same kotlin file? Consider the following example:

I have a few data classes inside Entities.kt file. So somewhere in my code I make use of the User() class which is a class that resides in those Entities.kt file. The problem is that after reading up on my code again I can’t easily know where this User class comes from without the help of IDE. Of course I look at the imports but they only reveal package and class name. Not the specific kotlin filename.

Is there a way to know that the User() data class is located in Entities.kt file without using search or tricks like ctrl + click?


No, so it’s the responsibility of the programmer to organize the code well.