Skip to content
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

Clean editpart children #212

Merged
merged 10 commits into from
Jul 3, 2023
Merged

Conversation

azoitl
Copy link
Contributor

@azoitl azoitl commented Jun 11, 2023

In order to address #155 this PR reattempts to turn the children list and all its handling int java generics. For most users this PR should not provide any issues.

@Destrolaric what do you think?

@pcdavid I tried hard but I break 2 lines in GMF runtime. I would submit a PR to fix it. How and when would you like to have it?

@github-actions
Copy link

github-actions bot commented Jun 11, 2023

Unit Test Results

    9 files      9 suites   16s ⏱️
304 tests 304 ✔️ 0 💤 0
912 runs  912 ✔️ 0 💤 0

Results for commit 962fa3b.

♻️ This comment has been updated with latest results.

@azoitl azoitl force-pushed the clean_editpart_children branch from 962fa3b to 00a285f Compare June 11, 2023 20:47
@pcdavid
Copy link
Contributor

pcdavid commented Jun 12, 2023

@pcdavid I tried hard but I break 2 lines in GMF runtime. I would submit a PR to fix it. How and when would you like to have it?

I'll try to have a look this week, but don't know when.

Copy link
Contributor

@Destrolaric Destrolaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, some minor questions.


result.addAll(rightSide);
return result;
}

private List findNodesBetweenInclusive(EditPart left, EditPart right) {
private static List<EditPart> findNodesBetweenInclusive(EditPart left, EditPart right) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure transferring this method to a static context will not break anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As it is private and not accessing any fields and it was suggested by the Eclipse Java compiler I'm pretty sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this method is private, not accessing any fields, and as it was suggested by the Eclipse Java compiler I'm pretty sure. But if you are not feeling comfortable I'm happy to change back.

Comment on lines +89 to +91
return new ImportsPart(cont);

case Container.TYPE_COMMENT, Container.TYPE_PARAGRAPH:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor formatting issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you format this? I thought the new case statement with commas between cases is formated on one line.

@azoitl
Copy link
Contributor Author

azoitl commented Jun 12, 2023

@pcdavid I tried hard but I break 2 lines in GMF runtime. I would submit a PR to fix it. How and when would you like to have it?

I'll try to have a look this week, but don't know when.

Please take your time. I have the fix for GMF ready just in case.

pcdavid added a commit to eclipse-gmf-runtime/gmf-runtime that referenced this pull request Jun 13, 2023
GraphicalEditPart.getChildren() now returns a List<? extends GraphicalEditPart>

See-also: eclipse-gef/gef-classic#212
Signed-off-by: Pierre-Charles David <[email protected]>
@azoitl
Copy link
Contributor Author

azoitl commented Jul 2, 2023

@pcdavid I just saw your commit. So I think your are fine with merging it? Please note that I'm happy to perform such API change commits for GMF runtime as well.

@pcdavid
Copy link
Contributor

pcdavid commented Jul 3, 2023

Let me check again, I'm not sure that patch compiled properly.

pcdavid added a commit to eclipse-gmf-runtime/gmf-runtime that referenced this pull request Jul 3, 2023
GraphicalEditPart.getChildren() now returns a List<? extends GraphicalEditPart>

See-also: eclipse-gef/gef-classic#212
Signed-off-by: Pierre-Charles David <[email protected]>
pcdavid added a commit to eclipse-gmf-runtime/gmf-runtime that referenced this pull request Jul 3, 2023
GraphicalEditPart.getChildren() now returns a List<? extends GraphicalEditPart>

See-also: eclipse-gef/gef-classic#212
Signed-off-by: Pierre-Charles David <[email protected]>
@pcdavid
Copy link
Contributor

pcdavid commented Jul 3, 2023

I've merged the GMF part, you can go ahead.

@azoitl
Copy link
Contributor Author

azoitl commented Jul 3, 2023

I've merged the GMF part, you can go ahead.

thx. Then I will do. Have a few more patches in the pipeline that I would love to have in RC1 to have early tests. For that I also changed a few of my test setups to catch things we missed in 3.16.

@azoitl azoitl merged commit 509370e into eclipse-gef:master Jul 3, 2023
@azoitl azoitl deleted the clean_editpart_children branch July 3, 2023 09:36
@azoitl azoitl added this to the 3.17.0 milestone Jul 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants