Community
Participate
Working Groups
A followup of discussions on bug 469918. In order to easily provide zoom-like operations for text editors, pretty useful when doing presentations, or when often changing screen resolution, Platform/Text should provide commands to increase/decrease font sizes, typically bound to the common Ctrl+ and Ctrl- shortcuts,
Targetting as 4.6.M2, since patch is already available.
I'd suggest the commands be 'org.eclipse.ui.internal.X' or .experimental just to ensure that we can rename them later.
@Brian: thanks for the command. I added "internal" to commandid on a newer version of the patch (tracked in same Gerrit review)
Created attachment 258322 [details] Test case showing issue between ThemeAPI vs PreferencePage This JUnit tests shows how using the Theme API fontRegistry doesn't work well with the preferenceStore using in ColorsAndFontsPreferencePage. It's an issue that was detected by Dani. The tests highlights that with the following failure: java.lang.AssertionError: expected:<10> but was:<17> at org.junit.Assert.fail(Assert.java:88) at org.junit.Assert.failNotEquals(Assert.java:834) at org.junit.Assert.assertEquals(Assert.java:645) at org.junit.Assert.assertEquals(Assert.java:631) at org.eclipse.ui.tests.preferences.ZoomAndPreferencesFontTest.restoreAndCheckDefaults(ZoomAndPreferencesFontTest.java:86) at org.eclipse.ui.tests.preferences.ZoomAndPreferencesFontTest.testThemeAPIvsPreferences(ZoomAndPreferencesFontTest.java:99) ... The issue is that the PreferencePage uses its preferenceStore to store a copy of the theme elements. When using PrefrencePage only, there is consistency between the current theme FontRegistry and the preferenceStore. However, when updating via FontRegistry, the preferenceStore is not modified and still believes the font is default. Then the change that restore to defaults doesn't appear to be a modification and isn't propagated to Theme. Keeping both FontRegistry and PreferenceStore for these data is the source of the problems. IMO, the PreferencePage should only deal with the registry directly. As a workaround, there can be many things: * Reconcile on opening of the ColorsAndFontsPreferencePage (ie update preferenceStore with fresh data from current theme) * Reconcile before applying the operation * Put a listener on the fontRegistry when loading the Workbench. That listener would propagate changes applied via FontRegistry to the preferenceStore.
Gerrit change https://git.eclipse.org/r/61324 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.ui.git/commit/?id=4de8d11e9a70982a295ad1f69184a3f0044adfd0
*** Bug 192391 has been marked as a duplicate of this bug. ***
*** Bug 196957 has been marked as a duplicate of this bug. ***
*** Bug 421929 has been marked as a duplicate of this bug. ***
Gerrit change https://git.eclipse.org/r/50042 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.text.git/commit/?id=e50df14d542df55037bc33e82f5d5aad9c99bf54
Zooming for Compare editors is tracked by bug 483472.
New Gerrit change created: https://git.eclipse.org/r/61778
Gerrit change https://git.eclipse.org/r/61778 was merged to [master]. Commit: http://git.eclipse.org/c/www.eclipse.org/eclipse/news.git/commit/?id=c13e67cf551db3d5a94594edfd597f6f7c42c4af
Awesome Mickael and thanks to Dani for the intensive review.
Validated in 4.6.0.I20151203-1230
So I haven't followed the size/complexity of the code changes for this, but I'm wondering ... is this change a possible candidate for Mars.2 ?
(In reply to Martin Oberhuber from comment #15) > So I haven't followed the size/complexity of the code changes for this, but > I'm wondering ... is this change a possible candidate for Mars.2 ? No, in platform we downport only bugfixes. But you can use http://saneclipse.vogella.com/download.html for Eclipse 4.5.