|
@@ -1,5 +1,7 @@
|
|
|
package org.yakindu.sct.model.stext.naming;
|
|
|
|
|
|
+import org.eclipse.emf.ecore.EObject;
|
|
|
+import org.eclipse.xtext.EcoreUtil2;
|
|
|
import org.eclipse.xtext.naming.IQualifiedNameConverter;
|
|
|
import org.eclipse.xtext.naming.QualifiedName;
|
|
|
import org.eclipse.xtext.util.Strings;
|
|
@@ -27,4 +29,17 @@ public class StextNameProvider extends SGraphNameProvider {
|
|
|
}
|
|
|
return name;
|
|
|
}
|
|
|
+
|
|
|
+ protected QualifiedName getNamespace(EObject child) {
|
|
|
+ QualifiedName name = super.getNamespace(child);
|
|
|
+ if (!(child instanceof InterfaceScope)) {
|
|
|
+ InterfaceScope interfaceScope = EcoreUtil2.getContainerOfType(
|
|
|
+ child, InterfaceScope.class);
|
|
|
+ if (interfaceScope != null
|
|
|
+ && getFullyQualifiedName(interfaceScope) != null) {
|
|
|
+ name = getFullyQualifiedName(interfaceScope);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return name;
|
|
|
+ }
|
|
|
}
|