-
Notifications
You must be signed in to change notification settings - Fork 183
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
base: master
Are you sure you want to change the base?
Conversation
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.
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. |
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.