[openrtm-commit:01191] r500 - in branches/work_ForRTMSafety/rtmtools: jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template jp.go.aist.rtm.rtcbuilder.java/META-INF
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 1月 27日 (月) 16:17:46 JST
Author: win-ei
Date: 2014-01-27 16:17:46 +0900 (Mon, 27 Jan 2014)
New Revision: 500
Modified:
branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder.java/META-INF/MANIFEST.MF
branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CommonGenerateManager.java
branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/GenerateManager.java
branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/TemplateUtil.java
Log:
Added TemplateUtil.java and GeneratedResult.java to jp/go/aist/rtm/toolscommon/uti. Made a change accompanying it.
Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CommonGenerateManager.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CommonGenerateManager.java 2014-01-27 07:17:07 UTC (rev 499)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CommonGenerateManager.java 2014-01-27 07:17:46 UTC (rev 500)
@@ -8,10 +8,12 @@
import java.util.List;
import java.util.Map;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
+//import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
+import jp.go.aist.rtm.toolscommon.util.GeneratedResult;
import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
import jp.go.aist.rtm.rtcbuilder.template.TemplateHelper;
-import jp.go.aist.rtm.rtcbuilder.template.TemplateUtil;
+//import jp.go.aist.rtm.rtcbuilder.template.TemplateUtil;
+import jp.go.aist.rtm.toolscommon.util.TemplateUtil;
/**
* 一般ファイルの出力を制御するマネージャ
Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/GenerateManager.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/GenerateManager.java 2014-01-27 07:17:07 UTC (rev 499)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/GenerateManager.java 2014-01-27 07:17:46 UTC (rev 500)
@@ -3,7 +3,8 @@
import java.util.List;
import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
-import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
+//import jp.go.aist.rtm.rtcbuilder.generator.GeneratedResult;
+import jp.go.aist.rtm.toolscommon.util.GeneratedResult;
import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
import jp.go.aist.rtm.rtcbuilder.generator.param.idl.IdlFileParam;
import jp.go.aist.rtm.rtcbuilder.generator.param.idl.ServiceClassParam;
Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/TemplateUtil.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/TemplateUtil.java 2014-01-27 07:17:07 UTC (rev 499)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/TemplateUtil.java 2014-01-27 07:17:46 UTC (rev 500)
@@ -1,5 +1,11 @@
package jp.go.aist.rtm.rtcbuilder.template;
+import org.apache.velocity.app.VelocityEngine;
+import org.apache.velocity.runtime.RuntimeConstants;
+//import org.apache.log4j.Category;
+//import org.apache.log4j.BasicConfigurator;
+
+
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -85,20 +91,31 @@
* @return
*/
public static VelocityEngine getEngine() {
+ System.out.println("getEngine entery");
VelocityEngine result = new VelocityEngine();
result.setProperty(VelocityEngine.RESOURCE_LOADER, "class");
result.setProperty(VelocityEngine.VM_LIBRARY, "");
result.setProperty("class.resource.loader.description",
"Velocity Classpath Resource Loader");
- result
- .setProperty("class.resource.loader.class",
+ result.setProperty("class.resource.loader.class",
"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
+ System.out.println("current dir :"+new java.io.File(".").getAbsolutePath());
+ System.out.println("user.dir :"+System.getProperty("user.dir"));
+ //result.setProperty( RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.SimpleLog4JLogSystem" );
+
+ //result.setProperty("runtime.log.logsystem.log4j.category", CATEGORY_NAME);
+
+
+ //result.setProperty(VelocityEngine.RUNTIME_LOG_LOGSYSTEM, new org.springframework.security.saml.util.SLF4JLogChute());
try {
+ System.out.println("getEngine result.init()");
result.init();
} catch (Exception e) {
+ System.out.println("getEngine Exception");
throw new RuntimeException(e); // system error
}
+ System.out.println("getEngine return");
return result;
}
@@ -146,10 +163,14 @@
for (Iterator iter = contextMap.entrySet().iterator(); iter.hasNext();) {
Map.Entry element = (Map.Entry) iter.next();
vc.put((String) element.getKey(), element.getValue());
+ System.out.println(" "+element.getKey()+":"+element.getValue());
}
StringWriter result = new StringWriter();
try {
+ System.out.println("generate 060 file.resource.loader.path:"+ve.getProperty("file.resource.loader.path"));
+ System.out.println("generate 061 FILE.resource.loader.path:"+ve.getProperty("FILE.resource.loader.path"));
+
ve.evaluate(vc, result, "", new InputStreamReader(in, "UTF-8"));
result.close();
} catch (Exception e) {
Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder.java/META-INF/MANIFEST.MF
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder.java/META-INF/MANIFEST.MF 2014-01-27 07:17:07 UTC (rev 499)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.rtcbuilder.java/META-INF/MANIFEST.MF 2014-01-27 07:17:46 UTC (rev 500)
@@ -19,4 +19,5 @@
Eclipse-RegisterBuddy: jp.go.aist.rtm.rtcbuilder
Built-By: n-ando
Built-Date: 2013/01/25 00:47:16
+Import-Package: jp.go.aist.rtm.toolscommon.util
More information about the openrtm-commit
mailing list