[openrtm-commit:00879] r340 - in trunk/rtmtools/jp.go.aist.rtm.rtcbuilder: src/jp/go/aist/rtm/rtcbuilder src/jp/go/aist/rtm/rtcbuilder/generator src/jp/go/aist/rtm/rtcbuilder/generator/param src/jp/go/aist/rtm/rtcbuilder/nl src/jp/go/aist/rtm/rtcbuilder/ui/editors src/jp/go/aist/rtm/rtcbuilder/ui/preference test/jp/go/aist/rtm/rtcbuilder/_test/com
openrtm @ openrtm.org
openrtm @ openrtm.org
2012年 8月 10日 (金) 14:23:57 JST
Author:
Date: 2012-08-10 14:23:57 +0900 (Fri, 10 Aug 2012)
New Revision: 340
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/IDLParamConverter.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/RtcParam.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties
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/IMessageConstants.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DataTypePreferenceManager.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseInheritTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseTest.java
trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseTypeTest.java
Log:
Modified IDL Parse Error Message and IDL Pathes
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-08-05 09:00:17 UTC (rev 339)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/Generator.java 2012-08-10 05:23:57 UTC (rev 340)
@@ -35,6 +35,7 @@
import jp.go.aist.rtm.rtcbuilder.manager.CommonGenerateManager;
import jp.go.aist.rtm.rtcbuilder.manager.GenerateManager;
import jp.go.aist.rtm.rtcbuilder.ui.editors.IMessageConstants;
+import jp.go.aist.rtm.rtcbuilder.ui.preference.DataTypePreferenceManager;
import jp.go.aist.rtm.rtcbuilder.util.FileUtil;
import jp.go.aist.rtm.rtcbuilder.util.StringUtil;
import jp.go.aist.rtm.rtcbuilder.util.ValidationUtil;
@@ -118,14 +119,22 @@
}
}
rtcParam.checkAndSetParameter();
+ rtcParam.getIdlPathes().clear();
for( ServicePortParam serviceport : rtcParam.getServicePorts() ) {
for( ServicePortInterfaceParam serviceInterfaces : serviceport.getServicePortInterfaces() ) {
- if( !IDLPathes.contains(serviceInterfaces.getIdlFullPath()) )
+ if( !IDLPathes.contains(serviceInterfaces.getIdlFullPath()) ) {
IDLPathes.add(serviceInterfaces.getIdlFullPath());
IDLPathParams.add(new ServiceClassParam(serviceInterfaces.getIdlFullPath(),
serviceInterfaces.getIdlSearchPath()));
+ }
+ if( 0<serviceInterfaces.getIdlSearchPath().length() &&
+ rtcParam.getIdlPathes().contains(serviceInterfaces.getIdlSearchPath())==false) {
+ rtcParam.getIdlPathes().add(serviceInterfaces.getIdlSearchPath());
+ }
}
}
+ rtcParam.getIdlPathes().addAll(DataTypePreferenceManager.getInstance().getIdlFileDirectories());
+
rtcServiceClasses.addAll(getRtcServiceClass(rtcParam, IDLPathParams));
checkReferencedServiceParam(rtcServiceClasses, rtcParam);
List<ServiceClassParam> serviceClassParamList = new ArrayList<ServiceClassParam>();
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/IDLParamConverter.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/IDLParamConverter.java 2012-08-05 09:00:17 UTC (rev 339)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/IDLParamConverter.java 2012-08-10 05:23:57 UTC (rev 340)
@@ -311,9 +311,8 @@
return builder.toString();
}
- public static List<String> extractTypeDef(List<DataTypeParam> sources) {
- List<String> result = new ArrayList<String>();
-
+ public static boolean extractTypeDef(List<DataTypeParam> sources, List<String> result) {
+ boolean ret = true;
for( Iterator<DataTypeParam> iter = sources.iterator(); iter.hasNext(); ) {
DataTypeParam targetParam = iter.next();
String targetContent = targetParam.getContent();
@@ -323,6 +322,7 @@
try {
spec = parser.specification();
} catch (ParseException e) {
+ ret = false;
continue;
}
List<String> types = parseForTypeDef(spec);
@@ -335,7 +335,7 @@
targetParam.getDefinedTypes().add(resultType);
}
}
- return result;
+ return ret;
}
private static List<String> parseForTypeDef(specification spec) {
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/RtcParam.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/RtcParam.java 2012-08-05 09:00:17 UTC (rev 339)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/generator/param/RtcParam.java 2012-08-10 05:23:57 UTC (rev 340)
@@ -91,6 +91,7 @@
private List<String> originalConsumerIdls = new ArrayList<String>();
private List<String> includedIdls = new ArrayList<String>();
+ private List<String> idlPathes = new ArrayList<String>();
private RecordedList<String> privateAttributes = new RecordedList<String>();
private RecordedList<String> protectedAttributes = new RecordedList<String>();
@@ -576,6 +577,9 @@
}
return result;
}
+ public List<String> getIdlPathes() {
+ return idlPathes;
+ }
//
public String getCommonPrefix() {
if(commonPrefix==null) commonPrefix = "m_";
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties 2012-08-05 09:00:17 UTC (rev 339)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/nl/messages.properties 2012-08-10 05:23:57 UTC (rev 340)
@@ -423,6 +423,7 @@
IMessageConstants.SELECT_DIRECTORY=Select Output directory
IMessageConstants.SAVE_MESSAGE=Current project has been modified. Save changes?
+IMessageConstants.IDL_PARSE_EROOR=IDL file parse ERROR!
IRTCBMessageConstants.VALIDATE_ERROR_OUTPUTPROJECT=No OutputProject is specified.
IRTCBMessageConstants.VALIDATE_ERROR_COMPONENTNAME=No Component Name is specified.
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 2012-08-05 09:00:17 UTC (rev 339)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/AbstractEditorFormPage.java 2012-08-10 05:23:57 UTC (rev 340)
@@ -16,6 +16,7 @@
import jp.go.aist.rtm.rtcbuilder.ui.preference.DataTypePreferenceManager;
import jp.go.aist.rtm.rtcbuilder.util.FileUtil;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.TableViewerColumn;
@@ -42,6 +43,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.TableColumn;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.IManagedForm;
@@ -507,8 +509,10 @@
}
}
String[] defaultTypeList = new String[0];
- List<String> dataTypes = IDLParamConverter
- .extractTypeDef(sourceContents);
+ List<String> dataTypes = new ArrayList<String>();
+ if( IDLParamConverter.extractTypeDef(sourceContents, dataTypes)==false ) {
+ MessageDialog.openWarning(RtcBuilderPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(), "IDL Parse", IMessageConstants.IDL_PARSE_EROOR);
+ }
defaultTypeList = new String[dataTypes.size()];
defaultTypeList = dataTypes.toArray(defaultTypeList);
//
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java 2012-08-05 09:00:17 UTC (rev 339)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/editors/IMessageConstants.java 2012-08-10 05:23:57 UTC (rev 340)
@@ -467,4 +467,5 @@
public static final String SELECT_DIRECTORY = Messages.getString("IMessageConstants.SELECT_DIRECTORY"); //$NON-NLS-1$
public static final String SAVE_MESSAGE = Messages.getString("IMessageConstants.SAVE_MESSAGE"); //$NON-NLS-1$
+ public static final String IDL_PARSE_EROOR = Messages.getString("IMessageConstants.IDL_PARSE_EROOR"); //$NON-NLS-1$
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DataTypePreferenceManager.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DataTypePreferenceManager.java 2012-08-05 09:00:17 UTC (rev 339)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/src/jp/go/aist/rtm/rtcbuilder/ui/preference/DataTypePreferenceManager.java 2012-08-10 05:23:57 UTC (rev 340)
@@ -39,10 +39,12 @@
* @return IDLFile Directories デフォルト値
*/
public List<String> getIdlFileDirectories() {
+ List<String> result = new ArrayList<String>();
+ if(RtcBuilderPlugin.getDefault()==null) return result;
RtcBuilderPlugin.getDefault().getPreferenceStore().setDefault(IDLFILE_DIRECTORIES, "");
String resultTemp = RtcBuilderPlugin.getDefault().getPreferenceStore().getString(IDLFILE_DIRECTORIES);
- List<String> result = Arrays.asList(resultTemp.split(File.pathSeparator));
+ result = Arrays.asList(resultTemp.split(File.pathSeparator));
if (resultTemp.equals("")) { // defaultvalue
result = defaultIdlFileDirectories;
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseInheritTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseInheritTest.java 2012-08-05 09:00:17 UTC (rev 339)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseInheritTest.java 2012-08-10 05:23:57 UTC (rev 340)
@@ -37,7 +37,7 @@
assertEquals("getGain", serviceClassParams.get(1).getMethods().get(3).getName());
//
assertEquals(1, includeFiles.size());
- assertEquals("C:\\GlobalAssist\\EclipseAISTRep\\jp.go.aist.rtm.rtcbuilder\\resource\\IDL\\MyServiceParent.idl",
+ assertEquals("D:\\GlobalAssist\\EclipseAISTRep\\jp.go.aist.rtm.rtcbuilder\\resource\\IDL\\MyServiceParent.idl",
includeFiles.get(0));
}
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseTest.java 2012-08-05 09:00:17 UTC (rev 339)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseTest.java 2012-08-10 05:23:57 UTC (rev 340)
@@ -12,6 +12,7 @@
public void testDuplicate() throws Exception{
List<DataTypeParam> sourceContents = new ArrayList<DataTypeParam>();
+ List<String> dataTypes = new ArrayList<String>();
sourceContents.add(new DataTypeParam(rootPath + "\\resource\\IDL\\DupliDataTypes1.idl"));
sourceContents.add(new DataTypeParam(rootPath + "\\resource\\IDL\\DupliDataTypes2.idl"));
@@ -21,7 +22,7 @@
}
try {
- IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, dataTypes);
} catch (Exception e) {
fail();
}
@@ -38,7 +39,7 @@
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(7, results.size());
assertTrue(results.contains("RTC::MyData"));
@@ -60,7 +61,7 @@
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(2, results.size());
assertTrue(results.contains("RTC::MyData"));
@@ -77,7 +78,7 @@
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(2, results.size());
assertTrue(results.contains("Time"));
@@ -93,7 +94,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(5, results.size());
assertTrue(results.contains("Time"));
@@ -112,7 +113,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(0, results.size());
}
@@ -125,7 +126,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(5, results.size());
assertTrue(results.contains("RTC::Time"));
@@ -144,7 +145,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(22, results.size());
assertTrue(results.contains("RTC::Time"));
@@ -180,7 +181,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(22, results.size());
assertTrue(results.contains("RTC::Time"));
@@ -216,7 +217,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(1, results.size());
assertTrue(results.contains("RTC::Time"));
@@ -224,6 +225,7 @@
public void testError() throws Exception{
List<DataTypeParam> sourceContents = new ArrayList<DataTypeParam>();
+ List<String> results = new ArrayList<String>();
sourceContents.add(new DataTypeParam(rootPath + "\\resource\\IDL\\Error.idl"));
for(int intidx=0;intidx<sourceContents.size();intidx++) {
@@ -231,7 +233,7 @@
sourceContents.get(intidx).setContent(idlContent);
}
try {
- IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
} catch (Exception ex) {
System.out.println("Error");
fail();
Modified: trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseTypeTest.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseTypeTest.java 2012-08-05 09:00:17 UTC (rev 339)
+++ trunk/rtmtools/jp.go.aist.rtm.rtcbuilder/test/jp/go/aist/rtm/rtcbuilder/_test/com/CORBAParseTypeTest.java 2012-08-10 05:23:57 UTC (rev 340)
@@ -19,7 +19,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(9, results.size());
assertTrue(results.contains("SDOPackage::NameValue"));
@@ -43,7 +43,7 @@
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(2, results.size());
assertTrue(results.contains("RTM::ModuleProfile"));
@@ -60,7 +60,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(2, results.size());
assertTrue(results.contains("RTC::Time"));
@@ -69,6 +69,7 @@
public void testDuplicate() throws Exception{
List<DataTypeParam> sourceContents = new ArrayList<DataTypeParam>();
+ List<String> results = new ArrayList<String>();
sourceContents.add(new DataTypeParam(rootPath + "\\resource\\IDL\\DupliDataTypes1.idl"));
sourceContents.add(new DataTypeParam(rootPath + "\\resource\\IDL\\DupliDataTypes2.idl"));
@@ -78,7 +79,7 @@
}
try {
- IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
} catch (Exception e) {
fail();
}
@@ -94,7 +95,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(7, results.size());
assertTrue(results.contains("RTC::MyData"));
@@ -115,7 +116,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(2, results.size());
assertTrue(results.contains("RTC::MyData"));
@@ -131,7 +132,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(2, results.size());
assertTrue(results.contains("Time"));
@@ -147,7 +148,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(5, results.size());
assertTrue(results.contains("Time"));
@@ -166,7 +167,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(0, results.size());
}
@@ -179,7 +180,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(5, results.size());
assertTrue(results.contains("RTC::Time"));
@@ -198,7 +199,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(22, results.size());
assertTrue(results.contains("RTC::Time"));
@@ -234,7 +235,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(22, results.size());
assertTrue(results.contains("RTC::Time"));
@@ -270,7 +271,7 @@
String idlContent = FileUtil.readFile(sourceContents.get(intidx).getFullPath());
sourceContents.get(intidx).setContent(idlContent);
}
- results = IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
assertEquals(1, results.size());
assertTrue(results.contains("RTC::Time"));
@@ -278,6 +279,7 @@
public void testError() throws Exception{
List<DataTypeParam> sourceContents = new ArrayList<DataTypeParam>();
+ List<String> results = new ArrayList<String>();
sourceContents.add(new DataTypeParam(rootPath + "\\resource\\IDL\\Error.idl"));
for(int intidx=0;intidx<sourceContents.size();intidx++) {
@@ -285,7 +287,7 @@
sourceContents.get(intidx).setContent(idlContent);
}
try {
- IDLParamConverter.extractTypeDef(sourceContents);
+ IDLParamConverter.extractTypeDef(sourceContents, results);
} catch (Exception ex) {
fail();
System.out.println("Error");
More information about the openrtm-commit
mailing list