EMFProfiles is not properly activated if used without UI

Description

The profile registry is only activated if the UI bundle of the registry (org.modelversioning.emfprofile.registry.ui) is in the classpath. However, this should not be necessary.

The activation works because the UI bundle registeres an UI extension point in the Eclipse UI. Therefore, the UI bundle gets activated, which in turn activates the registry bundle (org.modelversioning.emfprofile.registry). The registry bundles loads all registered profiles from an extension point and registeres the corresponding meta models. Therefore, loading a resource containing a profile application works.

If the UI bundle of EMF Profiles is missing, the registry bundle is not activated and the profiles are not registered. Therefore, no model containing a profile application can be loaded.

From my point of view, the registry bundle should somehow be bound to the meta model initialization process of EMF or at least the loading of models. It should not be necessary to explicitly activate the registry from code (e.g. by calling IProfileRegistry.eINSTANCE).

Environment

The bug actually only affects EMF Profiles. I am using the latest nightly build.

Activity

Show:
Stephan Seifermann
November 28, 2019, 1:14 PM

The fix has been merged to master.

Stephan Seifermann
October 17, 2019, 8:27 AM

A possible solution to this issue could be

  • creating an activator in the registry bundle that triggers initialization of the registry

  • set the start level and auto start properties of the bundle via a p2.inf file

Fixed

Assignee

Stephan Seifermann

Reporter

Stephan Seifermann

Labels

None

Requirement Category

None

External issue URL

None

Time remaining

0m

Fix versions

Affects versions

Priority

Major