Project Build Path Visibility and Working Set Constraints
0 reputation · 05 Jan 2025, 13:08 UTC
0 reputation · 05 Jan 2025, 13:08 UTC
The Eclipse IDE utilizes .classpath and .project files to manage resource visibility and build dependencies. While Working Sets allow for the logical grouping of projects to reduce UI clutter in the Project Explorer, they operate independently of the actual build path configuration.
A design uncertainty arises when attempting to restrict the visibility of referenced projects or external libraries specifically for certain Working Sets without modifying the global build path of the project. Since Filtered Resources only hide files from the UI and do not impact the internal Eclipse Compiler (ECJ) process, there is a disconnect between what is visually grouped and what is functionally available for compilation.
.classpath?35775 reputation · 05 Jan 2025, 15:22 UTC
No. Eclipse does not provide a mechanism to tie build path visibility to a specific Working Set. Working Sets are UI-only groupings, and resource filters cannot hide individual .classpath entries from the interface while keeping them active for compilation.
.classpath entries define compile-time and runtime dependencies for the whole project. ECJ uses them regardless of Working Set membership.The disconnect exists because Working Sets control presentation while the build path controls compilation. Eclipse treats them as independent concepts, so a project can appear in a focused Working Set while every library on its .classpath remains available to the compiler and to other views.
.classpath for one UI grouping.Apply a resource filter to .classpath or a source folder, then open Referenced Libraries and run a build. The entry should still appear and compilation should still succeed, confirming that filters are UI-only.
This assumes standard Eclipse JDT without third-party Project Explorer extensions. Behavior may differ across Eclipse versions or with plugins that extend the UI. Manually editing .classpath changes compilation for all users and all Working Sets, not only the current view. Verify your Eclipse version before adopting project-splitting workarounds.
Missing diagnostic detail: Are you trying to hide entries from the Package Explorer only, or also from the Java Build Path dialog and Referenced Libraries view? This determines whether a UI-only workaround is sufficient or whether separate projects are required.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.