[openrtm-commit:02463] r685 - in branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder: icons src/jp/go/aist/rtm/rtcbuilder src/jp/go/aist/rtm/rtcbuilder/generator/param src/jp/go/aist/rtm/rtcbuilder/manager src/jp/go/aist/rtm/rtcbuilder/nl src/jp/go/aist/rtm/rtcbuilder/template/cmake src/jp/go/aist/rtm/rtcbuilder/template/cmake/cmake src/jp/go/aist/rtm/rtcbuilder/template/cmake/doc src/jp/go/aist/rtm/rtcbuilder/template/cmake/idl src/jp/go/aist/rtm/rtcbuilder/template/cmake/include src/jp/go/aist/rtm/rtcbuilder/template/cmake/src src/jp/go/aist/rtm/rtcbuilder/template/fsm 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 src/jp/go/aist/rtm/rtcbuilder/util

openrtm @ openrtm.org openrtm @ openrtm.org
2017年 2月 19日 (日) 15:13:36 JST


Author: ga
Date: 2017-02-19 15:13:36 +0900 (Sun, 19 Feb 2017)
New Revision: 685

Added:
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/icons/rt_middleware_logo.bmp
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/icons/rt_middleware_logo.ico
Removed:
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizard.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizardPage.java
Modified:
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CMakeGenerateManager.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/cmake/CMakeCMakeLists.txt.vsl
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/doc/DocCMakeLists.txt.vsl
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/idl/IdlCMakeLists.txt.vsl
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncModuleCMakeLists.txt.vsl
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/src/SrcCMakeLists.txt.vsl
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/fsm/CXX_FSM.cpp.vsl
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/fsm/CXX_FSM.h.vsl
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/StringUtil.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DocumentEditorFormPage.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ServicePortEditorFormPage.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DocumentPreferenceManager.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java
   branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/util/FileUtil.java
Log:
Modified generated FSM code #3877

Added: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/icons/rt_middleware_logo.bmp
===================================================================
(Binary files differ)


Property changes on: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/icons/rt_middleware_logo.bmp
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/icons/rt_middleware_logo.ico
===================================================================
(Binary files differ)


Property changes on: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/icons/rt_middleware_logo.ico
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -1,10 +1,17 @@
 package jp.go.aist.rtm.rtcbuilder;
 
-import java.io.ByteArrayInputStream;
+import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileOutputStream;
 import java.io.IOException;
+import java.io.OutputStreamWriter;
 import java.io.StringReader;
+import java.net.URI;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.GregorianCalendar;
@@ -595,8 +602,26 @@
 				idlTarget.create(new FileInputStream(includedIdlFile), true, null);
 			}
 		}
+		//
+		//アイコン、ビットマップのコピー
+		copyFigure("icons/rt_middleware_logo.ico", project, "cmake/rt_middleware_logo.ico");
+		copyFigure("icons/rt_middleware_logo.bmp", project, "cmake/rt_middleware_logo.bmp");
 	}
 
+	private void copyFigure(String source, IProject outputProject, String dist) {
+		try {
+			URL bundleUrl = this.getClass().getClassLoader().getResource(source);
+			URL jarUrl = org.eclipse.core.runtime.FileLocator.toFileURL(bundleUrl);	
+			URI uri = URI.create(jarUrl.toString().replace(File.separator, "/"));
+			
+			File targetFile = new File(outputProject.getLocation().toOSString(), dist);
+			
+			Files.copy(Paths.get(uri), Paths.get(targetFile.toURI()), StandardCopyOption.REPLACE_EXISTING);
+		} catch (IOException e) {
+			e.printStackTrace();
+		}
+	}
+	
 	private void writeFile(GeneratedResult generatedResult, IProject outputProject,
 			MergeHandler handler) throws IOException {
 		
@@ -651,9 +676,21 @@
 					}
 				}
 			}
+//			try {
+//				outputFile.create(new ByteArrayInputStream(generatedResult.getCode().getBytes("UTF-8")), false, null);
+//			} catch (CoreException e) {
+//				LOGGER.error("Fail to create file", e);
+//			}
 			try {
-				outputFile.create(new ByteArrayInputStream(generatedResult.getCode().getBytes("UTF-8")), false, null);
-			} catch (CoreException e) {
+				String strFullPath = outputFile.getLocation().toOSString();
+				FileOutputStream fos = new FileOutputStream(strFullPath);
+				fos.write(0xef); fos.write(0xbb); fos.write(0xbf);				
+				OutputStreamWriter osw = new OutputStreamWriter( fos , "UTF-8");
+				BufferedWriter fp = new BufferedWriter( osw );
+				fp.write ( generatedResult.getCode());
+				fp.flush();
+				fp.close();				
+			} catch (Exception e) {
 				LOGGER.error("Fail to create file", e);
 			}
 		}

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/ParamUtil.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -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: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CMakeGenerateManager.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CMakeGenerateManager.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/manager/CMakeGenerateManager.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -139,7 +139,6 @@
 		result.add(gr);
 		gr = generateResourceWixXSL(contextMap);
 		result.add(gr);
-		//TODO アイコン、ビットマップのコピー
 
 		//doc
 		gr = generateDocCMakeLists(contextMap);

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties	2017-02-19 06:13:36 UTC (rev 685)
@@ -3,12 +3,12 @@
 IMessageConstants.BASIC_SECTION=Basic
 IMessageConstants.BASIC_COMPONENT_TITLE=RT-Component Basic Profile
 IMessageConstants.BASIC_PROJECT_TITLE=Output Project
-IMessageConstants.BASIC_GENERATE_TITLE=Code Generation and Packaging
+IMessageConstants.BASIC_GENERATE_TITLE=Code Generation
 IMessageConstants.BASIC_EXPORT_IMPORT_TITLE=Import/Export Profile information
 
 IMessageConstants.BASIC_COMPONENT_EXPL=This section defines RT-Component Basic information.
 IMessageConstants.BASIC_PROJECT_EXPL=Specifies the directory that outputs RTC Project.
-IMessageConstants.BASIC_GENERATE_EXPL=Generates code and Packaging.
+IMessageConstants.BASIC_GENERATE_EXPL=Generates code.
 IMessageConstants.BASIC_EXPORT_IMPORT_EXPL=Imports/Exports Profile information
 
 IMessageConstants.BASIC_HINT_MODULENAME_TITLE=Module name :
@@ -68,9 +68,6 @@
 IMessageConstants.BASIC_HINT_PROJECT_DESC_P5=\uff65Input a project name directly.
 IMessageConstants.BASIC_HINT_GENERATE_TITLE=Code Generation :
 IMessageConstants.BASIC_HINT_GENERATE_DESC=Generates RTC skeleton code based on its configuration.
-IMessageConstants.BASIC_HINT_PACKAGE_TITLE=Packaging :
-IMessageConstants.BASIC_HINT_PACKAGE_DESC_P1=Archives RTC source code and
-IMessageConstants.BASIC_HINT_PACKAGE_DESC_P2=the execution binary code etc in various forms.
 IMessageConstants.BASIC_HINT_IMPORT_TITLE=Import :
 IMessageConstants.BASIC_HINT_IMPORT_DESC=Loads the saved contents in RtcProfile format.
 IMessageConstants.BASIC_HINT_EXPORT_TITLE=Packaging and Export :
