Bug 502581 - Support local CSS changes by the end user
Summary: Support local CSS changes by the end user
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.6   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 535580 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-09-29 10:34 EDT by Lars Vogel CLA
Modified: 2020-06-17 10:17 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Vogel CLA 2016-09-29 10:34:29 EDT
In ThemeEngine starting in line 105, I found:

//Check for old css files
File oldModDir= new File(
				System.getProperty("user.home") + System.getProperty("file.separator") + ".e4css" + System.getProperty("file.separator")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
		if (oldModDir.exists()) {
			File done = new File(oldM

I'm not aware that we support CSS files in the user.home. 
Does anyone know if that is old testing or migration code? Git history points to Bug 374485 but the discussion there is very small.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=374485#c1 indicates that the SDK used to write to this location. I don't think we still doing that.

I suggest to delete this code, unless someone remembers why this is still necessary.
Comment 1 Lars Vogel CLA 2016-09-29 10:35:27 EDT
Tom, Brian, does user.home/.e4css bring back any memory?
Comment 2 Brian de Alwis CLA 2016-09-29 10:56:05 EDT
I think this was to support user customizations of the CSS via the Preferences > Appearances.
Comment 3 Lars Vogel CLA 2016-09-29 10:58:15 EDT
(In reply to Brian de Alwis from comment #2)
> I think this was to support user customizations of the CSS via the
> Preferences > Appearances.

Do we still support this? I remember this used to be possible but I have not seen that in a file.
Comment 4 Lars Vogel CLA 2016-09-30 09:19:50 EDT
(In reply to Lars Vogel from comment #3)
> Do we still support this? I remember this used to be possible but I have not
> seen that in a file.

After thinking about this feature, I think it is actually super useful. This would allow the user to customize the L&L of Eclipse without the need to develop plug-ins.

So I plan to polish the code a little bit, test if this still works and afterwards publish it.
Comment 5 Brian de Alwis CLA 2016-09-30 11:34:54 EDT
I thought it was supported, but the little appearances doesn't show up.

We should place this directory in the appropriate application-data location rather than ~/.e4css or some other directory in $HOME.
Comment 6 Lars Vogel CLA 2016-10-31 12:13:26 EDT
Mass move to M4.
Comment 7 Lars Vogel CLA 2017-03-03 03:49:47 EST
Mass move. Please move back to M6, if necessary
Comment 8 Lars Vogel CLA 2018-06-06 05:43:22 EDT
*** Bug 535580 has been marked as a duplicate of this bug. ***
Comment 9 Mickael Istria CLA 2018-06-06 08:28:16 EDT
From a end-user perspective, here is a workflow that I think would be really nice:
1. User open the "Appearance" preference page
2. In the theme selection combo, there is a "custom theme..." entry
3. Upon selection user is suggested to create a new CSS file, and is asked whether they want to use one of the existing themes (CSS) as template
4. User selects a template and clicks apply.
5. The CSS theme is applied and the e4css file (hosted under workspace metadata probably in a 1st time) is opened in the editor
6. Whenever author saves the file, the theme is automatically refreshed.
7. From the preference, when "Custom theme..." is used, there is a link "open CSS theme file" to easily find the CSS if the user closed it.