Community
Participate
Working Groups
Please split the "Use 'src' and 'bin' folders as default in new Java projects" preference into two separate preferences as follows: [ ] "Use 'src' folder as default in new Java projects" [ ] "Use 'bin' folder as default in new Java projects" The best way to describe why I would like this is to paste here a posting I just made to Eclipse Corner that describes how I work. You will notice that I have to do a couple of extra steps to get rid of the 'src' folder. I would just like to eliminate those extra steps. Here is the post: When I run Eclipse, I specify where I want my workspace to be, i.e. C:\eclipse\eclipse.exe -data D:\Eclipse\target So, Eclipse stores all of my projects in D:\Eclipse\target, even though I am running it from C:\eclipse. Of course, the .java and .class files are all mixed together, which I don't like, so when I create a Java project, I tell Eclipse to create 'src' and 'bin' folders. (Window -> Preferences -- Java "Use 'src' and 'bin' folders as default in new Java projects.") Now for one final step, which I do because I don't like the 'src' folder <grin>: - First, I delete the 'src' folder - Then I modify the Properties of the Project (select project, context menu -> Properties) and I also delete the 'src' folder from the Java Build Path - "Source" tab. - After this, I usually select "Use the project as source folder" in the "Source" tab (unless I want to have some other named source folders in the project (not 'src' <g>), in which case I just leave "Use source folders contained in the project" selected). At this point, I am ready to start adding packages to my project. The compiler puts all of my .class files for the projet into the 'bin' directory in: D:\Eclipse\target\MyProject\bin
What I would like is [ ] "Use <user entered text> folder as default 'src' in new Java projects" [ ] "Use <user entered text> folder as default 'bin' in new Java projects" As it's company policy to use javasrc and classes respectively.
When splitting, there are issues with nested classpaths. Output Location set to project and using a 'src' is not allowed. Output Location set to 'bin' and source folders to the project is allowed, but considered bad style. I agree to Chris' proposal; we could allow the user to specify the folder names.
*Strongly* disagree that source in project and output to bin is "bad style". Isn't this the default, when the "Use 'src' and 'bin'" option is unchecked? Java files "in the project" usually end up in "folders" (i.e. directories) anyhow (because they are usually in packages), but even if they are just in the default package (i.e. not in a "folder" at all) this is not "bad style". In SWT, we have multiple source folders. None of them is called 'src'. We do, however, want out class files to go into one 'bin' directory. The classpath is complicated, pointing to a subset of the many source folders, based on which platform is currently being compiled/run. There is no point adding yet another level of folder by putting all of our source folders under a 'src' directory.
Why I think it's 'bad style' is that the two folders overlap. The bin folder is nested in a source folder and in fact its content is visible at compile time. If you would have a package called 'bin' in another classpath entry (e.g. a JAR) the classes in the outputfolder would shadow classes in this package. The result is probably a compilation error. Yes, I know, this a constructed example, but then, why not avoiding nesting. In my opinion, the default project setup should avoid the trickier setups. The default setup is to have the project for both source folder and output. The preference setting was thought to be a helper. I suggest that you turn it off (new projects will the have the project for both output and source folder), and after the creation create your first source folder. At this time you are prompted if you also want to change your output to 'bin'. We don't want to force anybody into the names 'src' and 'bin', so to have it configurable seems to be a good idea to me.
you can now configure the names of the source folder & output location used by default. implemented > 20109