|
|
|
Re: 3.x plugins provided with the support of CSS in Eclipse 4? [message #886842 is a reply to message #886736] |
Fri, 15 June 2012 14:03  |
Eclipse User |
|
|
|
First off, the CSS support is unlikely to work under 3.6. I haven't tried it, and I'm pretty sure the required SWT changes only landed in 3.7. But your plugin should be able to be installed in 3.7 and 4.2. The CSS support is provided in three bundles: org.eclipse.e4.ui.css.core, org.eclipse.e4.ui.css.swt, and org.eclipse.e4.ui.css.swt.theme. There isn't a feature for them, so you'll either need to install them using the p2 director or checking out the source.
Our CSS support treats a window and it's contents as its document object model. So providing your plugin uses standard SWT controls, then styling rules may be applied to it without you're needing to do anything.
As to how to supply your own CSS... There's four ways:
1. Launch Eclipse with -applicationCSS path/to/file. This only works under 4.2.
2. Install the CSS Editor and customize the CSS in Preferences > General > Appearance. The CSS Editor is available from the update site at http://download.eclipse.org/e4/updates/0.12-I-builds under E4 Tools. This only works under 4.2 too.
3. Provide your own CSS-based theme using the org.eclipse.e4.ui.css.swt.theme extension point. On 4.2 this will appear in Preferences > General > Appearance. You'll need to trigger the theme change programmatically under 3.7 and 3.8 though.
4. Programmatically obtain the CSSEngine and provide a style sheet. See the applyCSS() method for an example at http://git.eclipse.org/c/e4/org.eclipse.e4.tools.git/tree/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CSSScratchPadWindow.java
The easiest thing is to download the 4.2RC4 build at http://download.eclipse.org/eclipse/downloads/drops4 and give it a try.
|
|
|
Powered by
FUDForum. Page generated in 0.24291 seconds