Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Folders in Eclipse Java project

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a subdirectory of my java project that I want to use to hold resources that are not java code.
How do I get this subdirectory to appear in the Package Explorer as a folder instead of as a java package.
I want my resource folder to be decorated with the folder icon instead of the java package icon.

When I use the New/Folder option of the package explorer context menu, the new subdirectory is decorated as a
java package, not as a folder. Choosing New/Folder seems to have the same effect as new/Package.

Rick
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Remove it from the list of source directories?
 
Rich Smyth
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the suggestion. I gave that a try, but it does not seem to make a difference.

 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see how a non-source directory would get a source decoration; how are you removing it?
 
Rich Smyth
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im using Eclipse 3.4.2
On the Source tab of the project properties window, I specifed a mask that excludes the directory.
Is there another way to exclude the directory?
I included, as an attachement, a screen shot showing my project in the package explorer tab.

the project has a subfolder called third_party_lib, which is decorated as an empty package. I would like to see this directory and all its subdirectories decorated with the folder icon. Curiously, the subdirectory third_party_lib/quinn-curtis is decorated as a folder. When I created the log4j folder under the third_party_lib directory (as I did for quinn-curtis) the log4j subdirectory appears as a package, not a folder.

See the attached screen print for a clearer picture.
FolderDecoration.jpg
[Thumbnail for FolderDecoration.jpg]
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm, I didn't think that's what include/exclude did, but I tend not to mess with that. I normally just explicitly list the source folders I want Eclipse to deal with if they're non-obvious. That's how I've dealt with Maven's default directory layout when not using a Maven plugin, or crazy projects with source files all over the place.

That said, I'm not convinced resource files should be non-source files, since that would exclude them from normal classpath packaging (only relevant if it's a webapp, though, I suppose?)
 
A tiny monkey bit me and I got tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic