| Summary: | [CSS] Migrate CSS themes from eclipse.platform repo to eclipse.platform.ui repo | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Lars Vogel <Lars.Vogel> |
| Component: | UI | Assignee: | Lars Vogel <Lars.Vogel> |
| Status: | VERIFIED FIXED | QA Contact: | Lars Vogel <Lars.Vogel> |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel.rolka, daniel_megert, john.arthorne, Lars.Vogel, pelder.eclipse, pwebster, robin |
| Version: | 4.4 | ||
| Target Milestone: | 4.4 M6 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Lars Vogel
The other advantage I see by moving them into their own plug-in is that RCP applications could directly consume the framework styling. Would you move them to their own plugin and then contribute bug 416218 into it? If the platform is providing it, it doesn't seem like we need one plugin for dark and one plugin for 2 other themes. PW (In reply to Paul Webster from comment #2) > Would you move them to their own plugin and then contribute bug 416218 into > it? > > If the platform is providing it, it doesn't seem like we need one plugin for > dark and one plugin for 2 other themes. OK. I suggest "org.eclipse.ui.themes" as plug-in name. Let me know if you disagree otherwise, I start the migration. Would one of our existing low-level plugins be an appropriate place to put the Platform themes? ex: org.eclipse.e4.ui.css.swt.theme or org.eclipse.e4.ui.workbench.swt ? It looks like a theme is some CSS,images, and entries in a plugin.xml. PW (In reply to Paul Webster from comment #4) > Would one of our existing low-level plugins be an appropriate place to put > the Platform themes? > > ex: org.eclipse.e4.ui.css.swt.theme or org.eclipse.e4.ui.workbench.swt ? > > It looks like a theme is some CSS,images, and entries in a plugin.xml. I think we should separate the implementation from the examples. Assume an RCP client wants to use theming support with his custom theme and adds the implementation plug-ins to his RCP product. If we re-use the existing plug-ins we would also get the platform themes which he potentially does not want. (In reply to Lars Vogel from comment #5) > I think we should separate the implementation from the examples. Assume an > RCP client wants to use theming support with his custom theme and adds the > implementation plug-ins to his RCP product. If we re-use the existing > plug-ins we would also get the platform themes which he potentially does not > want. The built in themes would automatically be available, but the RCP app would not be forced to use or expose them right? I understand it is not a perfect fit, but creating a new plugin for a handful of CSS files feels like overkill. If there is somewhere else we can store them that does not do any harm to those who don't want to use them, I prefer to avoid the overhead. > The built in themes would automatically be available, but the RCP app would
> not be forced to use or expose them right? I understand it is not a perfect
> fit, but creating a new plugin for a handful of CSS files feels like
> overkill. If there is somewhere else we can store them that does not do any
> harm to those who don't want to use them, I prefer to avoid the overhead.
I think adding the CSS files to an implementation plug-in would create potential for others.
Take our Contacts demo for example. It uses a model processor to read all installed themes and creates dynamically user interface components for them.
Or lets assume someone want to provide a different themed Eclipse, e.g. Liclipse for PHP or SAP with their Eclipse based tooling Adding the themes to the implementation plug-in would potentially "polute" their IDEs.
s/potential/potential work We discussed that in the eclipse-e4 IRC channel and to avoid that customers or custom IDE gets these themes unwanted we agreed to create a new plug-in called "org.eclipse.ui.e4.themes" to hold the existing themes from eclipse platform and the new dark theme. Removal from the eclipse.platform repo https://git.eclipse.org/r/22228 Adding the themes to org.eclipse.ui.themes in to eclipse.platform.ui https://git.eclipse.org/r/22229 Released http://git.eclipse.org/c/platform/eclipse.platform.git/commit/?id=aa217cb4e8a4a87b49f6ceab7f3f0fead0801dec and http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=8851254da4d01655852cc9e03a17cd39204cb17e PW Fixes with the two commmits from Paul. I included org.eclipse.ui.themes in my RCP application using Build id: I20140218-0800. When I tried to switch to the dark theme I got an error: java.net.MalformedURLException at java.net.URL.<init>(URL.java:619) at java.net.URL.<init>(URL.java:482) at java.net.URL.<init>(URL.java:431) at org.eclipse.e4.ui.css.core.impl.engine.AbstractCSSEngine.parseStyleSheet(AbstractCSSEngine.java:203) at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.setTheme(ThemeEngine.java:421) at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.setTheme(ThemeEngine.java:382) at org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngine.restore(ThemeEngine.java:546) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.initializeStyling(PartRenderingEngine.java:1248) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1009) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1006) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:147) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:620) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:571) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at com.archimatetool.editor.Application.start(Application.java:73) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) (In reply to Phillipus B from comment #14) > I included org.eclipse.ui.themes in my RCP application using Build id: > I20140218-0800. Can you please open a new bug (Use platform themes in RCP) and copy me into the bug report. I have a look. (In reply to Lars Vogel from comment #15) > (In reply to Phillipus B from comment #14) > > I included org.eclipse.ui.themes in my RCP application using Build id: > > I20140218-0800. > > Can you please open a new bug (Use platform themes in RCP) and copy me into > the bug report. I have a look. Bug #428715 Are you guys 100% sure that clients aren't referring / importing our css files, e.g. like this:
@import url("platform:/plugin/org.eclipse.ui.themes/css/e4_basestyle.css");
?
(In reply to Dani Megert from comment #17) > Are you guys 100% sure that clients aren't referring / importing our css > files, e.g. like this: > > @import url("platform:/plugin/org.eclipse.ui.themes/css/e4_basestyle.css"); > AFAIK CSS imports did not work before Luna. I started to support it with https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=92ed79170250f3b070e129d54c165b31a9a430dd and the last fixes make platform:/plugin/ finally work. (In reply to Lars Vogel from comment #18) > (In reply to Dani Megert from comment #17) > > Are you guys 100% sure that clients aren't referring / importing our css > > files, e.g. like this: > > > > @import url("platform:/plugin/org.eclipse.ui.themes/css/e4_basestyle.css"); > > > > AFAIK CSS imports did not work before Luna. I started to support it with > https://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/ > ?id=92ed79170250f3b070e129d54c165b31a9a430dd and the last fixes make > platform:/plugin/ finally work. The only way to import a CSS before Luna was to use "/css/e4_basestyle.css" because we hard-code the bundle symbolic name. If you want we can easily turn this again on. I actually just removed it. We would simply point to org.eclipse.ui.themes instead of org.eclipse.platform. "platform:/plugin/" did not work before my changes so we should be save. We still have reference over the web: https://wiki.eclipse.org/Eclipse4/CSS http://waynebeaton.wordpress.com/2012/02/28/editing-the-eclipse-4-workbench-css/ http://stackoverflow.com/questions/20455110/how-to-import-a-resource-in-eclipse-plugin-stylesheet They probably need a comment. eclipse.platform/platform/org.eclipse.platform/plugin.xml still refers to the org.eclipse.platform as a place to get CSS resource information(images), so org.eclipse.sdk probably does as well. The images should go with o.e.ui.themes and that should be our default location, but we'll need to leave the existing ones there with a note that they're not used by the SDK any more. o.e.ui.themes should still be the plugin that defines the themes in the plugin.xml PW . (In reply to Paul Webster from comment #21) > . Gerrit review for the adjustment of the SDK resource location https://git.eclipse.org/r/#/c/22368 And the 'build.properties' file also needs love i.e. remove the entries for removed stuff. (In reply to Dani Megert from comment #17) > Are you guys 100% sure that clients aren't referring / importing our css > files, e.g. like this: > > @import url("platform:/plugin/org.eclipse.ui.themes/css/e4_basestyle.css"); > The old import scenario should work again, as I placed the default URL again in https://git.eclipse.org/r/#/c/22353/ (In reply to Dani Megert from comment #23) > And the 'build.properties' file also needs love i.e. remove the entries for > removed stuff. Included in https://git.eclipse.org/r/#/c/22368/ I opened Bug 428744 for EPP (In reply to Lars Vogel from comment #24) > > The old import scenario should work again, as I placed the default URL again > in > > https://git.eclipse.org/r/#/c/22353/ Released as http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=1b58a7af4ebb93f4d66f2a6466d155d5fc31c60f (In reply to Lars Vogel from comment #25) > > Included in https://git.eclipse.org/r/#/c/22368/ Released as http://git.eclipse.org/c/platform/eclipse.platform.git/commit/?id=9cfbe9deb857aa2f0f1fc0b88c1b2b44c5fc167a PW Fixed with the commits from Paul All themes work fine in Build id: I20140303-2000 |