Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Schindl2014-12-19 09:06:40 -0500
committerTom Schindl2014-12-19 09:06:40 -0500
commit73606d484237a717084885b29c40316351b4c510 (patch)
treee54d8677908275fe6724af35b498c6b4b8e315c0 /testcases
parent5aee4e1794e1e8da9e36b8f0f21bb21109895bdf (diff)
downloadorg.eclipse.efxclipse-73606d484237a717084885b29c40316351b4c510.tar.gz
org.eclipse.efxclipse-73606d484237a717084885b29c40316351b4c510.tar.xz
org.eclipse.efxclipse-73606d484237a717084885b29c40316351b4c510.zip
Bug 455751 - Contribute Themes through the OSGi-Registry
Diffstat (limited to 'testcases')
-rwxr-xr-xtestcases/org.eclipse.fx.testcases.e4/META-INF/MANIFEST.MF1
-rw-r--r--testcases/org.eclipse.fx.testcases.e4/OSGI-INF/services/defaulttheme.xml7
-rwxr-xr-xtestcases/org.eclipse.fx.testcases.e4/build.properties17
-rw-r--r--testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/theme/DefaultTheme.java10
4 files changed, 27 insertions, 8 deletions
diff --git a/testcases/org.eclipse.fx.testcases.e4/META-INF/MANIFEST.MF b/testcases/org.eclipse.fx.testcases.e4/META-INF/MANIFEST.MF
index 26981211e..33b5f8bea 100755
--- a/testcases/org.eclipse.fx.testcases.e4/META-INF/MANIFEST.MF
+++ b/testcases/org.eclipse.fx.testcases.e4/META-INF/MANIFEST.MF
@@ -69,3 +69,4 @@ Import-Package: javafx.animation;version="2.0.0",
javax.inject;version="1.0.0",
org.osgi.framework;version="1.3.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
+Service-Component: OSGI-INF/services/defaulttheme.xml
diff --git a/testcases/org.eclipse.fx.testcases.e4/OSGI-INF/services/defaulttheme.xml b/testcases/org.eclipse.fx.testcases.e4/OSGI-INF/services/defaulttheme.xml
new file mode 100644
index 000000000..9ae55b4c7
--- /dev/null
+++ b/testcases/org.eclipse.fx.testcases.e4/OSGI-INF/services/defaulttheme.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.eclipse.fx.testcases.e4.defaulttheme">
+ <implementation class="org.eclipse.fx.testcases.e4.theme.DefaultTheme"/>
+ <service>
+ <provide interface="org.eclipse.fx.ui.services.theme.Theme"/>
+ </service>
+</scr:component>
diff --git a/testcases/org.eclipse.fx.testcases.e4/build.properties b/testcases/org.eclipse.fx.testcases.e4/build.properties
index 7e1607fb4..ca6de67b4 100755
--- a/testcases/org.eclipse.fx.testcases.e4/build.properties
+++ b/testcases/org.eclipse.fx.testcases.e4/build.properties
@@ -1,8 +1,9 @@
-source.. = src/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- css/default.css,\
- Application.e4xmi,\
- OSGI-INF/l10n/bundle.properties
-output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ css/default.css,\
+ Application.e4xmi,\
+ OSGI-INF/l10n/bundle.properties,\
+ OSGI-INF/services/defaulttheme.xml
+output.. = bin/
+source.. = src/
diff --git a/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/theme/DefaultTheme.java b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/theme/DefaultTheme.java
new file mode 100644
index 000000000..7ee4c4aad
--- /dev/null
+++ b/testcases/org.eclipse.fx.testcases.e4/src/org/eclipse/fx/testcases/e4/theme/DefaultTheme.java
@@ -0,0 +1,10 @@
+package org.eclipse.fx.testcases.e4.theme;
+
+import org.eclipse.fx.ui.theme.AbstractTheme;
+
+public class DefaultTheme extends AbstractTheme {
+
+ public DefaultTheme() {
+ super("default.theme", "Default Theme", DefaultTheme.class.getClassLoader().getResource("css/default.css"));
+ }
+}

Back to the top