-
Notifications
You must be signed in to change notification settings - Fork 50
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
[Modernice Code] Typify IFigure/Figure's Children #149
Conversation
@azoitl Hi, I think it may cause later conflicts with planned pr Destrolaric#2. Unfortunately, I can't currently open pr to this repository for now. |
@Destrolaric I'm sorry I was not aware that you are also working on that topic. I had a quick look on your current state. Based on that I would like to start with my commit. There are a few reasons for that:
How can we better synchronize that we are not duplicating each others work? |
@azoitl Hmm, maybe we can split the parts each of us could refactor. I think it may be viable in that case. |
How about creating an issue where we can discuss that? This could also help us to document solutions and best practices and how to evaluate changes. For now I would be most grateful for a fix to the Draw2d eclipse platform dependency problem as this is breaking our tests and breaking for potential users. |
@azoitl Yes, it will be a good idea to create an issue where it could be discussed. I will try to work out the fix in a short time. |
@Destrolaric I created Issue #155 where I tried to summarize what I think we would like to achieve. But I also mentioned some previous issues I phased with doing that and why I'm a bit more cautious now. Feel free to extend and comment. |
To show how updated IFgiure getChildren typed interface can be used to improve client code the Draw2d example was cleaned and reworked.
3fb352d
to
1149e92
Compare
In my attempt to modernize GEF classic code I worked on the IFigure and more important the Figures infrastructure by typifying the children list in Figure and change the return value of getChildren to List<? extends IFigure>. With that we can get rid of many casts and instanceof checks. Also Client code can take advantage of it. In order to test it I compiled GEF classic and all its examples as well as with Eclipse GMF runtime and Eclipse 4diac. To ensure that I haven't broken any core features (e.g., selection) I ran the GEF classic logic editor and Eclipse 4diac.
Finally to show the advantages I completely reworked the Draw2d Tree example.
I hope with that caution it should be a save PR.
\cc @Phillipus @pcdavid @Destrolaric