Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.eclipse.xtext.resource.persistence.StorageAwareResource;

import com.avaloq.tools.ddk.xtext.modelinference.InferredModelAssociator;
import com.avaloq.tools.ddk.xtext.resource.ResourceSetOptions;


/**
Expand Down Expand Up @@ -69,6 +70,8 @@ private void ensureAssociationsLoaded() {
if (resource.eAdapters().remove(this)) {
DirectLinkingResourceStorageLoadable loadable = (DirectLinkingResourceStorageLoadable) ((DirectLinkingResourceStorageFacade) resource.getResourceStorageFacade()).getOrCreateResourceStorageLoadable(resource);
try {
// the associations are mappings from AST model elements to inferred model elements (and back) so we cannot skip loading the model.
ResourceSetOptions.setSkipModel(resource.getResourceSet(), false);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should we log a warning?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I don't think so. Isn't this just a load that was missed when the 'skipModel' option was added?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

but that is a programming error, isn't it?

loadable.loadIntoResource(resource, ResourceLoadMode.ONLY_ASSOCIATIONS);
} catch (IOException e) {
throw new WrappedException(e);
Expand Down