Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Make server-side layouting optional in EcoreModelFactory #18

Merged
merged 3 commits into from
Jan 17, 2019

Conversation

planger
Copy link
Contributor

@planger planger commented Jan 16, 2019

No description provided.

@planger planger requested a review from eneufeld January 16, 2019 09:47
@@ -70,8 +70,10 @@ public SModelRoot loadModel(ResourceSet resourceSet, URI sourceURI) {
LOGGER.error(e);
}

EcoreLayoutEngine layoutEngine = new EcoreLayoutEngine();
layoutEngine.layout(result);
if (serverSideLayout) {
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it make sense to move the whole layouting into a separate method? so you would do:

var model = loadModel();
layoutModel(model);

Copy link
Member

Choose a reason for hiding this comment

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

And shouldn't the whole Layoutengine initialization ElkLayoutEngine.initialize(new LayeredMetaDataProvider()); be part of this method?

@planger
Copy link
Contributor Author

planger commented Jan 17, 2019

Thanks for the feedback! Yes, you mean like in a6b4f41?

Clients could then optionally invoke layoutModel(ILayoutMetaDataProvider) also providing the metadata for layout configuration.

@planger planger merged commit f4d2ed7 into master Jan 17, 2019
@planger planger deleted the make-server-side-layouting-optional branch January 17, 2019 10:59
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants