[openrtm-commit:01565] r536 - in trunk/rtmtools: jp.go.aist.rtm.nameserviceview/META-INF jp.go.aist.rtm.nameserviceview.nl1/META-INF jp.go.aist.rtm.repositoryView/META-INF jp.go.aist.rtm.repositoryView.nl1/META-INF jp.go.aist.rtm.rtcbuilder/META-INF jp.go.aist.rtm.rtcbuilder.java/META-INF jp.go.aist.rtm.rtcbuilder.java/src/jp/go/aist/rtm/rtcbuilder/java/manager jp.go.aist.rtm.rtcbuilder.java/src/jp/go/aist/rtm/rtcbuilder/java/template/java jp.go.aist.rtm.rtcbuilder.nl1/META-INF jp.go.aist.rtm.rtcbuilder.python/META-INF jp.go.aist.rtm.systemeditor/META-INF jp.go.aist.rtm.systemeditor.nl1/META-INF jp.go.aist.rtm.toolscommon/META-INF jp.go.aist.rtm.toolscommon.nl1/META-INF jp.go.aist.rtm.toolscommon.profiles/META-INF jp.go.aist.rtm.toolscommon.profiles.nl1/META-INF

openrtm @ openrtm.org openrtm @ openrtm.org
2015年 6月 19日 (金) 07:45:31 JST


Author: hara
Date: 2015-06-19 07:45:31 +0900 (Fri, 19 Jun 2015)
New Revision: 536

Modified:
   trunk/rtmtools/jp.go.aist.rtm.nameserviceview.nl1/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.nameserviceview/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.repositoryView.nl1/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.repositoryView/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/src/jp/go/aist/rtm/rtcbuilder/java/manager/JavaConverter.java
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/src/jp/go/aist/rtm/rtcbuilder/java/template/java/Java_SVC.java.vsl
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.nl1/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.systemeditor/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.toolscommon.nl1/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.toolscommon.profiles.nl1/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.toolscommon.profiles/META-INF/MANIFEST.MF
   trunk/rtmtools/jp.go.aist.rtm.toolscommon/META-INF/MANIFEST.MF
Log:
Fix the 'return' statement for SVC_impl.java, Modify JavaConverter and Java_SVC.java.vsl.

Modified: trunk/rtmtools/jp.go.aist.rtm.nameserviceview/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.nameserviceview/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.nameserviceview/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -24,6 +24,6 @@
 Bundle-ActivationPolicy: lazy
 Bundle-Activator: jp.go.aist.rtm.nameserviceview.NameServiceViewPlugin
 Eclipse-BuddyPolicy: registered
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:34:01
+Built-By: ngd
+Built-Date: 2015/06/18 19:59:18
 

Modified: trunk/rtmtools/jp.go.aist.rtm.nameserviceview.nl1/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.nameserviceview.nl1/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.nameserviceview.nl1/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -6,6 +6,6 @@
 Bundle-SymbolicName: jp.go.aist.rtm.nameserviceview.nl1
 Bundle-Version: 1.1.0.rc4v20130124
 Fragment-Host: jp.go.aist.rtm.nameserviceview;bundle-version="1.1.0"
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:34:34
+Built-By: ngd
+Built-Date: 2015/06/18 20:00:09
 

Modified: trunk/rtmtools/jp.go.aist.rtm.repositoryView/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.repositoryView/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.repositoryView/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -17,6 +17,6 @@
 Bundle-ClassPath: lib/rtrepository_local-1.0.jar,.
 Bundle-Vendor: %providerName
 Eclipse-BuddyPolicy: registered
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:33:28
+Built-By: ngd
+Built-Date: 2015/06/18 19:58:13
 

Modified: trunk/rtmtools/jp.go.aist.rtm.repositoryView.nl1/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.repositoryView.nl1/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.repositoryView.nl1/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -7,6 +7,6 @@
 Bundle-Version: 1.1.0.rc4v20130124
 Fragment-Host: jp.go.aist.rtm.repositoryView;bundle-version="1.1.0"
 Bundle-Vendor: AIST
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:33:56
+Built-By: ngd
+Built-Date: 2015/06/18 19:59:11
 

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -29,6 +29,6 @@
 Bundle-ActivationPolicy: lazy
 Bundle-Activator: jp.go.aist.rtm.rtcbuilder.RtcBuilderPlugin
 Eclipse-BuddyPolicy: registered
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:31:26
+Built-By: ngd
+Built-Date: 2015/06/18 19:54:59
 

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -17,6 +17,6 @@
  template.java_04,jp.go.aist.rtm.rtcbuilder.java.ui.Perspective
 Eclipse-BuddyPolicy: registered
 Eclipse-RegisterBuddy: jp.go.aist.rtm.rtcbuilder
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:49:36
+Built-By: isao-_000
+Built-Date: 2015/06/19 07:41:16
 

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/src/jp/go/aist/rtm/rtcbuilder/java/manager/JavaConverter.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/src/jp/go/aist/rtm/rtcbuilder/java/manager/JavaConverter.java	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/src/jp/go/aist/rtm/rtcbuilder/java/manager/JavaConverter.java	2015-06-18 22:45:31 UTC (rev 536)
@@ -185,7 +185,6 @@
 	 * @return Java型
 	 */
 	public String convCORBA2Java(ServiceMethodParam typeDef, ServiceClassParam scp) {
-		boolean isBasicType = false;
 		String strType = getTypeDefs(typeDef.getType(), scp);
 		if( strType==null ) {
 			strType = typeDef.getType();
@@ -210,23 +209,23 @@
 				result = result.replaceAll(scp.getName()+"::", "");
 
 				if(typeDef.isArray()){
-					result = result+"[]";
+					for(int i=0; i< typeDef.getArrayDim() ; i++){
+				       		result += "[]";
+					}
 				}
 			}
+			String mdl = typeDef.getModule();
+			if(mdl.length() > 0){ result = mdl + result; }
+			result=result.replaceAll("::", ".");
+
 		} else {
-			isBasicType = true;
 			result = strType.replaceAll(rawType, convType);
 			
 		}
 		
-		result=result.replaceAll("::", ".");
-		String mdl = typeDef.getModule();
-		if(!isBasicType && mdl.length() > 0){
-			result = mdl.replaceAll("::", ".") + result;
-		}
-
 		return result;
 	}