@@ -92,7 +89,6 @@
 
 IMessageConstants.BASIC_BTN_REF=Browse...
 IMessageConstants.BASIC_BTN_GENERATE=Code Generation
-IMessageConstants.BASIC_BTN_PACKAGING=Packaging
 IMessageConstants.BASIC_BTN_IMPORT=Import
 IMessageConstants.BASIC_BTN_EXPORT=Export
 

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/CMakeLists.txt.vsl	2017-02-19 06:13:36 UTC (rev 685)
@@ -13,14 +13,17 @@
 set(PROJECT_AUTHOR "${rtcParam.vender}")
 set(PROJECT_AUTHOR_SHORT "${rtcParam.vender}")
 
+set(PROJECT_MAINTAINER "Noriaki Ando <n-ando at aist.go.jp>")
+set(PROJECT_TYPE "c++/opencv-rtcs")
+
 ${sharp} Add an "uninstall" target
 CONFIGURE_FILE ("${dol}{PROJECT_SOURCE_DIR}/cmake/uninstall_target.cmake.in"
     "${dol}{PROJECT_BINARY_DIR}/uninstall_target.cmake" IMMEDIATE @ONLY)
-ADD_CUSTOM_TARGET (uninstall "${dol}{CMAKE_COMMAND}" -P
+ADD_CUSTOM_TARGET (${dol}{PROJECT_NAME}_uninstall "${dol}{CMAKE_COMMAND}" -P
     "${dol}{PROJECT_BINARY_DIR}/uninstall_target.cmake")
 
 ${sharp}option(BUILD_EXAMPLES "Build and install examples" OFF)
-option(BUILD_DOCUMENTATION "Build the documentation" ON)
+option(BUILD_DOCUMENTATION "Build the documentation" OFF)
 ${sharp}option(BUILD_TESTS "Build the tests" OFF)
 ${sharp}option(BUILD_TOOLS "Build the tools" OFF)
 option(BUILD_IDL "Build and install idl" ON)
@@ -40,13 +43,13 @@
 
 
 ${sharp} Set up installation directories
-set(BIN_INSTALL_DIR "components/bin")
-set(LIB_INSTALL_DIR "components/lib")
-set(INC_INSTALL_DIR
-    "components/include/${dol}{PROJECT_NAME_LOWER}-${dol}{PROJECT_VERSION_MAJOR}")
-set(SHARE_INSTALL_DIR
-    "components/share/${dol}{PROJECT_NAME_LOWER}-${dol}{PROJECT_VERSION_MAJOR}")
-
+if(WIN32)
+   set(INSTALL_PREFIX "components/${dol}{PROJECT_TYPE}")
+else(WIN32)
+   set(OPENRTM_SHARE_PREFIX "share/openrtm-${dol}{PROJECT_VERSION_MAJOR}.${dol}{PROJECT_VERSION_MINOR}")
+   set(INSTALL_PREFIX "${dol}{OPENRTM_SHARE_PREFIX}/components/${dol}{PROJECT_TYPE}")
+endif(WIN32)
+       
 ${sharp} Get necessary dependency information
 find_package(OpenRTM)
 

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/cmake/CMakeCMakeLists.txt.vsl
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/cmake/CMakeCMakeLists.txt.vsl	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/cmake/CMakeCMakeLists.txt.vsl	2017-02-19 06:13:36 UTC (rev 685)
@@ -2,8 +2,6 @@
 set(PKG_LIBS -l${dol}{PROJECT_NAME_LOWER})
 set(pkg_conf_file ${dol}{CMAKE_CURRENT_BINARY_DIR}/${dol}{PROJECT_NAME_LOWER}.pc)
 configure_file(${dol}{PROJECT_NAME_LOWER}.pc.in ${dol}{pkg_conf_file} @ONLY)
-install(FILES ${dol}{pkg_conf_file}
-    DESTINATION ${dol}{LIB_INSTALL_DIR}/pkgconfig/ COMPONENT component)
 
 ${sharp} Install CMake modules
 set(cmake_config ${dol}{CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME_LOWER}-config.cmake)
@@ -14,5 +12,4 @@
 configure_file(${dol}{CMAKE_CURRENT_SOURCE_DIR}/${dol}{PROJECT_NAME_LOWER}-config-version.cmake.in
     ${dol}{cmake_version_config} @ONLY)
 set(cmake_mods ${dol}{cmake_config} ${dol}{cmake_version_config})
-install(FILES ${dol}{cmake_mods} DESTINATION ${dol}{SHARE_INSTALL_DIR} COMPONENT library)
 

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/doc/DocCMakeLists.txt.vsl
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/doc/DocCMakeLists.txt.vsl	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/doc/DocCMakeLists.txt.vsl	2017-02-19 06:13:36 UTC (rev 685)
@@ -17,7 +17,7 @@
     ${sharp} Doxygen part
     set(doxyfile "${dol}{CMAKE_CURRENT_BINARY_DIR}/doxyfile")
     configure_file(doxyfile.in ${dol}{doxyfile})
-    add_custom_target(doxygen_doc ${dol}{DOXYGEN_EXECUTABLE} ${dol}{doxyfile})
+    add_custom_target(${dol}{PROJECT_NAME}_doxygen_doc ${dol}{DOXYGEN_EXECUTABLE} ${dol}{doxyfile})
 
     ${sharp} Sphinx part
     ${sharp}set(conf_dir "${dol}{CMAKE_CURRENT_BINARY_DIR}/conf")

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/idl/IdlCMakeLists.txt.vsl
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/idl/IdlCMakeLists.txt.vsl	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/idl/IdlCMakeLists.txt.vsl	2017-02-19 06:13:36 UTC (rev 685)
@@ -49,7 +49,7 @@
 
 OPENRTM_COMPILE_IDL_FILES(${dol}{idls})
 set(ALL_IDL_SRCS ${dol}{ALL_IDL_SRCS} PARENT_SCOPE)
-FILTER_LIST(ALL_IDL_SRCS "hh${dol}" idl_headers)
+FILTER_LIST("${dol}{ALL_IDL_SRCS}" "hh${dol}" idl_headers)
 install(FILES ${dol}{idl_headers}
     DESTINATION ${dol}{INC_INSTALL_DIR}/${dol}{PROJECT_NAME_LOWER}/idl
     COMPONENT headers)

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncModuleCMakeLists.txt.vsl
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncModuleCMakeLists.txt.vsl	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/include/IncModuleCMakeLists.txt.vsl	2017-02-19 06:13:36 UTC (rev 685)
@@ -1,13 +1,5 @@
-set(hdrs
-    ${rtcParam.name}.h
-#if( ${tmpltHelper.checkFSM(${rtcParam})} )    ${rtcParam.name}FSM.h
-#end
-    PARENT_SCOPE
+set(hdrs ${rtcParam.name}.h
 #foreach($providerIdlFile in ${rtcParam.providerIdlPathes})
     ${tmpltHelper.getFilenameNoExt(${providerIdlFile.idlFile})}${tmpltHelper.serviceImplSuffix}.h
 #end
     )
-
-install(FILES ${dol}{hdrs} DESTINATION ${dol}{INC_INSTALL_DIR}/${dol}{PROJECT_NAME_LOWER}
-    COMPONENT library)
-

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/src/SrcCMakeLists.txt.vsl
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/src/SrcCMakeLists.txt.vsl	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/cmake/src/SrcCMakeLists.txt.vsl	2017-02-19 06:13:36 UTC (rev 685)
@@ -1,15 +1,5 @@
-set(comp_srcs
-    ${rtcParam.name}.cpp
-#foreach($providerIdlFile in ${rtcParam.providerIdlPathes})${tmpltHelper.getFilenameNoExt(${providerIdlFile.idlFile})}${tmpltHelper.serviceImplSuffix}.cpp
-#end
-#if( ${tmpltHelper.checkFSM(${rtcParam})} )    ${rtcParam.name}FSM.cpp
-#end
-   )
-set(standalone_srcs
-    ${rtcParam.name}Comp.cpp
-#if( ${tmpltHelper.checkFSM(${rtcParam})} )    ${rtcParam.name}FSM.cpp
-#end
-    )
+set(comp_srcs ${rtcParam.name}.cpp #foreach($providerIdlFile in ${rtcParam.providerIdlPathes})${tmpltHelper.getFilenameNoExt(${providerIdlFile.idlFile})}${tmpltHelper.serviceImplSuffix}.cpp #end)
+set(standalone_srcs ${rtcParam.name}Comp.cpp)
 
 if (DEFINED OPENRTM_INCLUDE_DIRS)
   string(REGEX REPLACE "-I" ";"
@@ -62,9 +52,6 @@
 
 install(TARGETS ${dol}{PROJECT_NAME} ${dol}{PROJECT_NAME}Comp
     EXPORT ${dol}{PROJECT_NAME}
-    RUNTIME DESTINATION ${dol}{BIN_INSTALL_DIR} COMPONENT component
-    LIBRARY DESTINATION ${dol}{LIB_INSTALL_DIR} COMPONENT component
-    ARCHIVE DESTINATION ${dol}{LIB_INSTALL_DIR} COMPONENT component)
-install(EXPORT ${dol}{PROJECT_NAME}
-    DESTINATION ${dol}{LIB_INSTALL_DIR}/${dol}{PROJECT_NAME}
-    FILE ${dol}{PROJECT_NAME}Depends.cmake)
+    RUNTIME DESTINATION ${dol}{INSTALL_DIR} COMPONENT component
+    LIBRARY DESTINATION ${dol}{INSTALL_DIR} COMPONENT component
+    ARCHIVE DESTINATION ${dol}{INSTALL_DIR} COMPONENT component)

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/fsm/CXX_FSM.cpp.vsl
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/fsm/CXX_FSM.cpp.vsl	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/fsm/CXX_FSM.cpp.vsl	2017-02-19 06:13:36 UTC (rev 685)
@@ -9,44 +9,43 @@
 
 namespace ${rtcParam.name}FSM {
 
-void ${fsmParam.name}::set_component(Fsm* component) {
-  ::set_component(component);
-}
-void ${fsmParam.name}::notify_fsm_state_changed(const char* state) {
-  ::get_component()->notify_fsm_state_changed(state);
-}
-
 // Top state
-void ${fsmParam.name}::init() {
+RTC::ReturnCode_t ${fsmParam.name}::onInit() {
+  return RTC::RTC_OK;
 }
 
-void ${fsmParam.name}::entry() {
+RTC::ReturnCode_t ${fsmParam.name}::onEntry() {
+  return RTC::RTC_OK;
 }
 
-void ${fsmParam.name}::exit() {
+RTC::ReturnCode_t ${fsmParam.name}::onExit() {
+  return RTC::RTC_OK;
 }
 
 #foreach($eachTrans in ${fsmParam.getAllTransList()})
-void ${fsmParam.name}::${eachTrans.event}(RTC::TimedLong param) {
+void ${fsmParam.name}::${eachTrans.event}() {
 }
 
 #end
 #foreach($eachState in ${fsmParam.getAllStateList()})
 //${eachState.name}
-void ${eachState.name}::init() {
+virtual RTC::ReturnCode_t ${eachState.name}::onInit() {
+  return RTC::RTC_OK;
 }
 
 #if( ${eachState.hasEntry} )
-void ${eachState.name}::entry() {
+virtual RTC::ReturnCode_t ${eachState.name}::onEntry() {
+  return RTC::RTC_OK;
 }
 #end
 #if( ${eachState.hasExit} )
-void ${eachState.name}::exit() {
+virtual RTC::ReturnCode_t ${eachState.name}::onExit() {
+  return RTC::RTC_OK;
 }
 #end
 
 #foreach($eachTrans in ${eachState.getTransList()})
-void ${eachState.name}::${eachTrans.event}(RTC::TimedLong param) {
+void ${eachState.name}::${eachTrans.event}() {
   setState<${eachTrans.target}>();
 }
 

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/fsm/CXX_FSM.h.vsl
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/fsm/CXX_FSM.h.vsl	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/template/fsm/CXX_FSM.h.vsl	2017-02-19 06:13:36 UTC (rev 685)
@@ -8,16 +8,16 @@
 ${sharp}ifndef ${rtcParam.name.toUpperCase()}_FSM_H
 ${sharp}define ${rtcParam.name.toUpperCase()}_FSM_H
 
+${sharp}include <rtm/StaticFSM.h>
 ${sharp}include <rtm/idl/BasicDataTypeSkel.h>
-${sharp}include <rtm/idl/ExtendedDataTypesSkel.h>
-${sharp}include <rtm/idl/InterfaceDataTypesSkel.h>
+${sharp}include <rtm/RTC.h>
 
-class Fsm;
+class ${rtcParam.name};
 
 namespace ${rtcParam.name}FSM {
 
 // Machine's top state
-TOPSTATE(${fsmParam.name}) {
+FSM_TOPSTATE(${fsmParam.name}) {
   // Top state variables (visible to all substates)
 #if( ${fsmParam.dataName.length()} > 0 )
   struct ${fsmParam.dataName} {
@@ -25,40 +25,36 @@
   };
 #end
   
-  STATE(${fsmParam.name})
+  FSM_STATE(${fsmParam.name})
 
-  static void set_component(Fsm* component);
-  static void notify_fsm_state_changed(const char* state);
-
   // Event handler
 #foreach($eachTrans in ${fsmParam.getAllTransList()})
-  virtual void ${eachTrans.event}(RTC::TimedLong param);
+  virtual void ${eachTrans.event}();
 #end
   
- protected:
-   void init();
-   void entry();
-   void exit();
+ private:
+   virtual RTC::ReturnCode_t onInit();
+   virtual RTC::ReturnCode_t onEntry();
+   virtual RTC::ReturnCode_t onExit();
 };
 
 #foreach($eachState in ${fsmParam.getAllStateList()})
-SUBSTATE(${eachState.name}, ${eachState.parentName}) {
+FSM_SUBSTATE(${eachState.name}, ${eachState.parentName}) {
 #if( ${eachState.dataName.length()} > 0 )
   struct ${eachState.dataName} {
     ${eachState.dataName}() {}
   };
 #end
-  STATE(${eachState.name})
+  FSM_STATE(${eachState.name})
 ${tmpltHelper.getHistory(${eachState})}
 #foreach($eachTrans in ${eachState.getTransList()})
-  void ${eachTrans.event}(RTC::TimedLong param);
+  virtual void ${eachTrans.event}();
 #end
 
 private:
-   void init();
-#if( ${eachState.hasEntry} )   void entry();
+#if( ${eachState.hasEntry} )   virtual RTC::ReturnCode_t onEntry();
 #end
-#if( ${eachState.hasExit} )   void exit();
+#if( ${eachState.hasExit} )   virtual RTC::ReturnCode_t onExit();
 #end
 };
 

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/StringUtil.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/StringUtil.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/StringUtil.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -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: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -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: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ActivityEditorFormPage.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -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: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/BasicEditorFormPage.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -14,6 +14,24 @@
 
 import javax.xml.bind.JAXBException;
 
+import jp.go.aist.rtm.rtcbuilder.GuiRtcBuilder;
+import jp.go.aist.rtm.rtcbuilder.IRTCBMessageConstants;
+import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
+import jp.go.aist.rtm.rtcbuilder.RtcBuilderPlugin;
+import jp.go.aist.rtm.rtcbuilder.extension.ImportExtension;
+import jp.go.aist.rtm.rtcbuilder.factory.ExportCreator;
+import jp.go.aist.rtm.rtcbuilder.fsm.StateParam;
+import jp.go.aist.rtm.rtcbuilder.generator.ProfileHandler;
+import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
+import jp.go.aist.rtm.rtcbuilder.generator.param.PropertyParam;
+import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
+import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
+import jp.go.aist.rtm.rtcbuilder.ui.Perspective.LanguageProperty;
+import jp.go.aist.rtm.rtcbuilder.ui.preference.ComponentPreferenceManager;
+import jp.go.aist.rtm.rtcbuilder.ui.preference.DocumentPreferenceManager;
+import jp.go.aist.rtm.rtcbuilder.util.FileUtil;
+import jp.go.aist.rtm.rtcbuilder.util.StringUtil;
+
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IProjectDescription;
@@ -28,7 +46,6 @@
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ISelectionProvider;
 import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.WizardDialog;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.SelectionEvent;
@@ -51,25 +68,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import jp.go.aist.rtm.rtcbuilder.GuiRtcBuilder;
-import jp.go.aist.rtm.rtcbuilder.IRTCBMessageConstants;
-import jp.go.aist.rtm.rtcbuilder.IRtcBuilderConstants;
-import jp.go.aist.rtm.rtcbuilder.RtcBuilderPlugin;
-import jp.go.aist.rtm.rtcbuilder.extension.ImportExtension;
-import jp.go.aist.rtm.rtcbuilder.factory.ExportCreator;
-import jp.go.aist.rtm.rtcbuilder.fsm.StateParam;
-import jp.go.aist.rtm.rtcbuilder.generator.ProfileHandler;
-import jp.go.aist.rtm.rtcbuilder.generator.param.GeneratorParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.PropertyParam;
-import jp.go.aist.rtm.rtcbuilder.generator.param.RtcParam;
-import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
-import jp.go.aist.rtm.rtcbuilder.ui.Perspective.LanguageProperty;
-import jp.go.aist.rtm.rtcbuilder.ui.preference.ComponentPreferenceManager;
-import jp.go.aist.rtm.rtcbuilder.ui.preference.DocumentPreferenceManager;
-import jp.go.aist.rtm.rtcbuilder.ui.wizard.RtcExportWizard;
-import jp.go.aist.rtm.rtcbuilder.util.FileUtil;
-import jp.go.aist.rtm.rtcbuilder.util.StringUtil;
-
 /**
  * Basic Profile 設定ページ
  */
@@ -306,7 +304,6 @@
 		createHintSpace(toolkit, composite);
 		//
 		createHintLabel(IMessageConstants.BASIC_HINT_GENERATE_TITLE, IMessageConstants.BASIC_HINT_GENERATE_DESC, toolkit, composite);
-		createHintLabel(IMessageConstants.BASIC_HINT_PACKAGE_TITLE, IMessageConstants.BASIC_HINT_PACKAGE_DESC, toolkit, composite);
 		//
 		createHintSpace(toolkit, composite);
 		//
@@ -321,20 +318,8 @@
 				IMessageConstants.BASIC_GENERATE_TITLE, IMessageConstants.BASIC_GENERATE_EXPL, 4);
 		//
 		createGenerateButton(toolkit);
-		createPackageButton(toolkit);
 	}
 
-	private void createPackageButton(FormToolkit toolkit) {
-		packageButton = toolkit.createButton(generateSection, IMessageConstants.BASIC_BTN_PACKAGING, SWT.NONE);
-		packageButton.addSelectionListener(new SelectionAdapter() {
-			@Override
-			public void widgetSelected(SelectionEvent e) {
-				WizardDialog dialog = new WizardDialog(getSite().getShell(), new RtcExportWizard());
-				dialog.open();
-			}
-		});
-	}
-
 	private void createGenerateButton(FormToolkit toolkit) {
 		generateButton = toolkit.createButton(generateSection, IMessageConstants.BASIC_BTN_GENERATE, SWT.NONE);
 		generateButton.addSelectionListener(new SelectionAdapter() {

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ConfigurationEditorFormPage.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -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: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DataPortEditorFormPage.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -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: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DocumentEditorFormPage.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DocumentEditorFormPage.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/DocumentEditorFormPage.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -1,6 +1,7 @@
 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 org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
@@ -157,15 +158,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 +179,13 @@
 		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: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -89,10 +89,6 @@
 	public static final String BASIC_HINT_PROJECT_DESC = StringUtil.connectMessageWithSepalator( new String[]{BASIC_HINT_PROJECT_DESC_P1, BASIC_HINT_PROJECT_DESC_P2, BASIC_HINT_PROJECT_DESC_P3, BASIC_HINT_PROJECT_DESC_P4, BASIC_HINT_PROJECT_DESC_P5});
 	public static final String BASIC_HINT_GENERATE_TITLE = Messages.getString("IMessageConstants.BASIC_HINT_GENERATE_TITLE"); //$NON-NLS-1$
 	public static final String BASIC_HINT_GENERATE_DESC = Messages.getString("IMessageConstants.BASIC_HINT_GENERATE_DESC"); //$NON-NLS-1$
-	public static final String BASIC_HINT_PACKAGE_TITLE = Messages.getString("IMessageConstants.BASIC_HINT_PACKAGE_TITLE"); //$NON-NLS-1$
-	public static final String BASIC_HINT_PACKAGE_DESC_P1 = Messages.getString("IMessageConstants.BASIC_HINT_PACKAGE_DESC_P1"); //$NON-NLS-1$
-	public static final String BASIC_HINT_PACKAGE_DESC_P2 = Messages.getString("IMessageConstants.BASIC_HINT_PACKAGE_DESC_P2"); //$NON-NLS-1$
-	public static final String BASIC_HINT_PACKAGE_DESC = StringUtil.connectMessageWithSepalator( new String[]{BASIC_HINT_PACKAGE_DESC_P1, BASIC_HINT_PACKAGE_DESC_P2});
 	public static final String BASIC_HINT_IMPORT_TITLE = Messages.getString("IMessageConstants.BASIC_HINT_IMPORT_TITLE"); //$NON-NLS-1$
 	public static final String BASIC_HINT_IMPORT_DESC = Messages.getString("IMessageConstants.BASIC_HINT_IMPORT_DESC"); //$NON-NLS-1$
 	public static final String BASIC_HINT_EXPORT_TITLE = Messages.getString("IMessageConstants.BASIC_HINT_EXPORT_TITLE"); //$NON-NLS-1$
@@ -114,7 +110,6 @@
 
 	public static final String BASIC_BTN_REF = Messages.getString("IMessageConstants.BASIC_BTN_REF"); //$NON-NLS-1$
 	public static final String BASIC_BTN_GENERATE = Messages.getString("IMessageConstants.BASIC_BTN_GENERATE"); //$NON-NLS-1$
-	public static final String BASIC_BTN_PACKAGING = Messages.getString("IMessageConstants.BASIC_BTN_PACKAGING"); //$NON-NLS-1$
 	public static final String BASIC_BTN_IMPORT = Messages.getString("IMessageConstants.BASIC_BTN_IMPORT"); //$NON-NLS-1$
 	public static final String BASIC_BTN_EXPORT = Messages.getString("IMessageConstants.BASIC_BTN_EXPORT"); //$NON-NLS-1$
 

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ServicePortEditorFormPage.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ServicePortEditorFormPage.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/ServicePortEditorFormPage.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -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: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DocumentPreferenceManager.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DocumentPreferenceManager.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DocumentPreferenceManager.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -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: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/NewWizard.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -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);

Deleted: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizard.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizard.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizard.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -1,64 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.ui.wizard;
-
-import java.util.List;
-
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.ui.IExportWizard;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.ide.IDE;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-
-public class RtcExportWizard extends Wizard implements IExportWizard {
-	    private IStructuredSelection selection;
-
-	    private RtcExportWizardPage mainPage;
-
-	    /**
-	     * Creates a wizard for exporting workspace resources to a zip file.
-	     */
-	    @SuppressWarnings("deprecation")
-		public RtcExportWizard() {
-	        AbstractUIPlugin plugin = (AbstractUIPlugin) Platform.getPlugin(PlatformUI.PLUGIN_ID);
-	        IDialogSettings workbenchSettings = plugin.getDialogSettings();
-	        IDialogSettings section = workbenchSettings.getSection("RtcExportWizard");//$NON-NLS-1$
-	        if (section == null) {
-				section = workbenchSettings.addNewSection("RtcExportWizard");//$NON-NLS-1$
-			}
-	        setDialogSettings(section);
-	    }
-
-	    /* (non-Javadoc)
-	     * Method declared on IWizard.
-	     */
-	    public void addPages() {
-	        super.addPages();
-	        mainPage = new RtcExportWizardPage(selection);
-	        addPage(mainPage);
-	    }
-
-	    /* (non-Javadoc)
-	     * Method declared on IWorkbenchWizard.
-	     */
-	    @SuppressWarnings("unchecked")
-		public void init(IWorkbench workbench, IStructuredSelection currentSelection) {
-	        this.selection = currentSelection;
-	        List selectedResources = IDE.computeSelectedResources(currentSelection);
-	        if (!selectedResources.isEmpty()) {
-	            this.selection = new StructuredSelection(selectedResources);
-	        }
-	        setWindowTitle(IWizardMessageConstants.EXPORT_TITLE);
-	        setNeedsProgressMonitor(true);
-	    }
-
-	    /* (non-Javadoc)
-	     * Method declared on IWizard.
-	     */
-	    public boolean performFinish() {
-	        return mainPage.finish();
-	    }
-}

Deleted: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizardPage.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizardPage.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/wizard/RtcExportWizardPage.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -1,605 +0,0 @@
-package jp.go.aist.rtm.rtcbuilder.ui.wizard;
-
-import java.io.File;
-import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.List;
-
-import jp.go.aist.rtm.rtcbuilder.ui.preference.ExportPreferenceManager;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.dialogs.ErrorDialog;
-import org.eclipse.jface.dialogs.IDialogSettings;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.events.KeyEvent;
-import org.eclipse.swt.events.KeyListener;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.SelectionListener;
-import org.eclipse.swt.graphics.Font;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Button;
-import org.eclipse.swt.widgets.Combo;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.DirectoryDialog;
-import org.eclipse.swt.widgets.Event;
-import org.eclipse.swt.widgets.Group;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Widget;
-import org.eclipse.ui.dialogs.WizardExportResourcesPage;
-import org.eclipse.ui.internal.wizards.datatransfer.ArchiveFileExportOperation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
- at SuppressWarnings("restriction")
-public class RtcExportWizardPage extends	WizardExportResourcesPage {
-
-	private static final Logger LOGGER = LoggerFactory
-			.getLogger(RtcExportWizardPage.class);
-
-    private final static String STORE_DESTINATION_NAMES_ID = "RtcExportWizardPage.STORE_DESTINATION_NAMES_ID"; //$NON-NLS-1$
-    private final static String STORE_CREATE_STRUCTURE_ID = "RtcExportWizardPage.STORE_CREATE_STRUCTURE_ID"; //$NON-NLS-1$
-    private final static String STORE_COMPRESS_CONTENTS_ID = "RtcExportWizardPage.STORE_COMPRESS_CONTENTS_ID"; //$NON-NLS-1$
-
-    private Combo destinationNameField;
-    private Button destinationBrowseButton;
-    //
-    private Button sourceArchiveButton;
-    private Button binaryArchiveButton;
-    private Button sourcebinaryArchiveButton;
-    //
-    private Button compressContentsCheckbox;
-    private Button zipFormatButton;
-//    private Button bzipFormatButton;
-    private Button targzFormatButton;
-    //
-    private Button createDirectoryStructureButton;
-    private Button createSelectionOnlyButton;
-    //
-    private org.eclipse.swt.widgets.List targetProjectList;
-    private IResource[] targetProjects;
-    //
-    private ArrayList<String> sourceExt = new ArrayList<String>();
-    private ArrayList<String> sourceFile = new ArrayList<String>();
-    private ArrayList<String> binaryExt = new ArrayList<String>();
-    private ArrayList<String> binaryFile = new ArrayList<String>();
-    private ArrayList<String> sourcebinaryExt = new ArrayList<String>();
-    private ArrayList<String> sourcebinaryFile = new ArrayList<String>();
-
-    /**
-	 *	Create an instance of this class. 
-	 *
-	 *	@param name java.lang.String
-	 */
-	protected RtcExportWizardPage(String name, IStructuredSelection selection) {
-	    super(name, selection);
-	}
-
-	/**
-	 * Create an instance of this class
-	 * @param selection the selection
-	 */
-	public RtcExportWizardPage(IStructuredSelection selection) {
-	    this("RtcExportPage1", selection); //$NON-NLS-1$
-	    setTitle(IWizardMessageConstants.EXPORT_PAGE_TITLE);
-	    setDescription(IWizardMessageConstants.EXPORT_PAGE_DESCRIPTION);
-	    //
-	    sourceExt = ExportPreferenceManager.getInstance().getExportSourceExt();
-	    sourceFile = ExportPreferenceManager.getInstance().getExportSourceFile();
-	    ////
-	    binaryExt = ExportPreferenceManager.getInstance().getExportBinaryExt();
-	    binaryFile = ExportPreferenceManager.getInstance().getExportBinaryFile();
-	    ////
-	    sourcebinaryExt = ExportPreferenceManager.getInstance().getExportSourceBinaryExt();
-	    sourcebinaryFile = ExportPreferenceManager.getInstance().getExportSourceBinaryFile();
-	}
-
-    /** (non-Javadoc)
-     * Method declared on IDialogPage.
-     */
-    public void createControl(Composite parent) {
-        initializeDialogUnits(parent);
-
-        Composite composite = new Composite(parent, SWT.NULL);
-        composite.setLayout(new GridLayout());
-        composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL
-                | GridData.HORIZONTAL_ALIGN_FILL));
-        composite.setFont(parent.getFont());
-
-    	createTargetProjectGroup(composite);
-    	createDestinationGroup(composite);
-    	createKindGroup(composite);
-    	createOptionsGroup(composite);
-    	
-        restoreWidgetValues();
-
-    	setControl(composite);
-        setPageComplete(false);
-    }
-
-    protected void createOptionsGroup(Composite parent) {
-	    Group optionsGroup = new Group(parent, SWT.NONE);
-        GridLayout layout = new GridLayout();
-        optionsGroup.setLayout(layout);
-        optionsGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL
-                | GridData.GRAB_HORIZONTAL));
-        optionsGroup.setText(IWizardMessageConstants.EXPORT_PAGE_GRP_OPTION);
-        optionsGroup.setFont(parent.getFont());
-    	
-    	Font font = optionsGroup.getFont();
-    	optionsGroup.setLayout(new GridLayout(2, true));
-    	
-    	Composite left = new Composite(optionsGroup, SWT.NONE);
-    	left.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false));
-    	left.setLayout(new GridLayout(1, true));
-
-        createFileFormatOptions(left, font);
-        
-        // compress... checkbox
-        compressContentsCheckbox = new Button(left, SWT.CHECK
-                | SWT.LEFT);
-        compressContentsCheckbox.setText(IWizardMessageConstants.EXPORT_PAGE_CHK_COMPRESS);
-        compressContentsCheckbox.setFont(font);
-
-        Composite right = new Composite(optionsGroup, SWT.NONE);
-        right.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false));
-        right.setLayout(new GridLayout(1, true));
-
-        createDirectoryStructureOptions(right, font);
-
-        // initial setup
-        createDirectoryStructureButton.setSelection(true);
-        createSelectionOnlyButton.setSelection(false);
-        compressContentsCheckbox.setSelection(true);
-    }
-    
-    protected void createDirectoryStructureOptions(Composite optionsGroup, Font font) {
-        createDirectoryStructureButton = new Button(optionsGroup, SWT.RADIO
-                | SWT.LEFT);
-        createDirectoryStructureButton.setText(IWizardMessageConstants.EXPORT_PAGE_BTN_CREATE_DIR);
-        createDirectoryStructureButton.setSelection(false);
-        createDirectoryStructureButton.setFont(font);
-
-        createSelectionOnlyButton = new Button(optionsGroup, SWT.RADIO
-                | SWT.LEFT);
-        createSelectionOnlyButton.setText(IWizardMessageConstants.EXPORT_PAGE_BTN_CREATE_DIR_ONLY);
-        createSelectionOnlyButton.setSelection(true);
-        createSelectionOnlyButton.setFont(font);
-    }
-
-    protected void createFileFormatOptions(Composite optionsGroup, Font font) {
-        zipFormatButton = new Button(optionsGroup, SWT.RADIO | SWT.LEFT);
-        zipFormatButton.setText(IWizardMessageConstants.EXPORT_PAGE_BTN_ZIP);
-        zipFormatButton.setSelection(true);
-        zipFormatButton.setFont(font);
-
-//        bzipFormatButton = new Button(optionsGroup, SWT.RADIO | SWT.LEFT);
-//        bzipFormatButton.setText("BZIPフォーマットで保管");
-//        bzipFormatButton.setSelection(false);
-//        bzipFormatButton.setFont(font);
-
-        targzFormatButton = new Button(optionsGroup, SWT.RADIO | SWT.LEFT);
-        targzFormatButton.setText(IWizardMessageConstants.EXPORT_PAGE_BTN_TAR);
-        targzFormatButton.setSelection(false);
-        targzFormatButton.setFont(font);
-    }    
-
-    protected void createKindGroup(Composite parent) {
-	    Group kindGroup = new Group(parent, SWT.NONE);
-        GridLayout layout = new GridLayout();
-        kindGroup.setLayout(layout);
-        kindGroup.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL
-                | GridData.GRAB_HORIZONTAL));
-        kindGroup.setText(IWizardMessageConstants.EXPORT_PAGE_GRP_ARC);
-        kindGroup.setFont(parent.getFont());
-    	
-    	Font font = kindGroup.getFont();
-    	kindGroup.setLayout(new GridLayout(3, true));
-    	
-        sourceArchiveButton = new Button(kindGroup, SWT.RADIO | SWT.LEFT);
-        sourceArchiveButton.setText(IWizardMessageConstants.EXPORT_PAGE_BTN_SRC);
-        sourceArchiveButton.setSelection(true);
-        sourceArchiveButton.setFont(font);
-
-        binaryArchiveButton = new Button(kindGroup, SWT.RADIO | SWT.LEFT);
-        binaryArchiveButton.setText(IWizardMessageConstants.EXPORT_PAGE_BTN_BIN);
-        binaryArchiveButton.setSelection(false);
-        binaryArchiveButton.setFont(font);
-
-        sourcebinaryArchiveButton = new Button(kindGroup, SWT.RADIO | SWT.LEFT);
-        sourcebinaryArchiveButton.setText(IWizardMessageConstants.EXPORT_PAGE_BTN_SRC_BIN);
-        sourcebinaryArchiveButton.setSelection(false);
-        sourcebinaryArchiveButton.setFont(font);
-    }
-
-    protected void createDestinationGroup(Composite parent) {
-
-        Font font = parent.getFont();
-        // destination specification group
-        Composite destinationSelectionGroup = new Composite(parent, SWT.NONE);
-        GridLayout layout = new GridLayout();
-        layout.numColumns = 3;
-        destinationSelectionGroup.setLayout(layout);
-        destinationSelectionGroup.setLayoutData(new GridData(
-                GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
-        destinationSelectionGroup.setFont(font);
-
-        Label destinationLabel = new Label(destinationSelectionGroup, SWT.NONE);
-        destinationLabel.setText(IWizardMessageConstants.EXPORT_PAGE_LBL_DEST);
-        destinationLabel.setFont(font);
-
-        // destination name entry field
-        destinationNameField = new Combo(destinationSelectionGroup, SWT.SINGLE
-                | SWT.BORDER);
-        destinationNameField.addListener(SWT.Modify, this);
-        destinationNameField.addListener(SWT.Selection, this);
-        GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
-                | GridData.GRAB_HORIZONTAL);
-        data.widthHint = SIZING_TEXT_FIELD_WIDTH;
-        destinationNameField.setLayoutData(data);
-        destinationNameField.setFont(font);
-        destinationNameField.addKeyListener(new KeyListener() {
-			public void keyReleased(KeyEvent e) {
-				doValidate();
-			}
-
-			public void keyPressed(KeyEvent e) {
-			}
-		});
-
-        // destination browse button
-        destinationBrowseButton = new Button(destinationSelectionGroup,
-                SWT.PUSH);
-        destinationBrowseButton.setText(IWizardMessageConstants.EXPORT_PAGE_BTN_DEST);
-        destinationBrowseButton.addListener(SWT.Selection, this);
-        destinationBrowseButton.setFont(font);
-        setButtonLayoutData(destinationBrowseButton);
-
-        new Label(parent, SWT.NONE); // vertical spacer
-    }
-
-    protected void createTargetProjectGroup(Composite parent) {
-
-        Font font = parent.getFont();
-        // destination specification group
-        Composite targetProjectSelectionGroup = new Composite(parent, SWT.NONE);
-        GridLayout layout = new GridLayout();
-        layout.numColumns = 3;
-        targetProjectSelectionGroup.setLayout(layout);
-        targetProjectSelectionGroup.setLayoutData(new GridData(
-                GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
-        targetProjectSelectionGroup.setFont(font);
-
-        Label targetProjectLabel = new Label(targetProjectSelectionGroup, SWT.NONE);
-        targetProjectLabel.setText(IWizardMessageConstants.EXPORT_PAGE_LBL_PJ);
-        targetProjectLabel.setFont(font);
-
-        targetProjectList = new org.eclipse.swt.widgets.List(targetProjectSelectionGroup, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL);
-        GridData gd = new GridData(GridData.FILL_BOTH);
-        gd.heightHint = 80;
-        targetProjectList.setLayoutData(gd);
-        targetProjectList.addSelectionListener(new SelectionListener() {
-
-			public void widgetDefaultSelected(SelectionEvent e) {
-			}
-
-			public void widgetSelected(SelectionEvent e) {
-				doValidate();
-			}
-        });
-        try {
-            IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-			targetProjects = root.members();
-			for(int intIdx=0; intIdx<targetProjects.length; intIdx++) {
-				targetProjectList.add(targetProjects[intIdx].getName());
-			}
-		} catch (CoreException e) {
-			LOGGER.error("Fail to get resources", e);
-		}
-    }
-
-    private void doValidate() {
-    	if( destinationNameField.getText() != null && !destinationNameField.getText().equals("") &&
-    			targetProjectList.getSelectionIndex() >= 0) {
-    		setPageComplete(true);
-    	} else {
-    		setPageComplete(false);
-    	}
-    }
-
-    public void handleEvent(Event event) {
-        Widget source = event.widget;
-
-        if (source == destinationBrowseButton) {
-			handleDestinationBrowseButtonPressed();
-		}
-	}
-
-    protected void handleDestinationBrowseButtonPressed() {
-        DirectoryDialog dialog = new DirectoryDialog(getContainer().getShell(),
-                SWT.SAVE);
-        dialog.setText(IWizardMessageConstants.EXPORT_PAGE_DIR_DLG_TITLE);
-        String selectedDirectoryName = dialog.open();
-
-        if (selectedDirectoryName != null) {
-            setErrorMessage(null);
-            destinationNameField.setText(selectedDirectoryName);
-            doValidate();
-        }
-    }
-
-    @SuppressWarnings({ "unchecked" })
-	public boolean finish() {
-    	List resourcesToExport = getTargetResources();
-    	
-        if (!ensureTargetIsValid()) {
-			return false;
-		}
-
-//        //Save dirty editors if possible but do not stop if not all are saved
-        saveDirtyEditors();
-        // about to invoke the operation so save our state
-        saveWidgetValues();
-
-        return executeExportOperation(new ArchiveFileExportOperation(null,
-                resourcesToExport, getDestinationValue()));
-    }
-    
-	protected boolean executeExportOperation(ArchiveFileExportOperation op) {
-        op.setCreateLeadupStructure(createDirectoryStructureButton
-                .getSelection());
-        op.setUseCompression(compressContentsCheckbox.getSelection());
-        op.setUseTarFormat(targzFormatButton.getSelection());
-
-        try {
-            getContainer().run(true, true, op);
-        } catch (InterruptedException e) {
-            return false;
-        } catch (InvocationTargetException e) {
-            displayErrorDialog(e.getTargetException());
-            return false;
-        }
-
-        IStatus status = op.getStatus();
-        if (!status.isOK()) {
-            ErrorDialog.openError(getContainer().getShell(),
-            		IWizardMessageConstants.EXPORT_PAGE_MSG_EXPORT_PROBLEM,
-                    null, // no special message
-                    status);
-            return false;
-        }
-        MessageDialog.openInformation(getContainer().getShell(), IWizardMessageConstants.EXPORT_PAGE_DLG_TITLE, IWizardMessageConstants.EXPORT_PAGE_MSG_FINISH);
-
-        return true;
-    }
-    
-    @SuppressWarnings("unchecked")
-	private List getTargetResources() {
-    	List resourceList = new ArrayList();
-    	ArrayList<String> targetExt = new ArrayList<String>();
-    	ArrayList<String> targetFile = new ArrayList<String>();
-    	
-    	if( sourceArchiveButton.getSelection() ) {
-    		targetExt = sourceExt;
-    		targetFile = sourceFile;
-    	} else if( binaryArchiveButton.getSelection()) {
-    		targetExt = binaryExt;
-    		targetFile = binaryFile;
-    	} else if( sourcebinaryArchiveButton.getSelection()) {
-    		targetExt = sourcebinaryExt;
-    		targetFile = sourcebinaryFile;
-    	}
-    	//
-    	try {
-        	IProject targetProject = (IProject)targetProjects[targetProjectList.getSelectionIndex()];
-			IResource[] targets = targetProject.members();
-			searchTarget(resourceList, targetExt, targetFile, targets);
-		} catch (CoreException e) {
-			LOGGER.error("Fail to get resources", e);
-		}
-    	return resourceList;
-    }
-    
-    @SuppressWarnings("unchecked")
-	private void searchTarget(List resourceList, ArrayList<String> targetExt, ArrayList<String> targetFile,
-    							IResource[] sourceRes) {
-
-    	for(int intIdx=0;intIdx<sourceRes.length;intIdx++) {
-			if( sourceRes[intIdx].getType() == IResource.FILE ) {
-				if( targetExt.contains(sourceRes[intIdx].getFileExtension()) ) {
-					resourceList.add(sourceRes[intIdx]);
-				}
-				for( String filename : targetFile ) {
-					if( sourceRes[intIdx].getName().startsWith(filename) ) {
-						resourceList.add(sourceRes[intIdx]);
-						break;
-					}
-				}
-			} else if( sourceRes[intIdx].getType() == IResource.FOLDER ) {
-				try {
-					IResource[] resources = ((IFolder)sourceRes[intIdx]).members();
-					searchTarget(resourceList, targetExt, targetFile, resources);
-				} catch (CoreException e) {
-					LOGGER.error("Fail to search resources.", e);
-				}
-			}
-		}
-    }
-    
-    private boolean ensureTargetIsValid() {
-        String targetPath = getDestinationValue();
-
-        if (!ensureTargetDirectoryIsValid(targetPath)) {
-			return false;
-		}
-
-        if (!ensureTargetFileIsValid(new File(targetPath))) {
-			return false;
-		}
-
-        return true;
-    }
-
-    private String getDestinationValue() {
-        String idealSuffix = getOutputSuffix();
-        String destinationText = destinationNameField.getText().trim();
-
-        // only append a suffix if the destination doesn't already have a . in 
-        // its last path segment.  
-        // Also prevent the user from selecting a directory.  Allowing this will 
-        // create a ".zip" file in the directory
-        if (destinationText.length() != 0
-                && !destinationText.endsWith(File.separator)) {
-            int dotIndex = destinationText.lastIndexOf('.');
-            if (dotIndex != -1) {
-                // the last path seperator index
-                int pathSepIndex = destinationText.lastIndexOf(File.separator);
-                if (pathSepIndex != -1 && dotIndex < pathSepIndex) {
-                    destinationText += File.separator + targetProjects[targetProjectList.getSelectionIndex()].getName() + idealSuffix;
-                }
-            } else {
-                destinationText += File.separator + targetProjects[targetProjectList.getSelectionIndex()].getName() + idealSuffix;
-            }
-        }
-        
-        File check = new File(destinationText);
-        if(!check.isAbsolute()) {
-            IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
-            destinationText = root.getLocation() + File.separator + destinationText;
-        }
-        
-        return destinationText;
-    }
-
-    private String getOutputSuffix() {
-    	if(zipFormatButton.getSelection()) {
-        	return ".zip"; //$NON-NLS-1$
-//    	} else if(bzipFormatButton.getSelection()) {
-//            	return ".bz2"; //$NON-NLS-1$
-    	} else if(compressContentsCheckbox.getSelection()) {
-    		return ".tar.gz"; //$NON-NLS-1$
-    	} else {
-    		return ".tar"; //$NON-NLS-1$
-    	}
-    }
-    
-    private boolean ensureTargetFileIsValid(File targetFile) {
-        if (targetFile.exists() && targetFile.isDirectory()) {
-            displayErrorDialog(IWizardMessageConstants.EXPORT_PAGE_MSG_FILE_ERR);
-            destinationNameField.setFocus();
-            return false;
-        }
-
-        if (targetFile.exists()) {
-            if (targetFile.canWrite()) {
-                if (!queryYesNoQuestion(IWizardMessageConstants.EXPORT_PAGE_MSG_WRITE_YN)) {
-					return false;
-				}
-            } else {
-                displayErrorDialog(IWizardMessageConstants.EXPORT_PAGE_MSG_CANNOT_WRITE_ERR);
-                destinationNameField.setFocus();
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    private boolean ensureTargetDirectoryIsValid(String fullPathname) {
-        int separatorIndex = fullPathname.lastIndexOf(File.separator);
-
-        if (separatorIndex == -1) {
-			return true;
-		}
-
-        return ensureTargetIsValid(new File(fullPathname.substring(0,
-                separatorIndex)));
-    }
-
-    private boolean ensureTargetIsValid(File targetDirectory) {
-        if (targetDirectory.exists() && !targetDirectory.isDirectory()) {
-            displayErrorDialog(IWizardMessageConstants.EXPORT_PAGE_MSG_EXISTS_ERR);
-            destinationNameField.setFocus();
-            return false;
-        }
-
-        return ensureDirectoryExists(targetDirectory);
-    }
-
-    private boolean ensureDirectoryExists(File directory) {
-        if (!directory.exists()) {
-            if (!queryYesNoQuestion(IWizardMessageConstants.EXPORT_PAGE_MSG_CREATE_YN)) {
-				return false;
-			}
-
-            if (!directory.mkdirs()) {
-                displayErrorDialog(IWizardMessageConstants.EXPORT_PAGE_MSG_CANNOT_CREATE_ERR);
-                destinationNameField.setFocus();
-                return false;
-            }
-        }
-        return true;
-    }
-
-    protected void internalSaveWidgetValues() {
-        // update directory names history
-        IDialogSettings settings = getDialogSettings();
-        if (settings != null) {
-            String[] directoryNames = settings
-                    .getArray(STORE_DESTINATION_NAMES_ID);
-            if (directoryNames == null) {
-				directoryNames = new String[0];
-			}
-
-            directoryNames = addToHistory(directoryNames, destinationNameField.getText().trim());
-            settings.put(STORE_DESTINATION_NAMES_ID, directoryNames);
-
-            settings.put(STORE_CREATE_STRUCTURE_ID,
-                    createDirectoryStructureButton.getSelection());
-
-            settings.put(STORE_COMPRESS_CONTENTS_ID, compressContentsCheckbox
-                    .getSelection());
-        }
-    }
-    
-    protected void restoreWidgetValues() {
-        IDialogSettings settings = getDialogSettings();
-        if (settings != null) {
-            String[] directoryNames = settings
-                    .getArray(STORE_DESTINATION_NAMES_ID);
-            if (directoryNames == null || directoryNames.length == 0) {
-				return;
-			}
-
-            // destination
-            setDestinationValue(directoryNames[0]);
-            for (int i = 0; i < directoryNames.length; i++) {
-				addDestinationItem(directoryNames[i]);
-			}
-
-            boolean setStructure = settings
-                    .getBoolean(STORE_CREATE_STRUCTURE_ID);
-
-            createDirectoryStructureButton.setSelection(setStructure);
-            createSelectionOnlyButton.setSelection(!setStructure);
-
-            compressContentsCheckbox.setSelection(settings
-                    .getBoolean(STORE_COMPRESS_CONTENTS_ID));
-        }
-    }
-
-    protected void addDestinationItem(String value) {
-        destinationNameField.add(value);
-    }
-    protected void setDestinationValue(String value) {
-        destinationNameField.setText(value);
-    }
-}

Modified: branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/util/FileUtil.java
===================================================================
--- branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/util/FileUtil.java	2017-02-19 06:12:44 UTC (rev 684)
+++ branches/FSM4RTC/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/util/FileUtil.java	2017-02-19 06:13:36 UTC (rev 685)
@@ -102,7 +102,12 @@
 			result = new StringBuffer();
             String ch;
             String sep = System.getProperty("line.separator");
+            boolean firstLine = true;
             while ((ch = br.readLine() ) != null) {
+            	if (firstLine) {
+            		ch = removeUTF8BOM(ch);
+                    firstLine = false;
+                }            	
             	result.append(ch + sep);
             }
             br.close();
@@ -115,6 +120,13 @@
 		return result == null ? null : result.toString();
 	}
 	
+	private static String removeUTF8BOM(String s) {
+		String UTF8_BOM = "\uFEFF";		
+        if (s.startsWith(UTF8_BOM)) {
+            s = s.substring(1);
+        }
+        return s;
+    }
 	/**
 	 * バックアップファイルの整理を行う
 	 * 



openrtm-commit メーリングリストの案内