Просмотр исходного кода

corrected regression bug in Java SGen feature "naming".

malknet42 11 лет назад
Родитель
Сommit
460a5f823b

+ 28 - 28
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/GenmodelEntries.xtend

@@ -17,109 +17,109 @@ import org.yakindu.sct.model.sgen.FeatureParameterValue
 import org.yakindu.sct.model.sgen.GeneratorEntry
 
 class GenmodelEntries {
-	
+
 	@Inject extension Naming
-	
+
 	def private getLicenseFeature(GeneratorEntry it) {
 		getFeatureConfiguration(ICoreFeatureConstants::LICENSE_HEADER)
 	}
-	
-	def private getJavaTargetFeature(GeneratorEntry it) {
-		getFeatureConfiguration(IJavaFeatureConstants::JAVA_TARGET_FEATURE)
+
+	def private getNamingFeature(GeneratorEntry it) {
+		getFeatureConfiguration(IJavaFeatureConstants::NAMING_FEATURE)
 	}
-	
+
 	def private getGeneralFeatures(GeneratorEntry it) {
 		getFeatureConfiguration(IJavaFeatureConstants::GENERAL_FEATURES)
 	}
-	
+
 	def private FeatureParameterValue getBasePackageParameter(GeneratorEntry it) {
-		javaTargetFeature?.getParameterValue(IJavaFeatureConstants::BASE_PACKAGE)
+		namingFeature?.getParameterValue(IJavaFeatureConstants::BASE_PACKAGE)
 	}
 	
 	def private FeatureParameterValue getImplementationSuffixParameter(GeneratorEntry it) {
-		javaTargetFeature?.getParameterValue(IJavaFeatureConstants::IMPLEMENTATION_SUFFIX)
+		namingFeature?.getParameterValue(IJavaFeatureConstants::IMPLEMENTATION_SUFFIX)
 	}
-	
+
 	def private FeatureParameterValue getLicenseTextParameter(GeneratorEntry it) {
 		licenseFeature?.getParameterValue(ICoreFeatureConstants::LICENSE_TEXT)
 	}
-	
+
 	def private FeatureParameterValue getTimerServiceParameter(GeneratorEntry it) {
 		generalFeatures?.getParameterValue(IJavaFeatureConstants::TIMER_SERVICE)
 	}
-	
+
 	def private FeatureParameterValue getRuntimeServiceParameter(GeneratorEntry it) {
 		generalFeatures?.getParameterValue(IJavaFeatureConstants::RUNTIME_SERVICE)
 	}
-	
+
 	def private FeatureParameterValue getInterfaceObserverSupportParameter(GeneratorEntry it) {
 		generalFeatures?.getParameterValue(IJavaFeatureConstants::INTERFACE_OBSERVER_SUPPORT)
 	}
-	
+
 	def private FeatureParameterValue getUseJavaIntForInteger(GeneratorEntry it) {
 		generalFeatures?.getParameterValue(IJavaFeatureConstants::USE_JAVA_INT_FOR_INTEGER)
 	}
-	
+
 	def getLicenseText(GeneratorEntry it) {
 		if (licenseTextParameter != null) {
-			return "/**"+licenseTextParameter.stringValue+"*/"
+			return "/**" + licenseTextParameter.stringValue + "*/"
 		}
 		return null
 	}
-	
+
 	def getBasePackageName(GeneratorEntry it) {
 		if (basePackageParameter != null) {
 			return basePackageParameter.stringValue
 		}
 		return "org.yakindu.scr"
 	}
-	
+
 	def getImplementationSuffix(GeneratorEntry it, ExecutionFlow flow) {
 		if (implementationSuffixParameter != null) {
 			return flow.statemachineName + implementationSuffixParameter.stringValue
 		}
 		return flow.statemachineName
 	}
-	
+
 	def getImplementationPackageName(ExecutionFlow it, GeneratorEntry entry) {
 		entry.basePackageName + "." + entry.getImplementationSuffix(it).toLowerCase();
 	}
-	
+
 	def getBasePackagePath(GeneratorEntry it) {
 		return basePackageName.replace('.', '/')
 	}
-	
+
 	def getImplementationPackagePath(ExecutionFlow it, GeneratorEntry entry) {
 		getImplementationPackageName(entry).replace('.', '/')
-		//entry.basePackagePath+"/"+entry.getImplementationSuffix(it).toLowerCase
+
+	//entry.basePackagePath+"/"+entry.getImplementationSuffix(it).toLowerCase
 	}
-	
-	
+
 	def createTimerService(GeneratorEntry it) {
 		if (timerServiceParameter != null) {
 			return timerServiceParameter.booleanValue
 		}
 		return false
 	}
-	
+
 	def createRuntimeService(GeneratorEntry it) {
 		if (runtimeServiceParameter != null) {
 			return runtimeServiceParameter.booleanValue
 		}
 		return false
 	}
-	
+
 	def createInterfaceObserver(GeneratorEntry it) {
 		if (interfaceObserverSupportParameter != null) {
 			return interfaceObserverSupportParameter.booleanValue
 		}
 		return false
 	}
-	
+
 	def useJavaInt(GeneratorEntry it) {
 		if (useJavaIntForInteger != null) {
 			return useJavaIntForInteger.booleanValue
 		}
 		return false
 	}
-}
+}

+ 1 - 1
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/features/IJavaFeatureConstants.java

@@ -19,7 +19,7 @@ public interface IJavaFeatureConstants {
 
 	public static final String LIBRARY_NAME = "Java Generator";
 
-	public static final String JAVA_TARGET_FEATURE = "JavaTargetFeatures";
+	public static final String NAMING_FEATURE = "Naming";
 
 	public static final String BASE_PACKAGE = "basePackage";
 

+ 3 - 3
plugins/org.yakindu.sct.generator.java/src/org/yakindu/sct/generator/java/features/JavaFeatureConstants.java

@@ -1,5 +1,5 @@
 /**
- * Copyright (c) 2011 committers of YAKINDU and others.
+ * Copyright (c) 2014 committers of YAKINDU and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -18,8 +18,8 @@ import static org.yakindu.sct.generator.core.features.ICoreFeatureConstants.LICE
  */
 public final class JavaFeatureConstants implements IJavaFeatureConstants {
 	
-	public static final String getJavaTargetFeature() {
-		return JAVA_TARGET_FEATURE;
+	public static final String getNamingFeature() {
+		return NAMING_FEATURE;
 	}
 	
 	public static final String getBasePackage() {