Sirius – Representations lazy loading (experimental)


An experimental mode allows to have the representation lazy loading. This mode is available with the system property createLocalRepresentationInSeparateResource=true.

There is two main changes to keep in mind with this mode:


The Sirius API used to retrieve DRepresentation, such as the DialectManager, keep the same behavior: the representation will be loaded where necessary. New API (see the release note for more details) has been added to retrieve only loaded representations.

Warning, if some of your features depend on the Sirius crossReferencer, it may not return the same result than before. It works on the scope of only what is loaded in the session. Before, all the models was loaded whereas now some representations will not be. ECrossReferenceAdapter.getInverseReferences(EObject ) or ECrossReferenceAdapter.getInverseReferences(EObject , boolean) will not provide potential inverse references that would be in not loaded representation. The typical case is getting DRepresentationElement referencing a semantic element as

Override the representation location rule.

By default Sirius creates an *.srm file per representation. Developer may need to override this rule by choosing to add one or several representations in a specific resource.

The DRepresentationLocationRule interface

Provide your DRepresentationLocationRule using the org.eclipse.sirius.dRepresentationLocationRule extension point

Please refer to this extension point documentation for more details.