introduce static helper method GC#create
which takes care of creation and disposal of the GC object
Fixes: https://github.com/eclipse-platform/eclipse.platform.swt/issues/955
@HannesWell : could you please take a look at this change? I had to introduce a new Runnable interface which passes the GC as argument. Is there already an existing interface I could re-use? Do we have to introduce the static method GC#drawOn in all platform specific GC implementations?
Test Results
299 files ±0 299 suites ±0 6m 58s :stopwatch: -21s 4 100 tests ±0 4 092 :white_check_mark: ±0 8 :zzz: ±0 0 :x: ±0 12 212 runs ±0 12 137 :white_check_mark: ±0 75 :zzz: ±0 0 :x: ±0
Results for commit 573159d6. ± Comparison against base commit e703afe1.
:recycle: This comment has been updated with latest results.
Hello @tobiasmelcher, thank you for this PR. Sorry for my late reply but I just started my almost three week of vacation when you created this PR and when I came back a full TODO list was ready to be worked off.
Do we have to introduce the static method GC#drawOn in all platform specific GC implementations?
Yes we do, but you can just import/open the fragments for the other platforms and they will compile in your workspace. For you it is probably sufficient to only have one arch per OS since they only differ in the embedded native binaries, but the code is the same for all archs on one OS.
I had to introduce a new Runnable interface which passes the GC as argument. Is there already an existing interface I could re-use?
Yes there is already SWTRunnable. But as I have just written in https://github.com/eclipse-platform/eclipse.platform.swt/issues/955#issuecomment-2016446861, I think this is not the optimal solution, which I only noticed when reviewing your changes to apply the new method (applying it immediately can therefore be very helpful 👍🏽 )
Thanks a lot @HannesWell for all the feedback. Could you please take a look and review my latest change eb1dc57 ? As already mentioned, I had some troubles with the formatting; I executed then the format action only on the changed coding parts. Is that ok?