Bug 563601 - Upgrade to 4.16M3 trashes theme

"Windows Classic" theme was removed. If we try to restore it silently
replace it with the identical, still existing "Classic" theme.

Change-Id: I5adb44093568e796309eae386ed196e25c2e5127
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
diff --git a/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java b/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java
index 75c3b3c..8903aca 100644
--- a/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java
+++ b/bundles/org.eclipse.e4.ui.css.swt.theme/src/org/eclipse/e4/ui/css/swt/internal/theme/ThemeEngine.java
@@ -560,6 +560,16 @@
 		@Override
 		public void restore(String alternateTheme) {
 			String prefThemeId = getPreferenceThemeId();
+
+			// Bug 562794, 563601: Eclipse once contained two identical themes named
+			// "Classic" and "Windows Classic" and the second was removed with bug 562794.
+			// An old workspace using the removed "Windows Classic" theme would be reseted
+			// to the default theme on update. Since both themes are identical we silently
+			// change the theme to the remaining "Classic" theme and don't disturb the user.
+			if ("org.eclipse.e4.ui.css.theme.e4_classic6.0,6.1,6.2,6.3".equals(prefThemeId)) { //$NON-NLS-1$
+				prefThemeId = "org.eclipse.e4.ui.css.theme.e4_classic"; //$NON-NLS-1$
+			}
+
 			boolean flag = true;
 			if (prefThemeId != null) {
 				for (ITheme t : getThemes()) {