-
Notifications
You must be signed in to change notification settings - Fork 10
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
UIEventTopic
isn't working
#33
Comments
It seem soclstice do not handle service event correctly. DS works the way that it watches for events that a service is required and then triggers activation. Beside that, if you don't want to reimplement OSGi just for the sake of a single classloader, you should take a look at https://docs.osgi.org/specification/osgi.core/8.0.0/framework.connect.html it will allow you to start a real OSGi framework and connect bundles with a custom classloader to them ... |
There is already an implementation that uses connect to provide integration with single class loader, native, or JPMS: https://github.com/apache/felix-atomos If you are looking to use a single classloader with existing JARs (that happen to be OSGi bundles), I suspect using something like Atomos will get you very far without having to re-implement "just enough" to get you running. |
Thanks very much for the Atomos link, maybe that solves our problem or at least helps us debug what we're doing incorrectly. We've got lots of OSGi DS services that are starting correctly (
In some ways But taking something powerful ( |
Thanks very much to @tjwatson for helping us integrate Atomos in #36. Single-classloader Atomos+Equinox is now the default OSGi implementation for EquoIDE. You can opt-out of Atomos+Equinox with
in which case you'll be stuck on this bug again. We plan to come back and fix this someday, and it's quite a bit easier to do now that we can easily compare Solstice vs Atomos in the debugger. But this bug is no longer on the critical path towards getting our build plugins to |
The root problem turned out to be that when the starting state of our system was all bundles at The fix is that on startup we bring every lazy bundle all the way to equo-ide/solstice/src/main/java/dev/equo/solstice/BundleContextSolstice.java Lines 93 to 106 in 68f04f5
Badaboom, |
The
UIEventTopic
isn't working, and I'm not sure why. The easiest symptom to observe is that you can't drag-and-drop the tabs around. If you put a breakpoint on the constructor toorg.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon
you'll see that it is being created, but its method is never calledThese events are supposed to be created by
org.eclipse.e4.ui.internal.di.UIEventObjectSupplier
. If you put a breakpoint on its constructor, you'll see that it is never created. A very similar classorg.eclipse.e4.core.di.internal.extensions.EventObjectSupplier
is successfully created. Here they both are:I can put breakpoints on the OSGi parsing to see that the UIEventObjectSupplier is being parsed. The problem is that
EventObjectSupplier
hasimmediate = true
butUIEventObjectSupplier
does not. That is whyEventObjectSupplier
is in the service registry butUIEventObjectSupplier
is not.A hack would be to force a
UIEventObjectSupplier
to get created and placed into the service registry, but there must be some deeper issue which is causing this...The easiest way to debug this is with
IdeMainTest
, because all of the eclipse jars are just part of the regular classpath in an IDE.equo-ide/solstice/src/test/java/dev/equo/solstice/IdeMainTest.java
Lines 19 to 20 in 7a88682
The text was updated successfully, but these errors were encountered: