[openrtm-commit:00911] r372 - trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder
openrtm @ openrtm.org
openrtm @ openrtm.org
2012年 11月 20日 (火) 22:22:59 JST
Author:
Date: 2012-11-20 22:22:59 +0900 (Tue, 20 Nov 2012)
New Revision: 372
Modified:
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java
Log:
Modified for CUIBuilder
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java 2012-11-17 04:17:07 UTC (rev 371)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java 2012-11-20 13:22:59 UTC (rev 372)
@@ -96,7 +96,7 @@
* IDLのパースに失敗した場合など
*/
public List<GeneratedResult> generateTemplateCode(
- GeneratorParam generatorParam, String idlDir, boolean validateFlag)
+ GeneratorParam generatorParam, List<String> idlDir, boolean validateFlag)
throws Exception {
if( validateFlag ) {
@@ -135,7 +135,7 @@
}
rtcParam.getIdlPathes().addAll(DataTypePreferenceManager.getInstance().getIdlFileDirectories());
if(idlDir!=null) {
- rtcParam.getIdlPathes().add(idlDir);
+ rtcParam.getIdlPathes().addAll(idlDir);
}
rtcServiceClasses.addAll(getRtcServiceClass(rtcParam, IDLPathParams));
@@ -288,7 +288,29 @@
List<String> incs = new ArrayList<String>();
String idl = null;
try {
- String idlContent = FileUtil.readFile(sv.getName());
+ String fileName = sv.getName();
+ File file = new File(fileName);
+ if(file.exists()==false) {
+ for(String path : rtcParam.getIdlPathes()) {
+ String fullName = path + File.separator + fileName;
+ file = new File(fullName);
+ if(file.exists()) {
+ for( IdlFileParam idlFile : rtcParam.getProviderIdlPathes() ) {
+ if( idlFile.getIdlFile().equals(fileName) ) {
+ idlFile.setIdlPath(fullName);
+ }
+ }
+ for( IdlFileParam idlFile : rtcParam.getConsumerIdlPathes() ) {
+ if( idlFile.getIdlFile().equals(fileName) ) {
+ idlFile.setIdlPath(fullName);
+ }
+ }
+ fileName = fullName;
+ break;
+ }
+ }
+ }
+ String idlContent = FileUtil.readFile(fileName);
if (idlContent == null) continue;
idl = PreProcessor.parse(idlContent, getIncludeIDLDic(sv.getIdlPath()), incs);
} catch (IOException e) {
More information about the openrtm-commit
mailing list