[openrtm-commit:02438] r678 - in trunk/rtmtools/jp.go.aist.rtm.rtcbuilder: . META-INF src/jp/go/aist/rtm/rtcbuilder/generator/param src/jp/go/aist/rtm/rtcbuilder/ui src/jp/go/aist/rtm/rtcbuilder/ui/editors src/jp/go/aist/rtm/rtcbuilder/ui/preference src/jp/go/aist/rtm/rtcbuilder/ui/wizard
openrtm @ openrtm.org
openrtm @ openrtm.org
2017年 2月 14日 (火) 14:06:28 JST
Author: ga
Date: 2017-02-14 14:06:28 +0900 (Tue, 14 Feb 2017)
New Revision: 678
Removed:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/build.xml
Modified:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF
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/StringUtil.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DocumentEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ServicePortEditorFormPage.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DocumentPreferenceManager.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java
Log:
Modified Preference #3899
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/META-INF/MANIFEST.MF 2017-02-14 05:06:28 UTC (rev 678)
@@ -4,7 +4,7 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: jp.go.aist.rtm.rtcbuilder; singleton:=true
-Bundle-Version: 1.1.0.rc4v20130124
+Bundle-Version: 1.2.0.v20170213
Bundle-ClassPath: .,
lib/velocity-1.6.3-dep.jar
Bundle-Vendor: %providerName
Deleted: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/build.xml
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/build.xml 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/build.xml 2017-02-14 05:06:28 UTC (rev 678)
@@ -1,127 +0,0 @@
-<project name="jp.go.aist.rtm.rtcbuilder" default="jar"
- xmlns:ant4eclipse="antlib:org.ant4eclipse"
- xmlns:antcontrib="antlib:net.sf.antcontrib" >
-
- <property name="target.name" value="jp.go.aist.rtm.rtcbuilder" />
-
- <taskdef name="manifesttask" classname="aist.ManifestTask" />
-
- <property name="source" value="src"/>
-
- <property name="dist.dir" value="jar" />
- <property name="build.dir" value="bin"/>
- <property name="icons.dir" value="icons"/>
- <property name="lib.dir" value="lib"/>
-
- <property environment="env"/>
- <property name="eclipse.home" value="${env.ECLIPSE_HOME}"/>
-<!--
- <taskdef resource="net/sf/ant4eclipse/antlib.xml" />
--->
- <taskdef uri="antlib:net.sf.antcontrib"
- resource="net/sf/antcontrib/antlib.xml" />
- <taskdef uri="antlib:org.ant4eclipse"
- resource="org/ant4eclipse/antlib.xml" />
-
-
- <property name="targetPlatformLocation" value="${eclipse.home}" />
- <property name="workspace" value="${basedir}/.." />
- <property name="project.name" value="jp.go.aist.rtm.rtcbuilder" />
- <tstamp>
- <format property="built.date" pattern="yyyy/MM/dd HH:mm:ss" />
- </tstamp>
-
- <target name="buildAll">
- <antcall target="clean" />
- <antcall target="compile" />
- <antcall target="jar" />
- </target>
-
- <target name="clean" description="ビルドで生成されたファイルを削除します">
- <delete includeEmptyDirs="true" quiet="true">
- <fileset dir="${build.dir}" includes="**/*.class" />
- <fileset dir="." includes="**/*.log" />
- </delete>
- <delete dir="${build.dir}/jp" quiet="true"/>
- <delete dir="${dist.dir}" quiet="true"/>
- </target>
-
- <target name="compile" description="ソースをコンパイルします">
-<!--
- <getEclipseClasspath
- workspace="${workspace}"
- projectname="${project.name}"
- pathid="build.classpath"
- targetplatformlocation="${targetPlatformLocation}"
- />
--->
- <ant4eclipse:targetPlatform id="eclipse-3.8">
- <location dir="${targetPlatformLocation}" />
- </ant4eclipse:targetPlatform>
- <ant4eclipse:jdtClassPathLibrary name="org.eclipse.jdt.junit.JUNIT_CONTAINER/4">
- <fileset dir="${eclipse.home}/plugins/org.junit_4.10.0.v4_10_0_v20120426-0900" />
- </ant4eclipse:jdtClassPathLibrary>
-
- <ant4eclipse:getJdtClassPath
- pathid="build.classpath"
- workspacedirectory="${workspace}"
- projectname="${project.name}" >
- <jdtclasspathcontainerargument key="target.platform" value="eclipse-3.8" />
- </ant4eclipse:getJdtClassPath>
-
- <javac srcdir="${source}" destdir="${build.dir}"
- classpathref="build.classpath" encoding="UTF-8" debug="on" />
- </target>
-
- <target name="jar" description="jarファイルを作成します">
- <copy file="${source}/jp/go/aist/rtm/rtcbuilder/nl/messages.properties" todir="${build.dir}/jp/go/aist/rtm/rtcbuilder/nl" />
- <copy todir="${build.dir}/jp/go/aist/rtm/rtcbuilder">
- <fileset dir="${source}/jp/go/aist/rtm/rtcbuilder">
- <include name="*Help.txt" />
- </fileset>
- </copy>
- <copy todir="${build.dir}/jp/go/aist/rtm/rtcbuilder/model">
- <fileset dir="${source}/jp/go/aist/rtm/rtcbuilder/model">
- <include name="component.ecore" />
- <include name="RTC.genmodel" />
- </fileset>
- </copy>
- <copy todir="${build.dir}/jp/go/aist/rtm/rtcbuilder/template">
- <fileset dir="${source}/jp/go/aist/rtm/rtcbuilder/template">
- <include name="cmake/**/**.vsl" />
- <include name="common/**.vsl" />
- <include name="cpp/**.vsl" />
- </fileset>
- </copy>
- <mkdir dir="${dist.dir}" />
- <delete>
- <fileset dir="${dist.dir}" includes="${target.name}_*.jar" />
- </delete>
- <!-- Version settings -->
- <manifesttask file="META-INF/MANIFEST.MF" key="Bundle-Version" property="manifest.project.version" />
- <condition property="project.version"
- value="${env.PROJECT_VERSION}"
- else="${manifest.project.version}">
- <isset property="env.PROJECT_VERSION" />
- </condition>
- <property name="jar.version" value="_${project.version}"/>
- <property name="jar.name" value="${target.name}${jar.version}"/>
- <!-- Updating MANIFEST.MF -->
- <manifest file="META-INF/MANIFEST.MF" mode="update">
- <attribute name="Bundle-Version" value="${project.version}"/>
- <attribute name="Built-By" value="${user.name}"/>
- <attribute name="Built-Date" value="${built.date}"/>
- </manifest>
- <!-- Creating a jar file -->
- <jar destfile="${dist.dir}/${jar.name}.jar" manifest="META-INF/MANIFEST.MF">
- <fileset dir="${build.dir}" />
- <fileset dir=".">
- <include name="icons/**.**" />
- <include name="lib/**.**" />
- <include name="plugin.xml" />
- <include name="plugin.properties" />
- </fileset>
- </jar>
- </target>
-
-</project>
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 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java 2017-02-14 05:06:28 UTC (rev 678)
@@ -11,6 +11,7 @@
import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
+import jp.go.aist.rtm.rtcbuilder.ui.StringUtil;
import jp.go.aist.rtm.rtcbuilder.ui.preference.ComponentPreferenceManager;
import jp.go.aist.rtm.rtcbuilder.ui.preference.DocumentPreferenceManager;
import jp.go.aist.rtm.toolscommon.profiles.util.XmlHandler;
@@ -184,8 +185,8 @@
basic.setUpdateDate(dateFactory.newXMLGregorianCalendar(creationDate));
//
DocBasic docBasic = factory.createDocBasic();
- docBasic.setCreator(DocumentPreferenceManager.getCreatorValue());
- docBasic.setLicense(DocumentPreferenceManager.getLicenseValue());
+ docBasic.setCreator(StringUtil.getDocText(DocumentPreferenceManager.getCreatorValue()));
+ docBasic.setLicense(StringUtil.getDocText(DocumentPreferenceManager.getLicenseValue()));
basic.setDoc(docBasic);
return basic;
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/StringUtil.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/StringUtil.java 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/StringUtil.java 2017-02-14 05:06:28 UTC (rev 678)
@@ -163,4 +163,35 @@
// return result;
return connectMessageWithSepalator(ss);
}
+
+ public static String getDocText(String text) {
+ String result = text;
+ if ("".equals(result)) {
+ return "";
+ }
+ String sep = System.getProperty("line.separator");
+ String lines[] = result.split(sep);
+ StringBuffer buffer = new StringBuffer();
+ for( int index=0; index<lines.length; index++ ) {
+ buffer.append(lines[index]);
+ if(index<lines.length-1) buffer.append(IRtcBuilderConstants.NEWLINE_CODE);
+ }
+ return buffer.toString();
+ }
+
+ public static String getDisplayDocText(String text) {
+ String result = text;
+ if( text==null || "".equals(result) ) {
+ return "";
+ }
+ String sep = System.getProperty("line.separator");
+ String lines[] = result.split(IRtcBuilderConstants.NEWLINE_CODE);
+ StringBuffer buffer = new StringBuffer();
+ for( int index=0; index<lines.length; index++ ) {
+ buffer.append(lines[index]);
+ if(index<lines.length-1) buffer.append(sep);
+ }
+ return buffer.toString();
+ }
+
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java 2017-02-14 05:06:28 UTC (rev 678)
@@ -332,36 +332,6 @@
return result;
}
- protected String getDocText(String text) {
- String result = text;
- if ("".equals(result)) {
- return "";
- }
- String sep = System.getProperty("line.separator");
- String lines[] = result.split(sep);
- StringBuffer buffer = new StringBuffer();
- for( int index=0; index<lines.length; index++ ) {
- buffer.append(lines[index]);
- if(index<lines.length-1) buffer.append(IRtcBuilderConstants.NEWLINE_CODE);
- }
- return buffer.toString();
- }
-
- protected String getDisplayDocText(String text) {
- String result = text;
- if( text==null || "".equals(result) ) {
- return "";
- }
- String sep = System.getProperty("line.separator");
- String lines[] = result.split(IRtcBuilderConstants.NEWLINE_CODE);
- StringBuffer buffer = new StringBuffer();
- for( int index=0; index<lines.length; index++ ) {
- buffer.append(lines[index]);
- if(index<lines.length-1) buffer.append(sep);
- }
- return buffer.toString();
- }
-
protected Combo createEditableCombo(FormToolkit toolkit, Composite composite,
String labelString, String key, String[] defaultValue) {
return createEditableCombo(toolkit, composite, labelString, key, defaultValue, 0);
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java 2017-02-14 05:06:28 UTC (rev 678)
@@ -5,6 +5,7 @@
import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
+import jp.go.aist.rtm.rtcbuilder.ui.StringUtil;
import jp.go.aist.rtm.rtcbuilder.ui.preference.BuilderViewPreferenceManager;
import org.eclipse.swt.SWT;
@@ -160,9 +161,9 @@
RtcParam rtcParam = editor.getRtcParam();
if (preSelection >= 0) {
rtcParam.setActionImplemented(preSelection, onBtn.getSelection());
- rtcParam.setDocActionOverView(preSelection, getDocText(activityText.getText()));
- rtcParam.setDocActionPreCondition(preSelection, getDocText(preConditionText.getText()));
- rtcParam.setDocActionPostCondition(preSelection, getDocText(postConditionText.getText()));
+ rtcParam.setDocActionOverView(preSelection, StringUtil.getDocText(activityText.getText()));
+ rtcParam.setDocActionPreCondition(preSelection, StringUtil.getDocText(preConditionText.getText()));
+ rtcParam.setDocActionPostCondition(preSelection, StringUtil.getDocText(postConditionText.getText()));
}
int index = implChk.indexOf(e.getSource());
//onInitializeは常に有効
@@ -183,9 +184,9 @@
offBtn.setEnabled(true);
}
actionNameText.setText(IRtcBuilderConstants.ACTION_TYPE_ITEMS[index]);
- activityText.setText(getDisplayDocText(rtcParam.getDocActionOverView(index)));
- preConditionText.setText(getDisplayDocText(rtcParam.getDocActionPreCondition(index)));
- postConditionText.setText(getDisplayDocText(rtcParam.getDocActionPostCondition(index)));
+ activityText.setText(StringUtil.getDisplayDocText(rtcParam.getDocActionOverView(index)));
+ preConditionText.setText(StringUtil.getDisplayDocText(rtcParam.getDocActionPreCondition(index)));
+ postConditionText.setText(StringUtil.getDisplayDocText(rtcParam.getDocActionPostCondition(index)));
preSelection = index;
//
for(Label target : implChk) {
@@ -305,9 +306,9 @@
if (preSelection >= 0) {
rtcParam.setActionImplemented(preSelection, onBtn.getSelection());
- rtcParam.setDocActionOverView(preSelection, getDocText(activityText.getText()));
- rtcParam.setDocActionPreCondition(preSelection, getDocText(preConditionText.getText()));
- rtcParam.setDocActionPostCondition(preSelection, getDocText(postConditionText.getText()));
+ rtcParam.setDocActionOverView(preSelection, StringUtil.getDocText(activityText.getText()));
+ rtcParam.setDocActionPreCondition(preSelection, StringUtil.getDocText(preConditionText.getText()));
+ rtcParam.setDocActionPostCondition(preSelection, StringUtil.getDocText(postConditionText.getText()));
}
editor.updateDirty();
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java 2017-02-14 05:06:28 UTC (rev 678)
@@ -9,6 +9,7 @@
import jp.go.aist.rtm.rtcbuilder.generator.param.ConfigParameterParam;
import jp.go.aist.rtm.rtcbuilder.generator.param.ConfigSetParam;
import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
+import jp.go.aist.rtm.rtcbuilder.ui.StringUtil;
import jp.go.aist.rtm.rtcbuilder.ui.preference.ComponentPreferenceManager;
import jp.go.aist.rtm.rtcbuilder.ui.preference.ConfigPreferenceManager;
import jp.go.aist.rtm.rtcbuilder.util.ValidationUtil;
@@ -254,19 +255,19 @@
updateDefaultTypeList(selectParam.getType());
typeCombo.setText(selectParam.getType());
defaultValueText.setText(selectParam.getDefaultVal());
- variableNameText.setText(getDisplayDocText(selectParam.getVarName()));
- unitConfigText.setText(getDisplayDocText(selectParam.getUnit()));
- constraintConfigText.setText(getDisplayDocText(selectParam.getConstraint()));
- widgetCombo.setText(getDisplayDocText(selectParam.getWidget()));
- stepText.setText(getDisplayDocText(selectParam.getStep()));
+ variableNameText.setText(StringUtil.getDisplayDocText(selectParam.getVarName()));
+ unitConfigText.setText(StringUtil.getDisplayDocText(selectParam.getUnit()));
+ constraintConfigText.setText(StringUtil.getDisplayDocText(selectParam.getConstraint()));
+ widgetCombo.setText(StringUtil.getDisplayDocText(selectParam.getWidget()));
+ stepText.setText(StringUtil.getDisplayDocText(selectParam.getStep()));
//
// parametertNameText.setText(selectParam.getName());
- datanameText.setText(getDisplayDocText(selectParam.getDocDataName()));
- defaultValText.setText(getDisplayDocText(selectParam.getDocDefaultVal()));
- descriptionText.setText(getDisplayDocText(selectParam.getDocDescription()));
- unitText.setText(getDisplayDocText(selectParam.getDocUnit()));
- rangeText.setText(getDisplayDocText(selectParam.getDocRange()));
- constraintText.setText(getDisplayDocText(selectParam.getDocConstraint()));
+ datanameText.setText(StringUtil.getDisplayDocText(selectParam.getDocDataName()));
+ defaultValText.setText(StringUtil.getDisplayDocText(selectParam.getDocDefaultVal()));
+ descriptionText.setText(StringUtil.getDisplayDocText(selectParam.getDocDescription()));
+ unitText.setText(StringUtil.getDisplayDocText(selectParam.getDocUnit()));
+ rangeText.setText(StringUtil.getDisplayDocText(selectParam.getDocRange()));
+ constraintText.setText(StringUtil.getDisplayDocText(selectParam.getDocConstraint()));
preSelection = selectParam;
}
}
@@ -439,19 +440,19 @@
private void setContents(ConfigSetParam target) {
if( target != null ) {
target.setType(typeCombo.getText());
- target.setDefaultVal(getDocText(defaultValueText.getText()));
- target.setVarName(getDocText(variableNameText.getText()));
- target.setUnit(getDocText(unitConfigText.getText()));
- target.setConstraint(getDocText(constraintConfigText.getText()));
- target.setWidget(getDocText(widgetCombo.getText()));
- target.setStep(getDocText(stepText.getText()));
+ target.setDefaultVal(StringUtil.getDocText(defaultValueText.getText()));
+ target.setVarName(StringUtil.getDocText(variableNameText.getText()));
+ target.setUnit(StringUtil.getDocText(unitConfigText.getText()));
+ target.setConstraint(StringUtil.getDocText(constraintConfigText.getText()));
+ target.setWidget(StringUtil.getDocText(widgetCombo.getText()));
+ target.setStep(StringUtil.getDocText(stepText.getText()));
//
- target.setDocDataName(getDocText(datanameText.getText()));
- target.setDocDefaultVal(getDocText(defaultValText.getText()));
- target.setDocDescription(getDocText(descriptionText.getText()));
- target.setDocUnit(getDocText(unitText.getText()));
- target.setDocRange(getDocText(rangeText.getText()));
- target.setDocConstraint(getDocText(constraintText.getText()));
+ target.setDocDataName(StringUtil.getDocText(datanameText.getText()));
+ target.setDocDefaultVal(StringUtil.getDocText(defaultValText.getText()));
+ target.setDocDescription(StringUtil.getDocText(descriptionText.getText()));
+ target.setDocUnit(StringUtil.getDocText(unitText.getText()));
+ target.setDocRange(StringUtil.getDocText(rangeText.getText()));
+ target.setDocConstraint(StringUtil.getDocText(constraintText.getText()));
}
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java 2017-02-14 05:06:28 UTC (rev 678)
@@ -9,6 +9,7 @@
import jp.go.aist.rtm.rtcbuilder.RtcBuilderPlugin;
import jp.go.aist.rtm.rtcbuilder.generator.param.DataPortParam;
import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
+import jp.go.aist.rtm.rtcbuilder.ui.StringUtil;
import jp.go.aist.rtm.rtcbuilder.ui.preference.ComponentPreferenceManager;
import jp.go.aist.rtm.rtcbuilder.util.ValidationUtil;
@@ -267,15 +268,15 @@
}
portNameText.setText(portName.toString());
typeCombo.setText(selectParam.getType());
- varNameText.setText(getDisplayDocText(selectParam.getVarName()));
+ varNameText.setText(StringUtil.getDisplayDocText(selectParam.getVarName()));
positionCombo.setText(selectParam.getPosition());
- descriptionText.setText(getDisplayDocText(selectParam.getDocDescription()));
- typeText.setText(getDisplayDocText(selectParam.getDocType()));
- numberText.setText(getDisplayDocText(selectParam.getDocNum()));
- semanticsText.setText(getDisplayDocText(selectParam.getDocSemantics()));
- unitText.setText(getDisplayDocText(selectParam.getDocUnit()));
- occurrenceText.setText(getDisplayDocText(selectParam.getDocOccurrence()));
- operationText.setText(getDisplayDocText(selectParam.getDocOperation()));
+ descriptionText.setText(StringUtil.getDisplayDocText(selectParam.getDocDescription()));
+ typeText.setText(StringUtil.getDisplayDocText(selectParam.getDocType()));
+ numberText.setText(StringUtil.getDisplayDocText(selectParam.getDocNum()));
+ semanticsText.setText(StringUtil.getDisplayDocText(selectParam.getDocSemantics()));
+ unitText.setText(StringUtil.getDisplayDocText(selectParam.getDocUnit()));
+ occurrenceText.setText(StringUtil.getDisplayDocText(selectParam.getDocOccurrence()));
+ operationText.setText(StringUtil.getDisplayDocText(selectParam.getDocOperation()));
preSelection = selectParam;
}
}
@@ -295,15 +296,15 @@
public void update() {
if (selectParam != null) {
selectParam.setType(typeCombo.getText());
- selectParam.setVarName(getDocText(varNameText.getText()));
+ selectParam.setVarName(StringUtil.getDocText(varNameText.getText()));
selectParam.setPosition(positionCombo.getText());
- selectParam.setDocDescription(getDocText(descriptionText.getText()));
- selectParam.setDocType(getDocText(typeText.getText()));
- selectParam.setDocNum(getDocText(numberText.getText()));
- selectParam.setDocSemantics(getDocText(semanticsText.getText()));
- selectParam.setDocUnit(getDocText(unitText.getText()));
- selectParam.setDocOccurrence(getDocText(occurrenceText.getText()));
- selectParam.setDocOperation(getDocText(operationText.getText()));
+ selectParam.setDocDescription(StringUtil.getDocText(descriptionText.getText()));
+ selectParam.setDocType(StringUtil.getDocText(typeText.getText()));
+ selectParam.setDocNum(StringUtil.getDocText(numberText.getText()));
+ selectParam.setDocSemantics(StringUtil.getDocText(semanticsText.getText()));
+ selectParam.setDocUnit(StringUtil.getDocText(unitText.getText()));
+ selectParam.setDocOccurrence(StringUtil.getDocText(occurrenceText.getText()));
+ selectParam.setDocOperation(StringUtil.getDocText(operationText.getText()));
}
//
editor.updateEMFDataPorts(
@@ -320,16 +321,16 @@
private void setDocumentContents() {
if( preSelection != null ) {
preSelection.setType(typeCombo.getText());
- preSelection.setVarName(getDocText(varNameText.getText()));
+ preSelection.setVarName(StringUtil.getDocText(varNameText.getText()));
preSelection.setPosition(positionCombo.getText());
//
- preSelection.setDocDescription(getDocText(descriptionText.getText()));
- preSelection.setDocType(getDocText(typeText.getText()));
- preSelection.setDocNum(getDocText(numberText.getText()));
- preSelection.setDocSemantics(getDocText(semanticsText.getText()));
- preSelection.setDocUnit(getDocText(unitText.getText()));
- preSelection.setDocOccurrence(getDocText(occurrenceText.getText()));
- preSelection.setDocOperation(getDocText(operationText.getText()));
+ preSelection.setDocDescription(StringUtil.getDocText(descriptionText.getText()));
+ preSelection.setDocType(StringUtil.getDocText(typeText.getText()));
+ preSelection.setDocNum(StringUtil.getDocText(numberText.getText()));
+ preSelection.setDocSemantics(StringUtil.getDocText(semanticsText.getText()));
+ preSelection.setDocUnit(StringUtil.getDocText(unitText.getText()));
+ preSelection.setDocOccurrence(StringUtil.getDocText(occurrenceText.getText()));
+ preSelection.setDocOperation(StringUtil.getDocText(operationText.getText()));
}
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DocumentEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DocumentEditorFormPage.java 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DocumentEditorFormPage.java 2017-02-14 05:06:28 UTC (rev 678)
@@ -1,6 +1,8 @@
package jp.go.aist.rtm.rtcbuilder.ui.editors;
import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
+import jp.go.aist.rtm.rtcbuilder.ui.StringUtil;
+import jp.go.aist.rtm.rtcbuilder.ui.preference.DocumentPreferenceManager;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
@@ -157,15 +159,15 @@
RtcParam rtcParam = editor.getRtcParam();
if( descriptionText != null ) {
- rtcParam.setDocDescription(getDocText(descriptionText.getText()));
- rtcParam.setDocInOut(getDocText(inoutText.getText()));
- rtcParam.setDocAlgorithm(getDocText(algorithmText.getText()));
+ rtcParam.setDocDescription(StringUtil.getDocText(descriptionText.getText()));
+ rtcParam.setDocInOut(StringUtil.getDocText(inoutText.getText()));
+ rtcParam.setDocAlgorithm(StringUtil.getDocText(algorithmText.getText()));
//
- rtcParam.setDocCreator(getDocText(creatorText.getText()));
- rtcParam.setDocLicense(getDocText(licenseText.getText()));
- rtcParam.setDocReference(getDocText(referenceText.getText()));
+ rtcParam.setDocCreator(StringUtil.getDocText(creatorText.getText()));
+ rtcParam.setDocLicense(StringUtil.getDocText(licenseText.getText()));
+ rtcParam.setDocReference(StringUtil.getDocText(referenceText.getText()));
//
- rtcParam.setCurrentVersionUpLog(getDocText(versionUpLogText.getText()));
+ rtcParam.setCurrentVersionUpLog(StringUtil.getDocText(versionUpLogText.getText()));
}
editor.updateDirty();
@@ -178,13 +180,14 @@
RtcParam rtcParam = editor.getRtcParam();
if( descriptionText != null ) {
- descriptionText.setText(getDisplayDocText(getValue(rtcParam.getDocDescription())));
- inoutText.setText(getDisplayDocText(getValue(rtcParam.getDocInOut())));
- algorithmText.setText(getDisplayDocText(getValue(rtcParam.getDocAlgorithm())));
+ descriptionText.setText(StringUtil.getDisplayDocText(getValue(rtcParam.getDocDescription())));
+ inoutText.setText(StringUtil.getDisplayDocText(getValue(rtcParam.getDocInOut())));
+ algorithmText.setText(StringUtil.getDisplayDocText(getValue(rtcParam.getDocAlgorithm())));
//
- creatorText.setText(getDisplayDocText(getValue(rtcParam.getDocCreator())));
- licenseText.setText(getDisplayDocText(getValue(rtcParam.getDocLicense())));
- referenceText.setText(getDisplayDocText(getValue(rtcParam.getDocReference())));
+ creatorText.setText(StringUtil.getDisplayDocText(getValue(rtcParam.getDocCreator())));
+ licenseText.setText(StringUtil.getDisplayDocText(getValue(rtcParam.getDocLicense())));
+
+ referenceText.setText(StringUtil.getDisplayDocText(getValue(rtcParam.getDocReference())));
//
versionUpLogList.removeAll();
for(String vuLog : rtcParam.getVersionUpLog() ) {
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ServicePortEditorFormPage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ServicePortEditorFormPage.java 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ServicePortEditorFormPage.java 2017-02-14 05:06:28 UTC (rev 678)
@@ -20,6 +20,7 @@
import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortInterfaceParam;
import jp.go.aist.rtm.rtcbuilder.generator.param.ServicePortParam;
import jp.go.aist.rtm.rtcbuilder.generator.param.idl.ServiceClassParam;
+import jp.go.aist.rtm.rtcbuilder.ui.StringUtil;
import jp.go.aist.rtm.rtcbuilder.ui.preference.ComponentPreferenceManager;
import jp.go.aist.rtm.rtcbuilder.util.FileUtil;
import jp.go.aist.rtm.rtcbuilder.util.ValidationUtil;
@@ -218,8 +219,8 @@
}
((ServicePortParam)selection.getData()).setPositionByIndex(positionCombo.getSelectionIndex());
//
- ((ServicePortParam)selection.getData()).setDocDescription(getDocText(descriptionText.getText()));
- ((ServicePortParam)selection.getData()).setDocIfDescription(getDocText(ifoverviewText.getText()));
+ ((ServicePortParam)selection.getData()).setDocDescription(StringUtil.getDocText(descriptionText.getText()));
+ ((ServicePortParam)selection.getData()).setDocIfDescription(StringUtil.getDocText(ifoverviewText.getText()));
} else if( selection.getData() instanceof ServicePortInterfaceParam ) {
if( !((ServicePortInterfaceParam)selection.getData()).getIdlFile().equals(
idlFileText.getText()) ) {
@@ -254,12 +255,12 @@
((ServicePortInterfaceParam)selection.getData()).setInterfaceType(interfaceTypeCombo.getText());
((ServicePortInterfaceParam)selection.getData()).setIdlSearchPath(idlPathText.getText());
//
- ((ServicePortInterfaceParam)selection.getData()).setDocDescription(getDocText(ifdetailText.getText()));
- ((ServicePortInterfaceParam)selection.getData()).setDocArgument(getDocText(ifargumentText.getText()));
- ((ServicePortInterfaceParam)selection.getData()).setDocReturn(getDocText(ifreturnText.getText()));
- ((ServicePortInterfaceParam)selection.getData()).setDocException(getDocText(ifexceptionText.getText()));
- ((ServicePortInterfaceParam)selection.getData()).setDocPreCondition(getDocText(ifpreconditionText.getText()));
- ((ServicePortInterfaceParam)selection.getData()).setDocPostCondition(getDocText(ifpostconditionText.getText()));
+ ((ServicePortInterfaceParam)selection.getData()).setDocDescription(StringUtil.getDocText(ifdetailText.getText()));
+ ((ServicePortInterfaceParam)selection.getData()).setDocArgument(StringUtil.getDocText(ifargumentText.getText()));
+ ((ServicePortInterfaceParam)selection.getData()).setDocReturn(StringUtil.getDocText(ifreturnText.getText()));
+ ((ServicePortInterfaceParam)selection.getData()).setDocException(StringUtil.getDocText(ifexceptionText.getText()));
+ ((ServicePortInterfaceParam)selection.getData()).setDocPreCondition(StringUtil.getDocText(ifpreconditionText.getText()));
+ ((ServicePortInterfaceParam)selection.getData()).setDocPostCondition(StringUtil.getDocText(ifpostconditionText.getText()));
//
}
}
@@ -539,8 +540,8 @@
nameText.setText(servicePort.getName());
positionCombo.select(servicePort.getPositionByIndex());
//
- descriptionText.setText(getDisplayDocText(servicePort.getDocDescription()));
- ifoverviewText.setText(getDisplayDocText(servicePort.getDocIfDescription()));
+ descriptionText.setText(StringUtil.getDisplayDocText(servicePort.getDocDescription()));
+ ifoverviewText.setText(StringUtil.getDisplayDocText(servicePort.getDocIfDescription()));
}
}
@@ -666,12 +667,12 @@
interfaceTypeCombo.setText(serviceInterface.getInterfaceType());
idlPathText.setText(serviceInterface.getIdlSearchPath());
//
- ifdetailText.setText(getDisplayDocText(serviceInterface.getDocDescription()));
- ifargumentText.setText(getDisplayDocText(serviceInterface.getDocArgument()));
- ifreturnText.setText(getDisplayDocText(serviceInterface.getDocReturn()));
- ifexceptionText.setText(getDisplayDocText(serviceInterface.getDocException()));
- ifpreconditionText.setText(getDisplayDocText(serviceInterface.getDocPreCondition()));
- ifpostconditionText.setText(getDisplayDocText(serviceInterface.getDocPostCondition()));
+ ifdetailText.setText(StringUtil.getDisplayDocText(serviceInterface.getDocDescription()));
+ ifargumentText.setText(StringUtil.getDisplayDocText(serviceInterface.getDocArgument()));
+ ifreturnText.setText(StringUtil.getDisplayDocText(serviceInterface.getDocReturn()));
+ ifexceptionText.setText(StringUtil.getDisplayDocText(serviceInterface.getDocException()));
+ ifpreconditionText.setText(StringUtil.getDisplayDocText(serviceInterface.getDocPreCondition()));
+ ifpostconditionText.setText(StringUtil.getDisplayDocText(serviceInterface.getDocPostCondition()));
}
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DocumentPreferenceManager.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DocumentPreferenceManager.java 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DocumentPreferenceManager.java 2017-02-14 05:06:28 UTC (rev 678)
@@ -78,7 +78,7 @@
return result;
}
public void setLicenseValue(String defaultLicenseValue) {
- String oldCreatorValue = getCreatorValue();
+ String oldCreatorValue = getLicenseValue();
RtcBuilderPlugin.getDefault().getPreferenceStore().setValue(Document_Licence, defaultLicenseValue);
propertyChangeSupport.firePropertyChange(Document_Licence, oldCreatorValue, defaultLicenseValue);
}
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 2017-02-11 03:47:43 UTC (rev 677)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java 2017-02-14 05:06:28 UTC (rev 678)
@@ -1,6 +1,7 @@
package jp.go.aist.rtm.rtcbuilder.ui.wizard;
import java.io.ByteArrayInputStream;
+import java.io.UnsupportedEncodingException;
import java.util.GregorianCalendar;
import javax.xml.datatype.DatatypeConstants;
@@ -70,10 +71,13 @@
String xmlFile = handler.createInitialRtcXml(dateTime);
//
rtcxml = projectHandle.getFile(IRtcBuilderConstants.DEFAULT_RTC_XML);
- rtcxml.create(new ByteArrayInputStream(xmlFile.getBytes()), false, null);
+ rtcxml.create(new ByteArrayInputStream(xmlFile.getBytes("UTF-8")), false, null);
} catch (CoreException ex) {
System.out.println(ex);
return false;
+ } catch (UnsupportedEncodingException e) {
+ System.out.println(e);
+ return false;
}
// パースペクティブを切り替え
BasicNewProjectResourceWizard.updatePerspective(configElement);
More information about the openrtm-commit
mailing list