Skip to content

Commit aeb8d14

Browse files
authored
Merge pull request #275 from rubenporras/AllowBinaryModelsInParallelResourceLoader
Propagate the Source Level URIs to the child ResourceSet
2 parents 7f6279c + 4213ea6 commit aeb8d14

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

com.avaloq.tools.ddk.xtext.builder/src/com/avaloq/tools/ddk/xtext/builder/resourceloader/ParallelResourceLoader.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
import com.avaloq.tools.ddk.xtext.builder.tracing.LoaderDequeueEvent;
4242
import com.avaloq.tools.ddk.xtext.builder.tracing.ResourceLoadEvent;
4343
import com.avaloq.tools.ddk.xtext.linking.ILazyLinkingResource2;
44+
import com.avaloq.tools.ddk.xtext.resource.persistence.DirectLinkingSourceLevelURIsAdapter;
4445
import com.avaloq.tools.ddk.xtext.tracing.ITraceSet;
4546
import com.avaloq.tools.ddk.xtext.util.EmfResourceSetUtil;
4647
import com.google.common.base.Joiner;
@@ -164,6 +165,7 @@ public ParallelLoadOperation(final ResourceSet parent, final IProject project) {
164165
protected ResourceSet initialValue() {
165166
ResourceSet resourceSet = getResourceSetProvider().get(project);
166167
BuildPhases.setIndexing(resourceSet, BuildPhases.isIndexing(parent));
168+
DirectLinkingSourceLevelURIsAdapter.setSourceLevelUris(resourceSet, DirectLinkingSourceLevelURIsAdapter.findInstalledAdapter(parent).getSourceLevelURIs());
167169
resourceSet.getLoadOptions().putAll(parent.getLoadOptions());
168170
// we are not loading as part of a build
169171
resourceSet.getLoadOptions().remove(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE);

com.avaloq.tools.ddk.xtext/src/com/avaloq/tools/ddk/xtext/resource/persistence/DirectLinkingSourceLevelURIsAdapter.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
package com.avaloq.tools.ddk.xtext.resource.persistence;
1313

14-
import java.util.Collection;
1514
import java.util.Collections;
1615
import java.util.Set;
1716

@@ -35,7 +34,7 @@ public boolean isAdapterForType(final Object type) {
3534
return type == DirectLinkingSourceLevelURIsAdapter.class;
3635
}
3736

38-
public Collection<URI> getSourceLevelURIs() {
37+
public Set<URI> getSourceLevelURIs() {
3938
return sourceLevelURIs;
4039
}
4140

@@ -59,7 +58,7 @@ public static void setSourceLevelUris(final ResourceSet resourceSet, final Set<U
5958

6059
/**
6160
* Finds an installed {@link DirectLinkingSourceLevelURIsAdapter} adapter for a given resource set.
62-
*
61+
*
6362
* @param resourceSet
6463
* resource set, must not be {@code null}
6564
* @return installed adapter or {@code null} if none

0 commit comments

Comments
 (0)