Bug 568787 - Implement nested resource hiding as resource filters
Summary: Implement nested resource hiding as resource filters
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 4.18   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-Resources-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-13 05:44 EST by Mickael Istria CLA
Modified: 2020-11-13 06:14 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mickael Istria CLA 2020-11-13 05:44:00 EST
Currently, m2e option to hide physically nested projects is included deep into the resource model. It can sometimes be out of sync, and some folders are hidden while project is absent or removed from the workspace. (those cases of mis-synchronization should be reported separately, I'm still trying to figure out some steps to reproduce).
In such case, the content of the parent project seems incorrect until the parent project gets deleted from workspace and re-added (to start from a fresh resource state).

To at least allow nicer workarounds for this approach, the strategy to hide resources should build on top of resource filters rather than directly setting setHidden(true). Resource filters can then be configured by end-users in case of erroneous synchronization.
Comment 1 Fred Bricon CLA 2020-11-13 05:56:40 EST
mmm the problem with this new approach is it'll modify .project. If that file is shared via SCM, then you're forcing the same "hide nested project" setting to all developers of the same project.
Comment 2 Mickael Istria CLA 2020-11-13 05:59:49 EST
Moving to Platform as such resource filter may make sense in the general Resource model directly.
Currently, the Project Explorer and m2e have "workarounds" to better deal with nested projects; this always includes a way to hide the folders that map to projects.
Such capability should be offered out of the box as a workspace preference. A safe implementation could be to rely on the Resource Filters, so opening a project would place a resource filter for it on any matching parent parent project. This will hide the resource in most UI elements (including search) but would still allow users to override or fix it at their own convenience.
Comment 3 Mickael Istria CLA 2020-11-13 06:00:32 EST
(In reply to Fred Bricon from comment #1)
> mmm the problem with this new approach is it'll modify .project. If that
> file is shared via SCM, then you're forcing the same "hide nested project"
> setting to all developers of the same project.

That's indeed a very valid concern...
Comment 4 Mickael Istria CLA 2020-11-13 06:11:04 EST
Let's drop the idea, the fact that the setting leak into .project make it no so interesting.