Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346531 - [ui] visual style of trees change with the jdk used to launch eclipse with
Summary: [ui] visual style of trees change with the jdk used to launch eclipse with
Status: CLOSED DUPLICATE of bug 327476
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 trivial (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-19 15:34 EDT by John CLA
Modified: 2011-05-20 08:05 EDT (History)
2 users (show)

See Also:


Attachments
e4 with jre6 focused (49.30 KB, image/png)
2011-05-19 15:35 EDT, John CLA
no flags Details
e4 with jre6 unfocused tree (46.45 KB, image/png)
2011-05-19 15:36 EDT, John CLA
no flags Details
e4 with jre7 tree (42.62 KB, image/png)
2011-05-19 15:36 EDT, John CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John CLA 2011-05-19 15:34:56 EDT
Build Identifier: I20110518-2200

When I run eclipse with jdk 1.6 the collapse/expand button of trees (ie. those in package explorer and Window->Preferences) appear as win7 style as triangles that fade out if mouse is not in focus.
But when running eclipse with jdk7 they are transformed into win98 old style like this: [+] / [-]  buttons that never fade (frankly I prefer this way!! as the triangles-that-fade way is stupid and it's win7's fault xD)

Changing Window->Preferences->General->Appearance->Theme from Win7 to Classic, doesn't change the tree visual style to windows classic (it's simply unchanged: triangles+fade), maybe there's another way.
If you think this bug is due to jdk7 and since it's in beta you won't fix it, then maybe transform this into enhancement request for adding a way to switch from triangle+fade expand/collapse buttons for trees to non-fading [+] / [-] buttons. Thanks in advance.

Reproducible: Always

Steps to Reproduce:
1. to run eclipse with 1.6 java, supposedly use this eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:/Program Files/Java/jdk1.6.0_25/bin/javaw.exe 
-vmargs
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.5
-Xms128m
-Xmx512m


and run it and notice the expand/collapse buttons of trees looks like this:
when both mouse over and keyboard focused on tree: http://i.imgur.com/tjg4b.png
when mouse is not hovering the tree(and also not keyboard focused): http://i.imgur.com/edRLf.png

2. run eclipse with jdk 7 (yeah I dig that's beta), by removing the lines from above eclipse.ini
-vm
C:/Program Files/Java/jdk1.6.0_25/bin/javaw.exe 
or if this doesn't work for you, then I guess you'll have to specify path to jdk7

here's the resulting screenie:
http://i.imgur.com/lfZic.png

I'll also add these in attachments I guess?!
Comment 1 John CLA 2011-05-19 15:35:56 EDT
Created attachment 196160 [details]
e4 with jre6 focused
Comment 2 John CLA 2011-05-19 15:36:22 EDT
Created attachment 196161 [details]
e4 with jre6 unfocused tree
Comment 3 John CLA 2011-05-19 15:36:51 EDT
Created attachment 196162 [details]
e4 with jre7 tree
Comment 4 Remy Suen CLA 2011-05-19 16:10:36 EDT
SWT, please advise.
Comment 5 Markus Keller CLA 2011-05-20 07:02:48 EDT
This should work fine with recent versions of JDK 7.

*** This bug has been marked as a duplicate of bug 327476 ***
Comment 6 John CLA 2011-05-20 07:27:46 EDT
(In reply to comment #5)
> This should work fine with recent versions of JDK 7.
> 
> *** This bug has been marked as a duplicate of bug 327476 ***

the version of jdk7 this was tested with was:
May 12, 2011
Build b142 

 unless something tricked me, let me check

you are correct, i was using b123
here's what happened, when not specifying a vm for eclipse to use, it uses the default one in windows\system32 !! which happened to have remained at b123 (probably the first jdk7 I've ever installed) and on each subsequent update of jdk7 it only updated the program files javaw.exe not the system32 one

therefore since system32 is first in path, eclipse used that jdk7 instead of the updated one, perhaps it's a failure on the jdk7 install here for not updating the system32 javaw.exe  but then again why is there one needed there?!

in host OSGi console typing `props` shows now:

eclipse.vm = C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
java.runtime.version = 1.7.0-ea-b142
java.version = 1.7.0-ea
java.vm.version = 21.0-b12

but that's when manually specifying the vm eclipse should use, in eclipse.ini like so:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
-vmargs
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.5
-Xms128m
-Xmx512m


======
however when I don't specify that, ie. this eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.5
-Xms128m
-Xmx512m

then those values in OSGi console are:
 eclipse.vm = C:\Windows\system32\javaw.exe
 java.runtime.version = 1.7.0-ea-b123
 java.version = 1.7.0-ea
 java.vm.version = 20.0-b04


note: I never uninstalled jdk7(not that I remember), I always just choose Yes when asked to reinstall it, ie. when running the setup install: jdk-7-ea-bin-b142-windows-x64-12_may_2011.exe
apparently this doesn't update the system32\javaw.exe (and who knows what other related ones in same location)
Comment 7 John CLA 2011-05-20 07:46:35 EDT
further, I uninstalled jdk7 without uninstalling jre7 and it still used the same b123 javaw.exe in system32
then I uninstall jre7 too (so no java 7 should be left and it is so) and I noticed still uses javaw.exe in system32 but this time it's the java.version = 1.6.0_25 which is the jre6 I had still left uninstalled

I then installed jdk7 again which also installed jre7 and lo an behold

 eclipse.vm = C:\Windows\system32\javaw.exe
 java.runtime.version = 1.7.0-ea-b142

therefore whatever their installer did, was probably not updating the jre7 part that is left in system32 thus it's always safe to uninstall all jdk7 and jre7 (or maybe just the latter?) such that the install can properly update that system32 jre7. I should probably report this somewhere (?)

to be even safer it's best to use the -vm flag to tell eclipse which jvm to use for running itself
Comment 8 John CLA 2011-05-20 08:05:29 EDT
(In reply to comment #7)
> I should probably report this somewhere (?)
should be this one:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7046770.
"
It may take a day or two before your bug shows up in this external database.  
"