Browse Source

corrected bug in Name_wrangling

bohl@itemis.de 10 years ago
parent
commit
eddcd6b440

+ 2 - 14
plugins/org.yakindu.sct.model.sexec/src/org/yakindu/sct/model/sexec/naming/DefaultNamingService.xtend

@@ -380,23 +380,11 @@ class DefaultNamingService implements INamingService {
 	}
 
 	def protected dispatch String elementName(ExecutionScope it, NameShorteningStrategy nameShorteningType) {
-		switch nameShorteningType {
-			case NameShorteningStrategy::FQN_NAME: return provider.getFullyQualifiedName(it).skipFirst(2).
-				toString(separator.toString)
-			case NameShorteningStrategy::SHORT_NAME: return name
-			case NameShorteningStrategy::REMOVE_VOWELS: return name?.removeVowels
-			case NameShorteningStrategy::INDEX_POSITION: return asIndexPosition
-		}
+		return sourceElement.elementName(nameShorteningType)
 	}
 
 	def protected dispatch String elementName(ExecutionState it, NameShorteningStrategy nameShorteningType) {
-		switch nameShorteningType {
-			case NameShorteningStrategy::FQN_NAME: 
-				return provider.getFullyQualifiedName(it).skipFirst(2).toString(separator.toString)
-			case NameShorteningStrategy::SHORT_NAME: return simpleName
-			case NameShorteningStrategy::REMOVE_VOWELS: return simpleName.removeVowels
-			case NameShorteningStrategy::INDEX_POSITION: return asIndexPosition
-		}
+		return sourceElement.elementName(nameShorteningType)
 	}
 
 	def protected dispatch String elementName(ExecutionNode it, NameShorteningStrategy nameShorteningType) {