eclipse-efx / efxclipse-rt

Eclipse Public License 1.0
28 stars 29 forks source link

Update Runtime Platform to 2022-06 #449

Closed tomsontom closed 2 years ago

tomsontom commented 2 years ago

We need to lift the main platform to 2022-06 so that people get all the bugfixes, speed improvements, ... from the upstream projects

cdamus commented 2 years ago

Thanks for working on an update to Eclipse 2022-06 platform, which I need for Java 17 support (based on a recent enough Equinox release to deal with the deprecation of Security Manager).

However, I'm finding that none of the e4 application model contributions (fragments) from my plug-ins are being loaded when my application starts up. The problem is that the EFX_ResourceHandler::loadMostRecentModel() method creates a new instance of the ModelAssembler class from e4 to load the application model. However, the ModelAssembler is an OSGi service component that has the IExtensionRegistry injected by OSGi DS, not by e4 context DI. Consequently, the second instance of the ModelAssembler that the EFX_ResourceHandler creates doesn't have an extension registry and so it doesn't find any of the extensions that register fragment models.

Can this be fixed by just using the ModelAssembler component instance provided by OSGi? I don't know why a new instance is created here.

tomsontom commented 2 years ago

Hi,

Yes. My plan is to work on this in the next few days.

Tom

Von meinem iPhone gesendet

Am 06.07.2022 um 23:56 schrieb Christian W. Damus @.***>:

 Thanks for working on an update to Eclipse 2022-06 platform, which I need for Java 17 support (based on a recent enough Equinox release to deal with the deprecation of Security Manager).

However, I'm finding that none of the e4 application model contributions (fragments) from my plug-ins are being loaded when my application starts up. The problem is that the EFX_ResourceHandler::loadMostRecentModel() method creates a new instance of the ModelAssembler class from e4 to load the application model. However, the ModelAssembler is an OSGi service component that has the IExtensionRegistry injected by OSGi DS, not by e4 context DI. Consequently, the second instance of the ModelAssembler that the EFX_ResourceHandler creates doesn't have an extension registry and so it doesn't find any of the extensions that register fragment models.

Can this be fixed by just using the ModelAssembler component instance provided by OSGi? I don't know why a new instance is created here.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

tomsontom commented 2 years ago

[...]

Can this be fixed by just using the ModelAssembler component instance provided by OSGi? I don't know why a new instance is created here.

So this was changed with https://bugs.eclipse.org/bugs/show_bug.cgi?id=571866 - in former days this has all been created by DI. I've pushed a fix and published a new build

cdamus commented 2 years ago

Can this be fixed by just using the ModelAssembler component instance provided by OSGi? I don't know why a new instance is created here.

So this was changed with https://bugs.eclipse.org/bugs/show_bug.cgi?id=571866 - in former days this has all been created by DI. I've pushed a fix and published a new build

Thanks, Tom! I can confirm that today's 8 July nightly build fixes my application model problems. I seem to be in good shape now on Java 17 platform.

tomsontom commented 2 years ago

Perfect - then the only thing let for a release is to update to EPL v2.0