Community
Participate
Working Groups
Created attachment 263380 [details] Win7: Output of Snippet318 at 200% Zoom Issue reproducible with Snippet318 at 200% Zoom setting on Win7, see attachment.
Created attachment 263381 [details] Win7: Output of Snippet318 at 100% Zoom Output of Snippet318 should be same at all zoom level, as we get on 100% zoom settings(see attachment)
AutoScaling feature is specific to Display devices and not Printer devices. We need to introduce some mechanism to differentiate various sub-classes of Drawable, whether it's AutoScaleable or not. One possible approach might be to introduce a new API in Drawable interface something like below: public boolean isAutoScale (); Which should return 'true' for Display and 'false' for Printer. Based on this we can take a call in GC class whether to AutoScale or not. Note:- Going by current design this problem would be present on both Win as well as GTK.
New Gerrit change created: https://git.eclipse.org/r/78945
Hi Niraj, The use case I tried is 1. Start runtime eclipse 2. Import some source code(I used snippet318) 3. Print from the file menu Attached are the results.
Created attachment 263721 [details] GTK3: Printout using Master at 100%
Created attachment 263722 [details] GTK3: Printout using Master at 200%
Created attachment 263723 [details] GTK3: Printout using attached patch at 100%
Created attachment 263724 [details] GTK3: Printout using attached patch at 200%
Created attachment 264317 [details] Output_Eclipse-Print_200Zoom_Ubunutu16 Latest patch. (In reply to Sravan Kumar Lakkimsetti from comment #8) > Created attachment 263724 [details] > GTK3: Printout using attached patch at 200% With latest gerrit patch changes, above mentioned issue is now resolved.
Created attachment 264318 [details] Output_Snippet318_200Zoom_Ubunutu16 Latest Gerrit. (In reply to Niraj Modi from comment #0) > Created attachment 263380 [details] > Win7: Output of Snippet318 at 200% Zoom > > Issue reproducible with Snippet318 at 200% Zoom setting on Win7, see > attachment. With latest gerrit patch changes, above mentioned issue is now resolved.
Important point here: Font scaling is not controlled by Eclipse/SWT, instead it's taken care by the underlying OS itself. That is the reason we are seeing bigger font-size printed at 200% zoom as seen on Ubuntu16 with the fix(attachment 264317 [details] and attachment 264318 [details]) Note: This is one of the design decisions we have taken for this HighDPI feature.
Testing/Verification on Linux for this patch moved forwards using an updated Snippet318 please refer attachment 264245 [details]. Hence this bug not blocked any more by 501414.
New API method introduced as part of this fix: Drawable#isAutoScalable() Changes pushed to master via below git commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=38e50f4efbbd6ad2c505d85b454c7a73f8c98ff1 Resolving now.
Commit 38e50f4efbbd6ad2c505d85b454c7a73f8c98ff1 introduces API errors in SWT.
(In reply to Andrey Loskutov from comment #14) > Commit 38e50f4efbbd6ad2c505d85b454c7a73f8c98ff1 introduces API errors in SWT. See http://download.eclipse.org/eclipse/downloads/drops4/N20160928-2000/apitools/analysis/html/org.eclipse.swt/report.html
(In reply to Andrey Loskutov from comment #15) > (In reply to Andrey Loskutov from comment #14) > > Commit 38e50f4efbbd6ad2c505d85b454c7a73f8c98ff1 introduces API errors in SWT. > > See > http://download.eclipse.org/eclipse/downloads/drops4/N20160928-2000/apitools/ > analysis/html/org.eclipse.swt/report.html Looks some special care needs to be taken when we add a 'default' method w.r.t. to API tools, have added entry for the new method in API tools filter via below git commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=2c4a456b93a9bb526c5189190687f87ce63442c0
(In reply to Niraj Modi from comment #16) > (In reply to Andrey Loskutov from comment #15) > > (In reply to Andrey Loskutov from comment #14) > > > Commit 38e50f4efbbd6ad2c505d85b454c7a73f8c98ff1 introduces API errors in SWT. > > > > See > > http://download.eclipse.org/eclipse/downloads/drops4/N20160928-2000/apitools/ > > analysis/html/org.eclipse.swt/report.html > > Looks some special care needs to be taken when we add a 'default' method > w.r.t. to API tools, have added entry for the new method in API tools filter > via below git commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=2c4a456b93a9bb526c5189190687f87ce63442c0 Still one error remains: Description Resource Path Location Type Missing @since tag on isAutoScalable() Printer.java /org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing line 464 @since tag problem
(In reply to Andrey Loskutov from comment #17) > (In reply to Niraj Modi from comment #16) > > (In reply to Andrey Loskutov from comment #15) > Still one error remains: > > Description Resource Path Location Type > Missing @since tag on isAutoScalable() Printer.java /org.eclipse.swt/Eclipse > SWT Printing/gtk/org/eclipse/swt/printing line 464 @since tag problem This looks like an error in API tools or JDT-UI, why to add @since again when overriding a 'default' method in implementation classes, if it's already present in the parent interface/class. Will check on this and get back.
(In reply to Niraj Modi from comment #18) > (In reply to Andrey Loskutov from comment #17) > > (In reply to Niraj Modi from comment #16) > > > (In reply to Andrey Loskutov from comment #15) > > Still one error remains: > > > > Description Resource Path Location Type > > Missing @since tag on isAutoScalable() Printer.java /org.eclipse.swt/Eclipse > > SWT Printing/gtk/org/eclipse/swt/printing line 464 @since tag problem > > This looks like an error in API tools or JDT-UI, why to add @since again > when overriding a 'default' method in implementation classes, if it's > already present in the parent interface/class. > Will check on this and get back. Raised Bug 502561 against API tools to track this problem.
Clarified Javadocs with http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=fd1e9fc26322a48a24d92662e337cf688dadf4ce
(In reply to Niraj Modi from comment #19) > (In reply to Niraj Modi from comment #18) > > (In reply to Andrey Loskutov from comment #17) > > > (In reply to Niraj Modi from comment #16) > > > > (In reply to Andrey Loskutov from comment #15) > > > Still one error remains: > > > > > > Description Resource Path Location Type > > > Missing @since tag on isAutoScalable() Printer.java /org.eclipse.swt/Eclipse > > > SWT Printing/gtk/org/eclipse/swt/printing line 464 @since tag problem > > > > This looks like an error in API tools or JDT-UI, why to add @since again > > when overriding a 'default' method in implementation classes, if it's > > already present in the parent interface/class. > > Will check on this and get back. > > Raised Bug 502561 against API tools to track this problem. Can we please mute this error? I have now workspaces with compile errors which makes me nervous. I will provide a "mute" commit in a moment.
New Gerrit change created: https://git.eclipse.org/r/83288
(In reply to Eclipse Genie from comment #22) > New Gerrit change created: https://git.eclipse.org/r/83288 Let's wait till M3, as bug 502561 has proposed fix targeted for M3.
I've removed the entry from the N&N. I first tried to translate the text into proper English, but then I realized that a) Drawable is not considered a proper API (see Javadoc) b) no client should actually have a need for calling this method
New Gerrit change created: https://git.eclipse.org/r/84642
(In reply to Markus Keller from comment #24) > I've removed the entry from the N&N. > > I first tried to translate the text into proper English, but then I realized > that > a) Drawable is not considered a proper API (see Javadoc) > b) no client should actually have a need for calling this method Thanks Markus, based on this removing the API keyword from this bug.
Verified the fix in Oxygen IBuild: I20161113-2000
(In reply to Eclipse Genie from comment #26) > New Gerrit change created: https://git.eclipse.org/r/84642 Above Gerrit fails(since we have a new method and corresponding JUnit as part of single Patch), hence pushed the changes directly via below git commit to 4.6.2: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=R4_6_maintenance&id=06c84738708c839d8b8abd240d414db8a63273f7
API tooling is calling out this method changes as warning in below report: http://download.eclipse.org/eclipse/downloads/drops4/M20161115-1315/apitools/analysis/html/org.eclipse.swt/report.html There is already a API filter for the Drawable#isAutoScaleable() method. We need to add corresponding API filter at the method implementations as well. Will add the same shortly.
Added API filters to mute the API-tool warnings, for each implementation of Drawable#isAutoScalable() for all platforms in 4.6.2 branch via below git commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?h=R4_6_maintenance&id=8e151f2a3b7855b403d71799d255b14f38a2b5d0 Please note, why above api filters are needed is due to a known bug 502561 in API tooling(which is already fixed in 4.7 branch but isn't back-ported to 4.6.2) Resolving now.
Verified the fix in 4.6.2 MBuild: M20161116-1100 on Win7 and Ubuntu16.04
The API Filters story needs another look. Sorry that I didn't realize this in the first round. Drawable is a beast. The interface says it's not an API, but we can't mark it as @noreference because it's used in other APIs, e.g. constructor GC(Drawable). But we should mark methods in Drawable as @noreference. That way, we don't need API filters. API filters are only intended to work around problems in API Tools. I've filed bug 507701 for missing API Tools problems in overriding methods, and I've added all the necessary @noreference in master: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=745d8bbc14c0e8471bffa73494e030f7be099e08
New Gerrit change created: https://git.eclipse.org/r/85235
(In reply to Eclipse Genie from comment #34) > New Gerrit change created: https://git.eclipse.org/r/85235 This fixes the API Tools problems and correctly marks isAutoScalable as @noreference in R4_6_maintenance. The API Tools problem that stayed after http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8e151f2a3b7855b403d71799d255b14f38a2b5d0 (minor version should be incremented) was actually acceptable, since those methods were indeed added, and only the missing @since tag had been suppressed.
Gerrit change https://git.eclipse.org/r/85235 was merged to [R4_6_maintenance]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=2670c270b10c44ffbb59e84f4f50d5c63a106bba