-
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
Use Java Generics where possible #155
Comments
@azoitl We discussed this with our team. We can accept the #149. And we are planning to split other parts of our Destrolaric#2 into several smaller prs. Is it acceptable? |
Yes |
@Destrolaric first of all thx a lot for your ongoing support and contributions. I'm very grateful for these. I'm also sorry that I'm causing here extra work and a burden. So also thx for that. I was thinking it would be good idea to meet in some online meeting so we can better sync on our interests. What do you think? |
@azoitl Thanks for the suggestion. It looks like a good idea. I think we may have the meeting next week, is that ok? |
Next week sounds good. May I send you a few suggestions via email? |
@azoitl Yes, of course. |
https://github.com/eclipse/gef-classic/blob/49d0515fa7fc09bc6b35d47643f9cc26661fb5c3/org.eclipse.draw2d/src/org/eclipse/draw2d/IFigure.java#L295 returning a list of <? extends IFigure> instead of IFigure breaks our builds (https://ci.eclipse.org/webtools/view/webtools_CI/job/webtools-jsf_master/2353/console): [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.7.5:compile (default-compile) on project org.eclipse.jst.jsf.facesconfig.ui: Compilation failure: Compilation failure: |
@nitind sorry that this breaks your build. I just pushed a fix with a small clean-up to webtools-jsf that fixes the issue. The reason we use the <? extends IFigure> version is documented in the discussion of PR #81. But looking at your code I noticed that that what you like to do should be in the end offered by the IFigure interface, namely reordering a child. Because adding children by directly manipulating the children list is somewhat dangerous and may break the figure. What do you think about adding a reorderChild method to IFigure? |
I don't think it's needed, given the various overloaded add() methods that already exist. I've pushed a small change atop yours in consideration of this. The more complicated scenario was the Dali build, with this error: [ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:2.7.5:compile (default-compile) on project org.eclipse.jpt.jpa.ui: Compilation failure: Compilation failure: |
Thx for the feedback. Damn I really hoped that my changes would break less. Have to be more considerate for the upcoming changes. |
This issue is stale because it has been open for 90 days with no activity. |
This issue is stale because it has been open for 90 days with no activity. |
As part of this clean-up a new helper method has been added for getting an EditPart for a model instance and for getting the LayerManager from a viewer. eclipse-gef#155
As part of this clean-up a new helper method has been added for getting an EditPart for a model instance and for getting the LayerManager from a viewer. eclipse-gef#155
As part of this clean-up a new helper method has been added for getting an EditPart for a model instance and for getting the LayerManager from a viewer. #155
With the improved typing in several places casts could be removed. Making code better readable and cleaner. Addresses: eclipse-gef#155
The new method filters the selection given to the SelectionAction on EditParts. This can reduce the effort for implementing SelectionActions and at least makes them clearer. Addresses: eclipse-gef#155
The new method filters the selection given to the SelectionAction on EditParts. This can reduce the effort for implementing SelectionActions and at least makes them clearer. Addresses: eclipse-gef#155
…se-gef#155 As we now have more typed lists the handling of selections and the resulting DnD actions can be implemented more nicely. Addresses: eclipse-gef#155
With the improved typing in several places casts could be removed. Making code better readable and cleaner. Addresses: #155
As we now have more typed lists the handling of selections and the resulting DnD actions can be implemented more nicely. Addresses: #155
The new method filters the selection given to the SelectionAction on EditParts. This can reduce the effort for implementing SelectionActions and at least makes them clearer. Addresses: #155
This issue is stale because it has been open for 90 days with no activity. |
GEF Classic's dates back to a time without generics. While this is in general nothing bad it makes maintaining GEF Classic hard. Also clients and GEF Classic have to perform more instanceof checks and cast then necessary. Therefore GEF Classic is also hard to use.
However just type all generics used is also not the solution as it may break client code. See for example the discussion in PR #81.
In the other side there are partly hidden issues in GEF Classic that a cleanup can reveal (e.g., Issue #154, or the planned upcoming PR azoitl@69194fb).
As now several people are interested in improving the GEF Classic code base in this respect this issue is here to coordinate any effort. But also discuss how to best test and evaluate all proposed changes to make the transition for our clients as smooth as possible.
Furthermore the starting point for this has already been done. There are already several PRs merged for the 3.15 release but there is still some way ahead of us.
For starting this I've created a first PR #149 and based on that there are several commits in the pipeline that can be moved to PRs as soon the first one is merged:
- azoitl@7d1ad00
- azoitl@588d877
- azoitl@19c84c8
- azoitl@69194fb
First set of Validation and Check rules
In order to ensure a smooth transition for our users I would suggest at least the following tests and rules to be performed:
The text was updated successfully, but these errors were encountered: