eclipse-platform / eclipse-platform/eclipse.platform

Support hierarchical project preferences

Aperta
#89 15 commenti 3 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
165
Fork
174
Merge medio
2g 8h
PR unite (30g)
22

Descrizione

Currently project preferences are stored in a folder named `.settings` this has the drawback that if one want to configure an aspect for a set of projects (e.g. formatter settings, compiler preferences, ...) one need to duplicate this (and keep them up to date) for each project. Also wen VCS comes into account the same files need to be versioned multiple times.

To mitigate this and given that most projects have some hierarchical nature (e.g the usual `/plugins/`) I'd like to propose the following enhancement (using `org.eclipse.jdt.core.prefs` as an example):

- Given there is a file `.settings/org.eclipse.jdt.core.prefs` nothing changes
- Given there is no file `.settings/org.eclipse.jdt.core.prefs` then first a file `.eclipse/org.eclipse.jdt.core.prefs` is searched and if found that is used, if that file is not found, the parent folder is checked for this until the root is reached
- If still no file is found `/.eclipse//org.eclipse.jdt.core.prefs` is searched as a last resort

This would allow to have a variety of different use cases:

1. In cases where a user chooses to "enable project specific settings" for certain settings, one could add a new option to not store it in the *project* but in the *workspace*, e.g. if I want to prevent the noise if I open a project that normally do not store eclipse preferences.
2. I might use this to enable some project specific settings for a set of projects e.g. by placing it in the `/plugins/.eclipse` folder.
3. I even configure some things on the root of the project e.g. placing a `/.eclipse/org.eclipse.core.resources.prefs` to force UTF-8 for the usual source folders.
4. ...

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.