[openrtm-commit:00531] r230 - in trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder: generator/param ui/wizard
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 12月 31日 (土) 01:42:21 JST
Author: sakamoto
Date: 2011-12-31 01:42:21 +0900 (Sat, 31 Dec 2011)
New Revision: 230
Modified:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java
Log:
Modified DateTime format #1452
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java 2011-12-30 16:41:15 UTC (rev 229)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java 2011-12-30 16:42:21 UTC (rev 230)
@@ -5,7 +5,9 @@
import java.util.Iterator;
import java.util.List;
+import javax.xml.datatype.DatatypeConstants;
import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
@@ -313,7 +315,7 @@
private void convertFromModuleBasic(RtcProfile profile, RtcParam rtcParam) {
BasicInfoExt basic = (BasicInfoExt)profile.getBasicInfo();
- //î{
+ //鐃緒申{
rtcParam.setName(basic.getName());
rtcParam.setComponentType(basic.getComponentType());
rtcParam.setActivityType(basic.getActivityType());
@@ -330,8 +332,13 @@
rtcParam.setExecutionRate(basic.getExecutionRate().doubleValue());
rtcParam.setAbstract(basic.getAbstract());
rtcParam.setRtcType(basic.getRtcType());
- rtcParam.setCreationDate(basic.getCreationDate().toString());
- rtcParam.setUpdateDate(basic.getUpdateDate().toString());
+ XMLGregorianCalendar crDate = basic.getCreationDate();
+ crDate.setMillisecond(DatatypeConstants.FIELD_UNDEFINED);
+ rtcParam.setCreationDate(crDate.toString());
+ XMLGregorianCalendar updateDate = basic.getUpdateDate();
+ updateDate.setMillisecond(DatatypeConstants.FIELD_UNDEFINED);
+ rtcParam.setUpdateDate(updateDate.toString());
+
rtcParam.getVersionUpLog().clear();
rtcParam.getVersionUpLog().addAll(basic.getVersionUpLogs());
// rtcParam.setVersionUpLog(basic.getVersionUpLogs());
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java 2011-12-30 16:41:15 UTC (rev 229)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java 2011-12-30 16:42:21 UTC (rev 230)
@@ -3,7 +3,8 @@
import java.io.ByteArrayInputStream;
import java.util.GregorianCalendar;
-import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.DatatypeConstants;
+import javax.xml.datatype.XMLGregorianCalendar;
import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
import jp.go.aist.rtm.rtcbuilder.generator.ProfileHandler;
@@ -28,7 +29,7 @@
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard;
-import com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl;
+import com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl;
public class NewWizard extends Wizard implements INewWizard, IExecutableExtension {
@@ -57,8 +58,9 @@
}
projectHandle.open(null);
//
- DatatypeFactory dateFactory = new DatatypeFactoryImpl();
- String dateTime = dateFactory.newXMLGregorianCalendar(new GregorianCalendar()).toString();
+ XMLGregorianCalendar calendar = new XMLGregorianCalendarImpl(new GregorianCalendar());
+ calendar.setMillisecond(DatatypeConstants.FIELD_UNDEFINED);
+ String dateTime = calendar.toString();
ProfileHandler handler = new ProfileHandler();
String xmlFile = handler.createInitialRtcXml(dateTime);
//
@@ -87,7 +89,6 @@
IConfigurationElement cfig, String propertyName, Object data) {
configElement = cfig;
}
-
public void init(IWorkbench workbench, IStructuredSelection selection) {
}
@@ -96,5 +97,4 @@
newProjectPage = new WizardNewProjectCreationPage("ProjectCreation");
addPage(newProjectPage);
}
-
}
openrtm-commit メーリングリストの案内