|
|
|
|
|
Re: Registering both relative and fully qualified name in Scope [message #1785742 is a reply to message #1785684] |
Thu, 19 April 2018 09:07 |
Erwann Traisnel Messages: 14 Registered: June 2017 |
Junior Member |
|
|
That worked , thanks a lot Christian !
Here I share the snippet of code, just in case someone looks for the same answer :
if(scope instanceof ImportScope){
Module module = EcoreUtil2.getContainerOfType(context, Module.class);
//Module is the qualifying element
if(module != null){
QualifiedName qname = qualifiedNameProvider.getFullyQualifiedName(module);
if(qname != null){
ImportNormalizer importNormalizer = new ImportNormalizer(qname, true, true);
scope = new ImportScope(Collections.singletonList(importNormalizer), scope, null, reference.eClass(), false);
}
}
}
}
Thanks for your help !
Erwann
|
|
|
Powered by
FUDForum. Page generated in 0.03943 seconds