Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320553

Summary: [CSS] Win7 Stylesheet not picked up
Product: [Eclipse Project] e4 Reporter: Bogdan Gheorghe <gheorghe>
Component: UIAssignee: Bogdan Gheorghe <gheorghe>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bokowski, remy.suen, susan
Version: unspecifiedFlags: bokowski: review+
susan: review+
Target Milestone: 1.0 RC3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch
none
Patch
none
Take 3 none

Description Bogdan Gheorghe CLA 2010-07-21 16:21:22 EDT
The current theme manager has no way of distinguishing between Window versions. This needs to be addressed.
Comment 1 Remy Suen CLA 2010-07-21 16:24:55 EDT
*** Bug 319917 has been marked as a duplicate of this bug. ***
Comment 2 Bogdan Gheorghe CLA 2010-07-21 16:33:38 EDT
Created attachment 174917 [details]
Patch

Patch adds an os.version field to the extension point that can be used to differentiate Win versions.
Comment 3 Boris Bokowski CLA 2010-07-21 16:56:24 EDT
+1 for fixing this for RC3, but I haven't tested the fix.
Comment 4 Susan McCourt CLA 2010-07-21 17:31:48 EDT
+1 on the patch.

It may be "different" from other eclipse extension points that you can now define themes with the same ids.  Usually aren't configuration element ids assumed to be unique?  However, I could also argue this as a feature, that having one semantic theme (say, super-duper-gradients) that is further specialized by platform might make more sense than the client having to make the distinction.  In the same way that you can contribute different handlers to the same command id.

Although that makes me wonder if we should define themes and then define stylesheets as another element that satisfies a theme (like commands and handlers).  

I think it's worth looking further into the shape of this extension point later.  But this is not something to decide now.

I tested the patch.
Before the patch: a new workbench opens in the WinXP Blue theme, even though I'm running Win7.
After the patch:  a new workbench opens in the Win7 theme.
Comment 5 Susan McCourt CLA 2010-07-21 17:45:42 EDT
(In reply to comment #4)

> I think it's worth looking further into the shape of this extension point
> later.  But this is not something to decide now.
> 
Opened bug 320563 to capture the issues I see.
Comment 6 Susan McCourt CLA 2010-07-21 18:28:15 EDT
committed to HEAD (Bogdan doesn't have org.eclipse.platform commit rights).
Comment 7 Boris Bokowski CLA 2010-07-21 20:35:25 EDT
(In reply to comment #6)
> committed to HEAD (Bogdan doesn't have org.eclipse.platform commit rights).

With the latest from HEAD (unless I forgot to take something), and a fresh workspace, I still get Windows XP grey even though I am running on Windows 7.
Comment 8 Boris Bokowski CLA 2010-07-21 20:35:35 EDT
reopening
Comment 9 Susan McCourt CLA 2010-07-22 00:53:54 EDT
I tried it again with the latest from HEAD (just synched) and with a fresh workspace on Win7, I *do* get the right theme.  Hmmmm....
Comment 10 Susan McCourt CLA 2010-07-22 00:57:09 EDT
I tried some additional experiments, like setting the theme to something else (classic) and then restarting the launch.  I see Classic.  Then I restart the launch and clear the workspace.  I see Win7.  I couldn't get into a state where it didn't pick up Win7 when not specified.
Comment 11 Bogdan Gheorghe CLA 2010-07-23 11:54:47 EDT
Created attachment 175081 [details]
Patch

Looks like the difference in behavior is caused by whatever VM you are running. J9 is more verbose in its os.version output. Here is a patch that will just look for the OS version number.
Comment 12 Boris Bokowski CLA 2010-07-23 14:41:31 EDT
Can we do String.contains instead, to keep the change simple?
Comment 13 Bogdan Gheorghe CLA 2010-07-23 18:21:00 EDT
Created attachment 175113 [details]
Take 3
Comment 14 Boris Bokowski CLA 2010-07-23 18:29:56 EDT
Patch applied to HEAD.
Comment 15 Susan McCourt CLA 2010-07-27 14:00:09 EDT
Boris, can you verify this one since it worked for me before that last patch went in?
Comment 16 Boris Bokowski CLA 2010-07-27 14:01:14 EDT
Yes will do, after lunch. I think I've tried it with the build that had the fix, but will verify again.
Comment 17 Boris Bokowski CLA 2010-07-27 17:19:44 EDT
Verified using I20100726-2152 on Windows 7.