[openrtm-commit:01157] r467 - 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月 18日 (土) 18:07:58 JST


Author: win-ei
Date: 2014-01-18 18:07:58 +0900 (Sat, 18 Jan 2014)
New Revision: 467

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-18 09:07:24 UTC (rev 466)
+++ branches/work_ForRTMSafety/rtmtools/jp.go.aist.rtm.systemeditor/src/jp/go/aist/rtm/systemeditor/ui/editor/AbstractSystemDiagramEditor.java	2014-01-18 09:07:58 UTC (rev 467)
@@ -1,14 +1,10 @@
 package jp.go.aist.rtm.systemeditor.ui.editor;
 
-//<+zxc
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-//zxc+>
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
 import java.io.FileNotFoundException;
 import java.io.IOException;
+import java.io.InputStream;
 import java.lang.reflect.InvocationTargetException;
 import java.net.URLDecoder;
 import java.text.SimpleDateFormat;
@@ -17,8 +13,10 @@
 import java.util.Date;
 import java.util.EventObject;
 import java.util.GregorianCalendar;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 import javax.xml.datatype.DatatypeConstants;
 import javax.xml.datatype.XMLGregorianCalendar;
@@ -27,6 +25,7 @@
 import jp.go.aist.rtm.systemeditor.extension.SaveProfileExtension;
 import jp.go.aist.rtm.systemeditor.factory.ProfileSaver;
 import jp.go.aist.rtm.systemeditor.nl.Messages;
+import jp.go.aist.rtm.systemeditor.template.TemplateUtil;
 import jp.go.aist.rtm.systemeditor.ui.action.OpenCompositeComponentAction;
 import jp.go.aist.rtm.systemeditor.ui.dialog.ProfileInformationDialog;
 import jp.go.aist.rtm.systemeditor.ui.editor.action.ChangeComponentDirectionAction;
@@ -105,6 +104,8 @@
 
 import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;
 
+import jp.go.aist.rtm.systemeditor.generator.GeneratedResult;
+
 public abstract class AbstractSystemDiagramEditor extends GraphicalEditor {
 
 	static final String DIALOG_TITLE_CONFIRM = Messages
@@ -518,7 +519,7 @@
 	protected void save(IFile file, IProgressMonitor progressMonitor)
 			throws CoreException {
 		
-		System.out.println("save() entry");
+		System.out.println("AbstractSystemDiagramEditor.save() entry");
 		List<AbstractSystemDiagramEditor> editors = new ArrayList<AbstractSystemDiagramEditor>();
 		editors.add(this);
 		
@@ -668,23 +669,37 @@
 				if(languageKind.equals("RTMSafety"))
 				{
 					System.out.println("Creates table files  for RTMSafety");
-					
 					final String TEMPLATE_PATH = "jp/go/aist/rtm/systemeditor/template";
 					String template = TEMPLATE_PATH + "/" +"DataPortContTbl.c.vsl";
 					ClassLoader cl = Thread.currentThread().getContextClassLoader();
 					System.out.println("Loads class for RTMSafety");
+					System.out.print("template:");
+					System.out.println(template);
 					InputStream ins = cl.getResourceAsStream(template);
 					System.out.println("Opens file.");
-					String outfile = "src/" + "testtabel.c";
+					String outfile = "src/" + "testtable.c";
+					System.out.print("outfile:");
+					System.out.println(outfile);
+					System.out.println("save 430");
 					Map<String, Object> contextMap = new HashMap<String, Object>();
-					//GeneratedResult gr = TemplateUtil.createGeneratedResult(ins, contextMap, outfile);
+					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.");
 					if (ins != null) {
 						System.out.println("Closes file. 1");
 						ins.close();
 						System.out.println("Closes file. 2");
 					}		
-					
 				}
 			}
 			//zxc+>
@@ -703,7 +718,7 @@
 					.getClass().getName(), 0, Messages.getString("AbstractSystemDiagramEditor.28"), e); //$NON-NLS-1$
 			throw new CoreException(status);
 		}
-		System.out.println("save() return");
+		System.out.println("AbstractSystemDiagramEditor.save() return");
 	}
 
 	private Component getLocalObject(SystemDiagram systemDiagram,



More information about the openrtm-commit mailing list