Bug 552931 - Adding styling for CSS spy

Change-Id: I077c0f94b77d6be40238c40c05976ec137a6f495
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
diff --git a/bundles/org.eclipse.e4.tools.css.spy/build.properties b/bundles/org.eclipse.e4.tools.css.spy/build.properties
index 6c480f3..5e4181d 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/build.properties
+++ b/bundles/org.eclipse.e4.tools.css.spy/build.properties
@@ -3,4 +3,5 @@
 bin.includes = META-INF/,\
                .,\
                plugin.xml,\
-               icons/
+               icons/,\
+               css/
diff --git a/bundles/org.eclipse.e4.tools.css.spy/css/dark-theme.css b/bundles/org.eclipse.e4.tools.css.spy/css/dark-theme.css
new file mode 100644
index 0000000..db401ee
--- /dev/null
+++ b/bundles/org.eclipse.e4.tools.css.spy/css/dark-theme.css
@@ -0,0 +1,3 @@
+#css-spy {
+	background-color: red;
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.e4.tools.css.spy/plugin.xml b/bundles/org.eclipse.e4.tools.css.spy/plugin.xml
index 94a3e2c..cda001e 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/plugin.xml
+++ b/bundles/org.eclipse.e4.tools.css.spy/plugin.xml
@@ -17,5 +17,13 @@
             shortcut="M2+M3+F6">
       </spyPart>
    </extension>
+   <extension
+         point="org.eclipse.e4.ui.css.swt.theme">
+      <stylesheet
+            uri="css/dark-theme.css">
+         <themeid
+               refid="org.eclipse.e4.ui.css.theme.e4_dark"></themeid>
+      </stylesheet>
+   </extension>
 
 </plugin>
diff --git a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
index 3cde761..6093444 100644
--- a/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
+++ b/bundles/org.eclipse.e4.tools.css.spy/src/org/eclipse/e4/tools/css/spy/CssSpyPart.java
@@ -361,6 +361,8 @@
 		// create the highlight; want it to appear on top
 		Shell highlight = new Shell(selectedShell, SWT.NO_TRIM | SWT.MODELESS | SWT.NO_FOCUS | SWT.ON_TOP);
 		highlight.setBackground(display.getSystemColor(SWT.COLOR_RED));
+		// set CSS ID for the dark theme
+		highlight.setData("org.eclipse.e4.ui.css.id", "css-spy");
 		Region highlightRegion = new Region();
 		highlightRegion.add(0, 0, 1, bounds.height + 2);
 		highlightRegion.add(0, 0, bounds.width + 2, 1);