[openrtm-commit:01163] r473 - in branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor: template ui/editor
openrtm @ openrtm.org
openrtm @ openrtm.org
2014年 1月 19日 (日) 17:53:57 JST
Author: win-ei
Date: 2014-01-19 17:53:57 +0900 (Sun, 19 Jan 2014)
New Revision: 473
Modified:
branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/DataPortConctTbl.c.vsl
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/template/DataPortConctTbl.c.vsl
===================================================================
--- branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/DataPortConctTbl.c.vsl 2014-01-18 12:38:39 UTC (rev 472)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/template/DataPortConctTbl.c.vsl 2014-01-19 08:53:57 UTC (rev 473)
@@ -1,14 +1,11 @@
// -*- C -*-
/*!
- * @file ${rtcParam.name}Comp.c
+ * @file DataPortConctTbl.c
* @brief Standalone component
#set( $Date$ = "dummy" )
* @date \$Date$
*
- * @author ${tmpltHelper.convertAuthorDoc(${rtcParam.docCreator})}
*
- * ${tmpltHelper.convertDoc(${rtcParam.docLicense})}
- *
#set( $Id$ = "dummy" )
* \$Id$
*/
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-18 12:38:39 UTC (rev 472)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java 2014-01-19 08:53:57 UTC (rev 473)
@@ -1,5 +1,11 @@
package jp.go.aist.rtm.systemeditor.ui.editor;
+//<+zxc
+import java.io.File;
+import java.io.FileWriter;
+import java.io.BufferedWriter;
+import java.io.PrintWriter;
+//zxc+>
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.io.FileNotFoundException;
@@ -685,13 +691,6 @@
System.out.println("save 440");
contextMap.put("template", TEMPLATE_PATH);
System.out.println("save 450");
-
- //jp.go.aist.rtm.systemeditor.ui.editor.TemplateUtil2 temp = new jp.go.aist.rtm.systemeditor.ui.editor.TemplateUtil2();
- //jp.go.aist.rtm.systemeditor.template.TemplateUtil.createGeneratedResultDM2();
- System.out.println("save 455");
- //TemplateUtil3.testStaticMethod1();
- System.out.println("save 456");
- //TemplateUtil2.createGeneratedResultDM2();
GeneratedResult gr = TemplateUtil.createGeneratedResult(ins, contextMap, outfile);
System.out.println("save 460");
System.out.println("Creates file.");
@@ -699,8 +698,49 @@
System.out.println("Closes file. 1");
ins.close();
System.out.println("Closes file. 2");
- }
+ }
+ System.out.println("save 470 resource.getURI().devicePath()="+resource.getURI().devicePath());
+ System.out.println("save 471 resource.getURI().device()="+resource.getURI().device());
+ System.out.println("save 472 resource.getURI().path()="+resource.getURI().path());
+ System.out.println("save 473 resource.getURI().fileExtension()="+resource.getURI().fileExtension());
+ System.out.println("save 474 file.getLocation().lastSegment()="+file.getLocation().lastSegment());
+ System.out.println("save 475 file.getLocation().toOSString())="+file.getLocation().toOSString());
+ String tablepath = file.getLocation().toOSString();
+ int lastDotPos = tablepath.lastIndexOf('\\');
+ System.out.println("save 475 tablepath.lastIndexOf('.')="+lastDotPos);
+ if (lastDotPos == -1)
+ {
+ ;
+ }
+ else if (lastDotPos == 0)
+ {
+ ;
+ }
+ else
+ {
+ tablepath = tablepath.substring(0, lastDotPos);
+ }
+ System.out.println("save 476 tablepath="+tablepath);
+ String dataPortContct = tablepath+"\\DataPortConctTbl.c";
+ System.out.println("save 476 tablepath="+dataPortContct);
+ //File targetFile = new File("DataPortConctTbl.c");
+ File targetFile = new File(dataPortContct);
+ System.out.println("save 480");
+ FileWriter filewriter = new FileWriter(targetFile);
+ System.out.println("save 490");
+ BufferedWriter bw = new BufferedWriter(filewriter);
+ System.out.println("save 495");
+ PrintWriter pw = new PrintWriter(bw);
+ System.out.println("save 500");
+ pw.println(gr.getCode());
+ System.out.println("save 600");
+ pw.close();
+ System.out.println("save 700");
+ System.out.println(gr.getCode());
+ System.out.println("save 800");
+
}
+
}
//zxc+>
progressMonitor.worked(6);
More information about the openrtm-commit
mailing list