> No, please don't do that!

+1

Dani



From:   "Andrey Loskutov" <losku...@gmx.de>
To:     platform-dev@eclipse.org
Date:   21.01.2020 10:53
Subject:        [EXTERNAL] Re: [platform-dev] Marking nested projects as 
derived, what are the risks?
Sent by:        platform-dev-boun...@eclipse.org



No, please don't do that!
 
I think the javadoc of IResource.setDerived explains why:
 
##########
A derived resource is a regular file or folder that is created in the 
course of translating, compiling, copying, or otherwise processing other 
files. Derived resources are not original data, and can be recreated from 
other resources. It is commonplace to exclude derived resources from 
version and configuration management because they would otherwise clutter 
the team repository with version of these ever-changing files as each user 
regenerates them.
If a resource or any of its ancestors is marked as derived, a team 
provider should assume that the resource is not under version and 
configuration management by default. That is, the resource should only be 
stored in a team repository if the user explicitly indicates that this 
resource is worth saving.
Newly-created resources are not marked as derived; rather, the mark must 
be set explicitly using setDerived(true, IProgressMonitor). Derived marks 
are maintained in the in-memory resource tree, and are discarded when the 
resources are deleted. Derived marks are saved to disk when a project is 
closed, or when the workspace is saved.
Projects and the workspace root are never considered derived; attempts to 
mark them as derived are ignored.
##########
 
Kind regards,
Andrey Loskutov

Спасение утопающих - дело рук самих утопающих

https://www.eclipse.org/user/aloskutov
 
 
Gesendet: Dienstag, 21. Januar 2020 um 10:39 Uhr
Von: "Mickael Istria" <mist...@redhat.com>
An: "Eclipse platform general developers list." <platform-dev@eclipse.org>
Betreff: [platform-dev] Marking nested projects as derived, what are the 
risks?
Hi all,
 
In m2e, BuildShip or even for the Open Resources and other views, one 
issue appears often: duplication of resources in visible area, confusing 
users.
The m2e issue about it is 
https://bugs.eclipse.org/bugs/show_bug.cgi?id=500624 .
Eclipse Platform has the idea of "derived" resources which are well 
integrated in several views/dialogs so they can be hidden. So I'm curious 
about what would be the impact of marking nested projects as derived? 
Let's say I have A and A/B imported as projects in workspace, what bad 
things could happen if the B folder inside A is marked as derived when A/B 
is here?
Is the derived flag affecting some core stuff or only UI?
Would it be do-able to have a property to control whether to automatically 
mark such folders as derived when they're nested project, and let users 
manage it or is it too much risk...?
 
Thanks in advance for your insights.
-- 
Mickael Istria
Eclipse IDE developer, for Red Hat Developers
_______________________________________________ platform-dev mailing list 
platform-dev@eclipse.org To change your delivery options, retrieve your 
password, or unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/platform-dev
_______________________________________________
platform-dev mailing list
platform-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe 
from this list, visit
https://www.eclipse.org/mailman/listinfo/platform-dev



_______________________________________________
platform-dev mailing list
platform-dev@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://www.eclipse.org/mailman/listinfo/platform-dev

Reply via email to