Bug 49607 - [preferences] Java editor preferences overridable by project
Summary: [preferences] Java editor preferences overridable by project
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P3 enhancement with 5 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate
Depends on:
Blocks:
 
Reported: 2004-01-06 17:58 EST by Barney Barumba CLA
Modified: 2011-01-24 20:32 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Barney Barumba CLA 2004-01-06 17:58:57 EST
In exactly the same way in which the global java compiler preferences are
overridable on project by project basis, would it be possible to do the same
with the java editor preferences?

When working with a couple of open source projects, it is quite common to have
different tabs/styles etc. in different projects, and changing the global
settings each time you switch projects is a real pain.

Cheers
Comment 1 Jerome Lanneluc CLA 2004-01-07 03:25:35 EST
Moving to JDT Text for comment
Comment 2 Dani Megert CLA 2004-01-07 03:45:28 EST
We need to wait for the new setting story and see what's the level of support
from there.
Comment 3 Mark A. Ziesemer CLA 2005-06-14 01:17:07 EDT
As of at least 3.1 (maybe earlier?), this appears to be implemented.  There is 
a "Java Code Style" item in the outline, which also contains "Code 
Templates", "Formatter", and "Organize Imports", each with a checkbox 
for "Enable project specific settings".

However, I'd like to propose an addition to this:  When the project-specific 
settings are enabled, the settings are stored internally with the project.  
This doesn't allow for sharing of settings across projects.

For example, I have my workspace with a number of personal projects.  I also 
work on an open-source project called OSP.  It has a sub-project of plugins, 
called OSPP.  Ideally OSP and OSPP could share the same settings, separate of 
my global settings.  The settings file (or files, as already implemented) could 
be specified as a relative path, and located directly underneath the "Enable 
project specific settings" checkbox.

CVS Structure:
/OSP
/OSPP
/WorkspacePrefs

Both OSP and OSPP would reference ../WorkspacePrefs, sharing the same code 
style, etc. settings.

Any other suggestions for variations on this theme are welcome!
Comment 4 David Williams CLA 2005-06-14 01:27:08 EDT
I agree some "grouping" method is needed. My "use case" is that I often have say
100 projects loaded from CVS ... but only about 20 of them are "mine" that I
want to change the Java settings of per project. Typically this is to change the
setting of some compiler (JDT or PDE Schema) warning/error level. So, its hard
to change the project settings of 20 projects "at the same time". 

I've always thought a simple multiple select would do. Or, perhaps associated
with "working set". [Note, these suggestions would still store them seperately,
just make it easy to change all at the same time]. 
Comment 5 Dani Megert CLA 2005-06-14 03:11:53 EDT
This request is specifically to the Java editor. Please submit your general
suggestions regarding project preferences to Platform UI.
Comment 6 Mark A. Ziesemer CLA 2005-06-14 08:43:46 EDT
I'm confused - this entire thread seems to be focused on JDT projects.  I don't 
think it's an issue or possible with other types of projects - the 
implementation of the preference pages discussed are all stored within JDT, 
aren't they?

If I'm clearly in the wrong, can we just please reassign this to the 
appropriate product and group?  Otherwise, as I mentioned, the original issue 
for which this ticket has been created has been implemented, so it could be 
closed (requiring us to repost).

Thanks...
Comment 7 Mark A. Ziesemer CLA 2005-06-14 08:53:54 EDT
In response to comment #5, I'm not sure how feasible it is, but I think that 
storing some preferences at the “working set” level would be very useful.  Some 
of the Platform UI preference pages are already labeled “Inherited from 
Container”.  If this could be implemented to use the “working set” as a 
container, then modify JDT to use the same understanding, I think it could be 
very beneficial.

(Settings inheritance: Project -> Working Set -> Workspace Global Preferences)

The current alternative is to create separate workspaces for each logical group 
of projects, then modify the preferences as needed in each.  However, that 
comes with its own issues and disadvantages.

If something like this is the preferred choice for “grouped preferences”, we 
should probably create a feature request as such in Platform UI, then make this 
bug dependent on it to get the JDT preference pages updated to support it.  
Otherwise, for the “#3 solution”, this could probably be kept local to JDT.  
(Either way, the Version on this ticket should be updated to 3.1 or beyond.)

Voters and everyone else – please let us know what you think – the above is 
only the opinion of one person, myself…