+
 	private String getTypeDefs(String target, ServiceClassParam scp) {
 		String result = null;
 		target = target.replaceAll(scp.getName()+"::", "");
@@ -269,17 +268,16 @@
 	 */
 	public String convCORBA2JavaforArg(ServiceArgumentParam typeDef, String strDirection, ServiceClassParam scp) {
 		String result = "";
-		boolean isBasicType = false;
 		String strType = getTypeDefs(typeDef.getType(), scp);
+		strType = strType.replaceAll("::", ".");
 
-
 		if( mapType.get(strType) != null){
-			isBasicType = true;
 			if( strDirection.equals(dirIn) ) {
 				result = mapType.get(strType);
 			} else {
 				result = mapTypeHolder.get(strType);
 			}
+			return result;
 
 		}else if( typeDef.getType().equals(strType) ) {
 			if( strDirection.equals(dirIn) ) {
@@ -289,15 +287,18 @@
 				result = mapTypeHolder.get(typeDef.getType());
 				if( result == null ) result = typeDef.getType() + "Holder";
 			}
+
 		}else if( typeDef.isArray() || typeDef.isSequence() ) {
+
 			if( !strDirection.equals(dirIn) ) {
 				result = typeDef.getType() + "Holder";
 			}else{
 				String rawType = strType.replaceAll("\\[\\]", "");
 				String convType = mapType.get(rawType);
+
 				if( convType != null ) {
-					isBasicType = true;
 					result = strType.replaceAll(rawType, convType);
+					return result;
 				}else{
 					result = strType;
 				}
@@ -310,31 +311,28 @@
 			}
 
 		} else {
-			strType.replaceAll("::", ".");
-			String rawType = strType.replaceAll("\\[\\]", "");
-			String convType = mapType.get(rawType);
-			if( convType == null ) {
-				if(typeDef.isStruct() || typeDef.isEnum()) {
-					result = typeDef.getType();
-				} else {
-					result = strType;
-				}
-				if( !strDirection.equals(dirIn) ) result = result + "Holder";
+
+			if( typeDef.isEnum()) {
+				result = typeDef.getType();
 			} else {
-				isBasicType = true;
-				result = strType.replaceAll(rawType, convType);
-				
+				result = strType;
 			}
-			if( typeDef.isUnbounded() || typeDef.isArray() ) {
-				if( !strDirection.equals(dirIn) ) {
+
+			if( !strDirection.equals(dirIn) ){
+				if( typeDef.isUnbounded() ) {
 					result = typeDef.getType() + "Holder";
+				}else{
+					result = result + "Holder";
 				}
 			}
+
 		}
-		result = result.replaceAll("::", "Package.");
-		String mdl = typeDef.getModule();
-		if(!isBasicType && mdl.length() > 0){
-			result = mdl.replaceAll("::", ".") + result;
+
+	 	if(typeDef.getModule().length() == 0){
+			result = result.replaceAll("::", "Package.");
+		}else{
+	  	result = typeDef.getModule() + result;
+			result = result.replaceAll("::", ".");
 		}
 
 		return result;
@@ -382,6 +380,41 @@
 		return false;
 	}
 	
+	public boolean isRetNumber(ServiceMethodParam srvMethod, ServiceClassParam scp) {
+		String sType = getTypeDefs(srvMethod.getType(), scp);
+		String strType=mapType.get(sType);
+
+		if( strType==null ) {
+			return false;
+		} else {
+		  if( strType.equals("boolean") || strType.equals("string") || strType.equals("String") || strType.equals("org.omg.CORBA.Any") || strType.equals("void") ) {
+			return false;
+			}
+		}
+		return true;
+	}
+
+	public boolean isRetBoolean(ServiceMethodParam srvMethod, ServiceClassParam scp) {
+		if( srvMethod.isArray() || srvMethod.isSequence() ) {
+			return false;
+		}
+		String sType = getTypeDefs(srvMethod.getType(), scp);
+		String strType=mapType.get(sType);
+
+		if( strType != null && strType.equals("boolean") ){
+			return true;
+		}
+		if( srvMethod.isAlias() ) {
+			sType = getTypeDefs(srvMethod.getOriginalType(), scp);
+			strType=mapType.get(sType);
+			if( strType != null && strType.equals("boolean") ){
+				return true;
+			}
+		}
+		return false;
+	}
+	
+	
 	/**
 	 * データポート用のデータ型import文を返す
 	 * 

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/src/jp/go/aist/rtm/rtcbuilder/java/template/java/Java_SVC.java.vsl
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/src/jp/go/aist/rtm/rtcbuilder/java/template/java/Java_SVC.java.vsl	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.java/src/jp/go/aist/rtm/rtcbuilder/java/template/java/Java_SVC.java.vsl	2015-06-18 22:45:31 UTC (rev 536)
@@ -31,9 +31,9 @@
     public ${javaConv.convCORBA2Java(${serviceMethodParam},${serviceClassParam})} ${serviceMethodParam.name}(#foreach($serviceArgumentParam in ${serviceMethodParam.arguments})#if($velocityCount > 1), #end${javaConv.convCORBA2JavaforArg(${serviceArgumentParam},${serviceArgumentParam.direction},${serviceClassParam})} ${serviceArgumentParam.name}#end) {
         // Please insert your code here and remove the following warning pragma
         // TODO "Code missing in function <${javaConv.convCORBA2JavaNoDef(${serviceMethodParam.type})} ${serviceMethodParam.name}(#foreach($serviceArgumentParam in ${serviceMethodParam.arguments})#if($velocityCount > 1), #end${javaConv.convCORBA2JavaforArg(${serviceArgumentParam.type},${serviceArgumentParam.direction})} ${serviceArgumentParam.name}#end)>"
-#if(!${serviceMethodParam.isVoid})#if(${javaConv.isRetNull(${serviceMethodParam},${serviceClassParam})})        return null;
-#elseif(${serviceMethodParam.isBoolean})        return false;
-#else        return 0;
+#if(!${serviceMethodParam.isVoid})#if(${javaConv.isRetNumber(${serviceMethodParam},${serviceClassParam})})        return 0;
+#elseif(${javaConv.isRetBoolean(${serviceMethodParam},${serviceClassParam})})        return false;
+#else        return null;
 #end
 #end
     }

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.nl1/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.nl1/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.nl1/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -8,6 +8,6 @@
 Fragment-Host: jp.go.aist.rtm.rtcbuilder;bundle-version="1.1.0"
 Bundle-Localization: plugin
 Bundle-Vendor: AIST
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:32:27
+Built-By: ngd
+Built-Date: 2015/06/18 19:56:58
 

Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder.python/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -17,6 +17,6 @@
  p.go.aist.rtm.rtcbuilder.python.template.python,jp.go.aist.rtm.rtcbui
  lder.python.template.python_04
 Eclipse-BuddyPolicy: registered
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:32:57
+Built-By: ngd
+Built-Date: 2015/06/18 19:57:37
 

Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -28,6 +28,6 @@
  r.ui.workbenchadapter,jp.go.aist.rtm.systemeditor.extension
 Bundle-Vendor: %providerName
 Eclipse-BuddyPolicy: registered
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:34:38
+Built-By: ngd
+Built-Date: 2015/06/18 20:00:16
 

Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor.nl1/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -7,6 +7,6 @@
 Bundle-Version: 1.1.0.rc4v20130124
 Fragment-Host: jp.go.aist.rtm.systemeditor;bundle-version="1.1.0"
 Bundle-Vendor: AIST
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:35:46
+Built-By: ngd
+Built-Date: 2015/06/18 20:01:58
 

Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -36,6 +36,6 @@
 Bundle-ActivationPolicy: lazy
 Eclipse-BuddyPolicy: registered
 Bundle-Activator: jp.go.aist.rtm.toolscommon.ToolsCommonPlugin
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:18:55
+Built-By: ngd
+Built-Date: 2015/06/18 19:34:33
 

Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon.nl1/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon.nl1/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon.nl1/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -6,6 +6,6 @@
 Bundle-SymbolicName: jp.go.aist.rtm.toolscommon.nl1
 Bundle-Version: 1.1.0.rc4v20130124
 Fragment-Host: jp.go.aist.rtm.toolscommon;bundle-version="1.1.0"
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:31:22
+Built-By: ngd
+Built-Date: 2015/06/18 19:54:52
 

Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon.profiles/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon.profiles/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon.profiles/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -36,6 +36,6 @@
  s.rts.version02;uses:="javax.xml.bind,javax.xml.datatype"
 Bundle-ActivationPolicy: lazy
 Eclipse-BuddyPolicy: registered
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:18:03
+Built-By: ngd
+Built-Date: 2015/06/18 19:33:23
 

Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon.profiles.nl1/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon.profiles.nl1/META-INF/MANIFEST.MF	2015-06-17 03:16:20 UTC (rev 535)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon.profiles.nl1/META-INF/MANIFEST.MF	2015-06-18 22:45:31 UTC (rev 536)
@@ -7,6 +7,6 @@
 Bundle-Version: 1.1.0.rc4v20130124
 Fragment-Host: jp.go.aist.rtm.toolscommon.profiles;bundle-version="1.1
  .0"
-Built-By: isao-hara
-Built-Date: 2015/06/17 08:18:50
+Built-By: ngd
+Built-Date: 2015/06/18 19:34:27
 



More information about the openrtm-commit mailing list