[openrtm-commit:01175] r485 - branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor

openrtm @ openrtm.org openrtm @ openrtm.org
2014年 1月 22日 (水) 10:21:43 JST


Author: win-ei
Date: 2014-01-22 10:21:43 +0900 (Wed, 22 Jan 2014)
New Revision: 485

Modified:
   branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java
Log:
Daily work.

Modified: branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java	2014-01-22 01:21:11 UTC (rev 484)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java	2014-01-22 01:21:43 UTC (rev 485)
@@ -814,6 +814,34 @@
 					//System.out.println(gr.getCode());
 					}
 					//
+					//RtcEcCreateTbl.c
+					//
+					{
+					String template = TEMPLATE_PATH + "/" +"RtcEcCreateTbl.c.vsl";
+					ClassLoader cl = Thread.currentThread().getContextClassLoader();
+					InputStream ins = cl.getResourceAsStream(template);
+					String dataPortContct = tablepath+"\\RtcEcCreateTbl.c";
+					Map<String, Object> contextMap = new HashMap<String, Object>();
+					contextMap.put("template", TEMPLATE_PATH);
+					List<org.openrtp.namespaces.rts.version02.Component> componetns = profile.getComponents();
+					ArrayList complist = new ArrayList();
+					for(org.openrtp.namespaces.rts.version02.Component comp :componetns)
+					{
+						System.out.println(comp.getId());
+						String[] strary = comp.getId().split(":");
+						complist.add(strary[3]); 
+					}
+					contextMap.put("comps", complist);
+					GeneratedResult gr = TemplateUtil.createGeneratedResult(ins, contextMap, dataPortContct);
+					File targetFile = new File(dataPortContct);
+					FileWriter filewriter = new FileWriter(targetFile);
+					BufferedWriter bw = new BufferedWriter(filewriter);
+					PrintWriter pw = new PrintWriter(bw);
+					pw.println(gr.getCode());
+					pw.close();
+					System.out.println(gr.getCode());
+					}
+					//
 					//EcAwakingTbl.c
 					//
 					{



More information about the openrtm-commit mailing list