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

Replace usage of internal SWT TypedListener and SWTEventListener #583

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

HannesWell
Copy link
Contributor

The org.eclipse.swt.widgets.TypedListener should be considered an internal class (as the doc states) and leaks the class SWTEventListener which also resides in an internal package.

Leverage new methods introduced in eclipse-platform/eclipse.platform.swt#1112 in order to avoid the usage of that two classes. I don't know if there is a specific backwards compatibility policy in Nebula regarding SWT, but at the moment the new methods are only available in Eclipse I-builds. I guess therefore this change cannot be applied immediately.
In order to demonstrate it works I changed temporarily changed the target-platform of the build.

@lcaron could you please have a look at this one?

@Phillipus for your information (if you want to review this too, please do so).

@laeubi
Copy link
Contributor

laeubi commented Mar 23, 2024

I guess therefore this change cannot be applied immediately.

Yes it will at least require a new SWT release

@HannesWell
Copy link
Contributor Author

I guess therefore this change cannot be applied immediately.

Yes it will at least require a new SWT release

Yes.

I also want to mention that, even if SWT will eventually deprecate and (re-)move the SWTEventListener and TypedListener it will not happen before at least the two year deprecation period has passed.
So it would also be possible to await the actual removal before submitting this PR (although I wouldn't mind to submit it earlier :) ) in order to avoid using tricks.

@@ -33,7 +33,7 @@ Contributors:
<jacoco-version>0.8.9</jacoco-version>
<easymock-version>5.2.0</easymock-version>

<target-platform>https://download.eclipse.org/releases/latest</target-platform>
<target-platform>https://download.eclipse.org/eclipse/updates/4.32-I-builds/</target-platform>
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, replacing the release train site with the Platform's I-builds site is going to reduce the available set of 3rd party bundles significantly, leading to resolution failures.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I noticed that as well. But since I assumed it will take some time until this is submitted anyway and it was temporary I was lazy to look up how the repos are set up.
But now I checked it and it should work. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now the build succeeded :)

Choose a reason for hiding this comment

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

After 4.32 M1 release you could change it to https://download.eclipse.org/releases/2024-06/?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes that would be possible too, but would then later have to be changed back, if the latest is generally desired.

Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, during the end of the last release cycle SimRel produced and now maintains this:

https://download.eclipse.org/releases/milestone/

as requested here:

eclipse-simrel/simrel.build#286

This site has the advantage that it tracks milestones and release candidates so that any problems are noticed before the release rather than after the release.

@HannesWell HannesWell force-pushed the replace-typedListener branch 2 times, most recently from 4ad2ebb to db4818a Compare March 23, 2024 09:45
Comment on lines 275 to 279
<repository>
<id>eclipse-iBuild</id>
<layout>p2</layout>
<url>https://download.eclipse.org/eclipse/updates/4.32-I-builds</url>
</repository>
Copy link
Contributor Author

@HannesWell HannesWell Mar 23, 2024

Choose a reason for hiding this comment

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

This should be reverted before submission.

@lcaron
Copy link
Contributor

lcaron commented Mar 23, 2024

Thank you @HannesWell . It seems to be a big change. @wimjongman what do you think about this proposal ?

@HannesWell HannesWell force-pushed the replace-typedListener branch from db4818a to 762f04e Compare March 24, 2024 14:32
@wimjongman
Copy link
Contributor

Thank you @HannesWell . It seems to be a big change. @wimjongman what do you think about this proposal ?

When the method is officially released, we can take it.

@HannesWell HannesWell force-pushed the replace-typedListener branch from 762f04e to c280306 Compare April 10, 2024 15:52
@HannesWell HannesWell force-pushed the replace-typedListener branch from c280306 to 27d6297 Compare June 12, 2024 22:17
@HannesWell
Copy link
Contributor Author

Thank you @HannesWell . It seems to be a big change. @wimjongman what do you think about this proposal ?

When the method is officially released, we can take it.

It was just released today. I rebased the branch and resolved all conflicts.

@HannesWell HannesWell force-pushed the replace-typedListener branch from 27d6297 to e530c60 Compare June 12, 2024 22:18
@merks
Copy link
Contributor

merks commented Jun 14, 2024

@wimjongman @lcaron

Any objections to merging this now?

Copy link
Contributor

@wimjongman wimjongman left a comment

Choose a reason for hiding this comment

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

Some queries.

@wimjongman wimjongman merged commit 3f39d77 into EclipseNebula:master Jun 19, 2024
3 checks passed
@wimjongman
Copy link
Contributor

Thanks, Hannes!

@HannesWell HannesWell deleted the replace-typedListener branch June 20, 2024 16:57
@HannesWell
Copy link
Contributor Author

Thanks for your review!

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.

6 participants