[openrtm-commit:01205] r514 - branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 1月 30日 (木) 14:22:29 JST


Author: win-ei
Date: 2014-01-30 14:22:29 +0900 (Thu, 30 Jan 2014)
New Revision: 514

Modified:
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/TemplateUtil.java
Log:
Deleted processings for debugging.

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/TemplateUtil.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/TemplateUtil.java	2014-01-30 03:15:43 UTC (rev 513)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/util/TemplateUtil.java	2014-01-30 05:22:29 UTC (rev 514)
@@ -65,7 +65,6 @@
 	 */
 	public static GeneratedResult createGeneratedResult(InputStream in,
 			String contextRootName, Object contextRoot, String fileName) {
-		System.out.println("createGeneratedResult1 entery");
 		Map<String, Object> map = new HashMap<String, Object>();
 		map.put(contextRootName, contextRoot);
 
@@ -84,7 +83,6 @@
 	@SuppressWarnings("unchecked")
 	public static GeneratedResult createGeneratedResult(InputStream in,
 			Map contextMap, String fileName) {
-		System.out.println("createGeneratedResult entery");
 		return new GeneratedResult(fileName, generate(in, contextMap));
 	}
 
@@ -94,7 +92,6 @@
 	 * @return
 	 */
 	public static VelocityEngine getEngine() {
-		System.out.println("getEngine entery");
 		VelocityEngine result = new VelocityEngine();
 		//result.setProperty(VelocityEngine.RESOURCE_LOADER, "class");
 		result.setProperty(VelocityEngine.RESOURCE_LOADER, "class, jar");
@@ -103,17 +100,8 @@
 				"Velocity Classpath Resource Loader");
 		result.setProperty("class.resource.loader.class",
 						"org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader");
-		//result.setProperty(" FILE.resource.loader.class","org.apache.velocity.runtime.resource.loader.FileResourceLoader");
-		//result.setProperty("file.resource.loader.path","jp.go.aist.rtm.rtcbuilder.safety/");
-		//result.setProperty("file.resource.loader.path",".");
-		//result.setProperty("file.resource.loader.path","/jp.go.aist.rtm.rtcbuilder.safety/bin/");
-		//result.setProperty("file.resource.loader.path","\\");
-		//result.setProperty("file.resource.loader.path",".,\\,/,C:/Users/katami/Downloads/000softs/eclipse-SDK-3.4.2-win32_test/eclipse/plugins,C:/Users/katami/Downloads/000softs/eclipse-SDK-3.4.2-win32_test/eclipse/plugins/jp.go.aist.rtm.rtcbuilder.safety,C:\\Users\\katami\\Downloads\\000softs\\eclipse-SDK-3.4.2-win32_test\\eclipse\\plugins,C:\\Users\\katami\\Downloads\\000softs\\eclipse-SDK-3.4.2-win32_test\\eclipse\\plugins\\jp.go.aist.rtm.rtcbuilder.safety");
-		//result.setProperty("FILE.resource.loader.path",".");
 		result.setProperty("jar.resource.loader.class",
 			"org.apache.velocity.runtime.resource.loader.JarResourceLoader");
-		//result.setProperty("jar.resource.loader.path", "jar:file:C:/Users/katami/Downloads/000softs/eclipse-SDK-3.4.2-win32_test/eclipse/plugins/jp.go.aist.rtm.rtcbuilder.safety_1.1.0.rc4v20130124.jar,jar:file:C:/Users/katami/Downloads/000softs/eclipse-SDK-3.4.2-win32_test/eclipse/plugins/jp.go.aist.rtm.rtcbuilder_1.1.0.rc4v20130124.jar");
-		System.out.println("classpath : " + System.getProperty("java.class.path"));
 		// Add the processing which specifies all the file names here. 
 		String jarpath = new String();
 		File dir = new File(System.getProperty("user.dir").replace("\\", "/")+"/plugins/");
@@ -138,7 +126,6 @@
 
 			}
 		}
-		System.out.println("jarpath :"+jarpath);
 		/*
 		String jarpath = 
 			"jar:file:"+
@@ -152,23 +139,14 @@
 			"jp.go.aist.rtm.rtcbuilder_1.1.0.rc4v20130124.jar";
 		*/
 		result.setProperty("jar.resource.loader.path", jarpath);
-		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;
 	}
 
@@ -210,36 +188,23 @@
 	 */
 	@SuppressWarnings("unchecked")
 	public static String generate(InputStream in, Map contextMap) {
-		System.out.println("generate entry in:"+in);
 		VelocityEngine ve = TemplateUtil.getEngine();
-		System.out.println("generate 010");
 		ve.setProperty(VelocityEngine.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.NullLogSystem");
-		System.out.println("generate 020");
 		VelocityContext vc = TemplateUtil.getDefaultVelocityContext();
-		System.out.println("generate 030");
 		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());
 		}
-		System.out.println("generate 040");
 
 		StringWriter result = new StringWriter();
-		System.out.println("generate 050");
 		try {
 			String classpath = Thread.currentThread().getContextClassLoader().getResource("").getPath();
-			System.out.println("classpath : " + classpath);
-			System.out.println("classpath : " + System.getProperty("java.class.path"));
-			System.out.println("generate 060 file.resource.loader.path:"+ve.getProperty("file.resource.loader.path"));
-			System.out.println("generate 061 jar.resource.loader.path:"+ve.getProperty("jar.resource.loader.path"));
 			ve.evaluate(vc, result, "", new InputStreamReader(in, "UTF-8"));
-			System.out.println("generate 070");
 			result.close();
 		} catch (Exception e) {
 			throw new RuntimeException(e); // system error
 		}
 
-		System.out.println("generate 080");
 		return result.toString().replace("\r\n", System.getProperty( "line.separator" ));
 	}
 



More information about the openrtm-commit mailing list