Re: Directories are not Java source file package names
Posted: Oct 1, 2003 10:07 AM
> You have the technical facts right but the human interface
> wrong. The thing to remember is that the source file
> hierarchy is not primarily for the compiler - it's for the
> other people who read your code. When I'm looking for the
> source code for the class named org.whatsit.foo.Bar, I
> look in the corresponding place in the source tree. I
> don't want to have to search around for the source file.
> Being "creative" about arranging your source tree just
> ensures that your source code is that much harder to
> read. So I'm happy that IDE's enforce the conventional
> way of doing things, even if it's not strictly required
> by javac.
The IDE and the rest of my environment have no problem with how I arrange my files. Others looking for source know that the best choice for finding a class is to use "Find in Project Files" (which is informative from a referent class perspective too), or go to explorer and use search, or, click on the "Packages" tab in Kawa and look by package there. We all have found it very convienent to be able to arrange our project folders in the IDE in arbitrary fashion so that we can think the way that we think about the things we are doing. This makes us much more efficient at the mundane tasks of file manipulation.
When a new file is added to the project, and the tree is mostly flat, it appears more obviously in the IDE and you can spot it/them and go see what is up.
> Having empty directories at the top used to bug me too,
> but I got used to it, and now I wouldn't have it any other
Well, but how much of your working mode is driven by the IDE verses what you would be the most efficient doing? That is the real question for me.
I do VI editing and ant compiles on a regular bases too, because it is the fastest way to make changes in many cases.
Others have talked about doing that here. It seems to me that either we are holdouts for a 'better' IDE, or our brains just don't work the way the IDE developers do, and so the collision of UI and thought process is problematic.