Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1997 from Yakindu/issue_906_pro
Browse files Browse the repository at this point in the history
filter invisible elements from scope, used by c pro
  • Loading branch information
tkutz committed Mar 22, 2018
2 parents 6e1449c + 3c87807 commit 279c5cf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.eclipse.xtext.util.IAcceptor;
import org.eclipse.xtext.util.IResourceScopeCache;
import org.yakindu.base.types.TypesPackage;
import org.yakindu.base.types.resource.TypedResourceDescriptionStrategy;
import org.yakindu.base.types.typesystem.ITypeSystem;
import org.yakindu.sct.domain.extension.DomainRegistry;
import org.yakindu.sct.model.sgraph.SGraphPackage;
Expand Down Expand Up @@ -100,7 +101,10 @@ public boolean apply(IEObjectDescription input) {
}
});
result = filterAnnotations(reference, result);
return result;
return new FilteringScope(result, input -> {
String isVisible = input.getUserData(TypedResourceDescriptionStrategy.IS_VISIBLE_TYPE);
return isVisible == null || Boolean.valueOf(isVisible);
});
}

protected IScope filterAnnotations(EReference reference, IScope result) {
Expand Down

0 comments on commit 279c5cf

Please sign in to comment.