-
Notifications
You must be signed in to change notification settings - Fork 115
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
Get rid of deprecated org.eclipse.core.runtime.Preferences in platform code #497
Comments
If I understood correctly, you want to remove some references to the deprecated class This will break all the plugins that use deprecated methods like |
If we remove/replace the reference how could it break things? |
For example, if we remove the method I don't see why we should replace those references, preferences are now stored according to scopes in the It's my first time looking at this project, I might be misunderstaning. |
The method has to stay, but we should remove any call to this method in platform code.
Because the class is deprecated, that means we do not recommend to use it anymore. So it would be good to replace all usages of that class with the now recommended approach Lines 90 to 93 in 1809821
|
This class is used in other eclipse repositories as well like in eclipse platform ui, eclipse platform text , eclipse jdt . How will this be handled ? can a single contributor work on fixing all of these ? |
So this is about Eclipse Platform project to stop using deprecated APIs itself. No one said anything about removing these APIs so other projects can continue using them. It would shift responisibility for fixing issues if/when they arise in usage of these APIs to whoever still uses them. |
Sure why not, its just a matter of time/motivation, but for sure one can simply choose one place where the deprecated class is used and replace with newer construct, so it could be iteratively done by many developers. The goal would be that searching for references inside the eclipse-sdk will only show the class itself and public API methods that should be deprecated as well. Once this is done, we might even mark them for removal so they can be deleted some time in the future. |
I get it now, I didn't know that I imported the whole project and found more references. |
You can setup a full IDE for eclipse here: |
Replace deprecated preferences APIs. In the implementation of IPreferenceChangeListener.preferenceChange(PreferenceChangeEvent) do not use the newValue field of the PreferenceChangeEvent object because it is null when autobuild is being turned on (this is caused by the method Preferences.setValue(String, boolean) removing the explicit setting when the value is equal to the default value). Partially fixes eclipse-platform#497
Replacing deprecated Preferences API usage with modern Equinox Preferences API. Partially fixes eclipse-platform#497
how do we do testing for the fix we are providing for this issue ? |
Generally there are a lot of automated tests running before an commit is accepted and also even more tests in the day after. However it's also good to test the code before creating a PR. In the call hierarchy of the code you may eventually find a testcase that can be manually run on your local computer. Sometimes helps to debug it. If you don't find a testcase it is very appreciated to add a junit test that both validates old and new behaviour. |
…se-platform#497 Replace deprecated preferences APIs. Partially fixes eclipse-platform#497
Replacing deprecated Preferences API usage with modern Equinox Preferences API. Partially fixes eclipse-platform#497
Replacing deprecated Preferences API usage with modern Equinox Preferences API. Partially fixes eclipse-platform#497
Replacing deprecated Preferences API usage with modern Equinox Preferences API. Partially fixes eclipse-platform#497
Replace deprecated preferences APIs. Partially fixes #497
Is there any reason why RefreshManager.java is not fixed for this issue and the issue is already closed? could anyone let me know the reason before creating a PR for the same |
that was autoclosed by related PR. |
…#497 Replacing deprecated Preferences API usage with modern Equinox Preferences API. Partially fixes eclipse-platform#497
…#497 Replacing deprecated Preferences API usage with modern Equinox Preferences API. Partially fixes eclipse-platform#497
…#497 Replacing deprecated Preferences API usage with modern Equinox Preferences API. Partially fixes eclipse-platform#497
…#497 Replacing deprecated Preferences API usage with modern Equinox Preferences API. Partially fixes eclipse-platform#497
…#497 Replacing deprecated Preferences API usage with modern Equinox Preferences API. Partially fixes eclipse-platform#497 Updated copyright header as per review comments Squash Commits
If we do not use it anymore in platform, please mark it for deletion (via the forRemoval=true attribute on the @deprecated annotation, so that we have the option to delete it in 3 years. |
org.eclipse.core.runtime.Preferences is deprecated since 2014, but there are still as of today 46 matches.
It would be good to get the reference count down her and seems a good first issue for contributors that want to get in touch with eclipse code or anyone interested in cleaning up things.
As there was a quite large attempt to "move" code to Java 17 it seems to have issues for deprecated references is even worth more.
The text was updated successfully, but these errors were encountered: