-
Notifications
You must be signed in to change notification settings - Fork 49
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
[Modernize Code] use generic version of getAdapter #101
Conversation
I tried to do this exact thing recently in my GEF fork. Down-stream classes that extend the changed classes and over-ride |
I've just gone through all of our GEF forked code and made the same changes. All our unit tests pass, and the RCP app seems to be working all OK. |
@Phillipus thanks for testing. Would it be a lot of work and duplicate your test setup so that I have a second RCP? |
Not sure what you mean? Archi code is here: https://github.com/archimatetool/archi We have our version of GEF/Draw2d/Zest as bundles that I copied last year. |
Ah yes. Sorry didn't remember that. But for testing I would always need to merge my changes into your repo. I guess this is not the right place here, but what can we do that you don't need a full GEF classic copy anymore? |
My copy has bug fixes, theme colors for palette, and most importantly an option not to use See https://github.com/archimatetool/archi/commits/master/org.eclipse.draw2d |
8c80666
to
189a588
Compare
Ah yes the infamouse ScaledGraphics problems. Thanks for tracking this down. We also deactivated the ScaledGraphics in 4diac IDE based on your findings. But it seems you had more issue then we had. |
Opened #106 so we can carry on there... |
Given the feedback and my tests I'll merge this PR now. |
This pull request updates all getAdapter methods to the generic version also used in the Eclipse Platform. This greatly improves the usability of the Adapter interface in GEF, as clients do not need to to perform instanceof and casts any more.
@vogella @Phillipus if you have time I would be happy for a quick look. But I think I followed the Eclipse Platforms style and therefore it shouldn't have an impact on users.
I tested with Eclipse 4diac IDE where we make quite some use of the getAdapter interface and it worked as expected.