-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable theming preference check box is not working as expected and forces to restart twice #2522
Comments
I'm working on this. |
I added the event listener to the createContents method to respond to a change in the selection of the themingEnabled button. It works for checked-to-unchecked, hiding the theme-dependent elements when clicked. However, after restarting the dialog, when themingEnabled button is clicked again (unchecked-to-checked), the content is still hidden. We still need to restart twice to get the desired effect of enabling and changing themes.
I organized the theme-dependent elements in a private method.
|
Hi, I think you didn't consider to save/restore the preference value associated to your boolean checkbox. And when you restart your application, the saved value is not applied on your swt widgets. You can check the calls to
which gets the value from the preference store. The file that contains the preference values managed by this screen is located in your workspace, in the folder : .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.e4.ui.workbench.renderers.swt.prefs For my sample, it contains : HIDE_ICONS_FOR_VIEW_TABS=false When you change your values and you apply the preferences, you could check which values have changed in this file and write the code to restore the value when you create (for the first time) the preference page. |
Hello! It seems the problem stems from disabling |
Let's make sure issue is not already fixed in latest builds first.
Steps to reproduce
From a fresh installation and clean workspace:
Install the setup of 'platform ui' by dragging the setup link in the banner of the installer : see Setting your environment and projects guide
Open the preference dialog and filter on 'theme'. Disable theming if there is one selected by unchecking the 'Enable Theming' checkbox and restart. Eclipse restarts without any theme.
Then reopen the preference dialog and filter on 'theme' then check the 'Enable theming' check box again and click Apply.
Eclipse will ask to restart, while no Theme has been yet selected.. and no theme has been proposed. The possible themes will appear after the restart and will be applicable, but we will have to restart again... this is not straightforward and totally counterintuitive.
Actually, when the 'Enable theming' is selected, it must display the themes and then propose to select one and restart when it is applied (even if the theme was not changed in the combo).
This is the current situation when we switch from 'Enable theming' unchecked to checked:
On the other hand, if we unchecked the theme while it was checked, the list of themes should be hidden:
|
The Plugin Spy (Alt Shift F1), launched when the preference page is displayed says that this preference page is managed by the ViewsPreferencePage in the org.eclipse.ui.workbench plugin :
A change event listener could be added on the preference checkbox editor so as to react on the change and display or not the bloc of theme list.
Tested under this environment:
Community
The text was updated successfully, but these errors were encountered: