gef-classic icon indicating copy to clipboard operation
gef-classic copied to clipboard

Clean-up Deprecated API Usage

Open azoitl opened this issue 3 years ago • 15 comments

Several of the API elements marked as deprecated are used through out the GEF code base. As a first step for clean-up it would be good to replace this usage with the according replacement APIs.

azoitl avatar Apr 02 '22 19:04 azoitl

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Jul 02 '22 03:07 github-actions[bot]

This issue was closed because it has been inactive for 180 days since being marked as stale.

github-actions[bot] avatar Dec 30 '22 02:12 github-actions[bot]

This will be a longer going effort. Therfore I reopen it it so that we have it as notification in the open issue list.

azoitl avatar Dec 30 '22 22:12 azoitl

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Mar 31 '23 02:03 github-actions[bot]

This issue was closed because it has been inactive for 180 days since being marked as stale.

github-actions[bot] avatar Sep 28 '23 02:09 github-actions[bot]

While working through the different deprecated fields and methods in GEF Classic I came across Point::getDistance2. This method calculates the squared distance between to points. The deprecation comment their states that instead getDistance() should be used and if needed the results squared.

I checked the usage of getDistance2and it is mainly used to sort things according to distance. For this the getDistance2 has a much higher performance (sqrt, which is used in getDistance2is in general slow) and also a higher resolution. Therefore I don't think thisgetDistance2should be deprecated. If no one objects I would remove the deprecation from getDistance2and only change the return value from int to long. This is has no impact on the API and increases the utility.

Did I miss anything? Any opinion from @ptziegler, @Destrolaric, or @Phillipus?

azoitl avatar Jan 06 '24 21:01 azoitl

I really don't like the method name, so because of that alone, I would keep it deprecated. What about creating a new method getDistanceSquared() and have getDistance2() simply delegate to it?

ptziegler avatar Jan 07 '24 16:01 ptziegler

Hey @azoitl, I would like to contribute to this issue, just wanted to run that by you once. There wouldn't be any problem if I submit a PR in near future, would it?

l3002 avatar Jan 15 '24 04:01 l3002

Hey @azoitl, I would like to contribute to this issue, just wanted to run that by you once. There wouldn't be any problem if I submit a PR in near future, would it?

@l3002 we are happy for any support. Feel free to contribute.

azoitl avatar Jan 15 '24 08:01 azoitl

Please see #383 for the breaking change caused by the last merge.

wiresketch avatar Mar 14 '24 17:03 wiresketch

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Jun 13 '24 01:06 github-actions[bot]

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Dec 05 '24 02:12 github-actions[bot]

This issue is stale because it has been open for 90 days with no activity.

github-actions[bot] avatar Mar 06 '25 02:03 github-actions[bot]