Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 414607

Summary: [themes] export themes
Product: [ECD] Orion Reporter: Mike Kucera <mikekucera>
Component: ClientAssignee: Ken Kumagai <theken>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: antonm, ken_walker, theken
Version: 3.0   
Target Milestone: 5.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
export button
none
click export button none

Description Mike Kucera CLA 2013-08-07 14:17:44 EDT
There is currently the ability to import themes into Orion. However you cannot export a theme that you have modified to share with team members.
Comment 1 Ken Kumagai CLA 2013-11-17 22:11:04 EST
Created attachment 237517 [details]
export button
Comment 2 Ken Kumagai CLA 2013-11-17 22:12:12 EST
Created attachment 237518 [details]
click export button
Comment 3 Ken Kumagai CLA 2013-11-17 22:12:40 EST
I created a fix that exports the current color theme into importable xml format.

https://github.com/theken55/orion.client/commit/6cb5ca571826b7b3b7afd49acd7ae01efaf562e6
https://github.com/theken55/orion.client/commit/3e833ec5df671bcce9fe9c90e3d9b0196dcef492

I implemented "export theme" that exports as alert message, not a file because "import theme" imports from input field, not file.
I attached screen shots of implementation.

Here are detailed information of implementation:

- During export, values of ThemeBuilder.zones are set in attributes of xml.
- Export button is added on editor page in settings.
- Tags of overviewRuler, annotationRuler, attribute are exported for future enhancement because they are not imported in ThemeData#importTheme now.
Comment 4 Anton McConville CLA 2013-11-26 09:59:15 EST
This seems a neat addition. I plan to review this for committing in the next day or two.
Comment 5 Anton McConville CLA 2013-11-27 16:29:14 EST
This seems good in general.

My one note is that it doesn't seem to save the theme name in the output. I think that would be helpful.

Otherwise it seems to output well and re-input well.

There are warnings in the code too - for example dat['lineNumber'] should be dat.lineNumber - you can see the warnings in Orion.

But it runs well.

Why did you choose this task for Orion, out of curiousity?
Comment 6 Ken Kumagai CLA 2013-11-28 11:09:03 EST
Thanks, Anton.

I think saving the theme name in output is nice, too.
I'll soon implement input dialog (such as clicking "New Folder") by referring /org.eclipse.orion.client.ui/web/orion/fileCommands.js.

yes, come from curiosity.
And I think Orion with both import and export would be much better than Orion with only import.
Comment 7 Ken Kumagai CLA 2013-11-29 00:38:06 EST
Anton

I fixed warnings, and added an input field (tool tip?) to save the theme name in the output.

https://github.com/theken55/orion.client/commit/310d33bcf6bc0eda8b129c14c2828ea5fc3f54e9
Comment 8 Ken Walker CLA 2013-12-03 15:44:46 EST
We had to do a slight rebase and I decided to reformat that file so it looks like a complete change but the changes have been merged.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=c2885341998445349e6e426883a7955f9b287d3e