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

Use OSGi service for UI startup handler #798

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

Bananeweizen
Copy link
Collaborator

Bundle activators should do as little work as possible. Therefore move the registration of the window listener out of the bundle activation and instead have OSGi call back when the application has started. That's later, that improves startup performance and that should avoid race conditions on the workbench display access.

Fixes #781

Bundle activators should do as little work as possible. Therefore move
the registration of the window listener out of the bundle activation and
instead have OSGi call back when the application has started. That's
later, that improves startup performance and that should avoid race
conditions on the workbench access.
@Bananeweizen
Copy link
Collaborator Author

for reviewers: the only interesting thing is line 47 of the new event handler class. everything else is either moved code from the activator class, or generated stuff from the eclipse declarative service support.

@Calixte Calixte merged commit a7be71c into checkstyle:master Jan 9, 2025
7 checks passed
@Bananeweizen Bananeweizen deleted the service branch January 10, 2025 07:58

package net.sf.eclipsecs.ui;

import org.osgi.service.component.annotations.Component;
Copy link
Contributor

Choose a reason for hiding this comment

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

@Bananeweizen My Eclipse is telling me that this import cannot be resolved. Any ideas?

Copy link
Collaborator Author

@Bananeweizen Bananeweizen Jan 12, 2025

Choose a reason for hiding this comment

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

@Calixte

grafik

That package is part of the org.eclipse.osgi.services bundle, which in turn is part of our target platform. The most probable reason for you not seeing it would be that you develop against the running IDE application, not against the target platform. Enable Preferences > Plugin Development > Show current target platform in status bar, so you can always easily see what you are developing against. Then open the *.target file and hit "Set as active target platform".

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.

net.sf.eclipsecs.ui (1821)
2 participants