-
Notifications
You must be signed in to change notification settings - Fork 184
Suppress warnings for deprecated Cursor constructor #2612
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
Conversation
Would you please migrate the snippets to the new way ? This is the place where people using SWT should come to see how things are used so showing them these deprecated APIs is counterproductive. |
@akurtakov we recently implemented Snippet386 covering all kind of Cursors. Also Snippet92 was to show how this specific cursor with source and mask should work. We either remove it completely but I don't see the reason to migrate it to new way since we already have example in Snippet386 for others. |
I'm with Alex on this one: why show the deprecated constructor in the snippets in the first place? It's not like we want new users to learn how to use a deprecated constructor. Instead, I would:
One other detail: I just noticed that there is no explanation as to why has the constructor been deprecated (no linked GH issue either). That would be a nice addition to the JavaDocs, don't you think? |
For |
I would then like to remove the Snippet92 completely. Since we have enough (~3) snippets covering how the constructor with source data only works. |
Okay, can you please point to the one that shows how to create cursor with source + mask based on the single-ImageData constructor? |
In Snippet119, reflecting source + mask based on the single-ImageData constructor. See, eclipse.platform.swt/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet119.java Lines 80 to 91 in 6fa4ee7
|
Thank you! Then I would be fine with removing the snippet. |
88a7ad8
to
becd0bc
Compare
@HeikoKlare I have deleted the snippet. This PR is ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also remove references to the snippet, in particular the ones in the Snippets.md
.
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet386.java
Show resolved
Hide resolved
Please remove the snippet from
|
becd0bc
to
138bff5
Compare
Cursor(Device, ImageData, ImageData, int, int) was deprecated recently which is still used in some of the snippets testing that exact constructor. That's why the warnings are being suppressed.
138bff5
to
f892727
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. Looks fine now.
Cursor(Device, ImageData, ImageData, int, int) was deprecated recently which is still used in some of the snippets testing that exact constructor. That's why the warnings are being suppressed.