[openrtm-commit:01992] r633 - trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl
openrtm @ openrtm.org
openrtm @ openrtm.org
2016年 6月 26日 (日) 11:38:48 JST
Author: ga
Date: 2016-06-26 11:38:48 +0900 (Sun, 26 Jun 2016)
New Revision: 633
Modified:
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaComponentImpl.java
Log:
Modified ConfigrationParameter restoration process
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaComponentImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaComponentImpl.java 2016-05-26 06:34:13 UTC (rev 632)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaComponentImpl.java 2016-06-26 02:38:48 UTC (rev 633)
@@ -1005,53 +1005,29 @@
* <!-- end-user-doc -->
* @generated NOT
*/
- @SuppressWarnings("unchecked")
@Override
public boolean updateConfigurationSetListR(List localConfigurationSets,
- ConfigurationSet localActiveConfigurationSet,
- List originalConfigurationSets) {
-
+ ConfigurationSet localActiveConfigurationSet, List originalConfigurationSets) {
try {
- _SDOPackage.Configuration configuration = getCorbaObjectInterface()
- .get_configuration();
+ _SDOPackage.Configuration configuration = getCorbaObjectInterface().get_configuration();
for (Object o : localConfigurationSets) {
ConfigurationSet local = (ConfigurationSet) o;
- ConfigurationSet updated = null;
- for (Object o2 : originalConfigurationSets) {
- ConfigurationSet original = (ConfigurationSet) o2;
- if (local.getId().equals(original.getId())) {
- updated = ComponentFactory.eINSTANCE
- .createConfigurationSet();
- updated.setId(local.getId());
- for (int i = 0; i < local.getConfigurationData().size(); i++) {
- NameValue lnv = (NameValue) local
- .getConfigurationData().get(i);
- NameValue onv = (NameValue) original
- .getConfigurationData().get(i);
- if (!lnv.getName().equals(onv.getName())) {
- updated.getConfigurationData().add(lnv);
- } else if (!lnv.getValueAsString().equals(
- onv.getValueAsString())) {
- updated.getConfigurationData().add(lnv);
- }
- }
- break;
- }
+ ConfigurationSet updated = ComponentFactory.eINSTANCE.createConfigurationSet();
+ updated.setId(local.getId());
+ for (int i = 0; i < local.getConfigurationData().size(); i++) {
+ NameValue lnv = (NameValue) local.getConfigurationData().get(i);
+ NameValue nv = ComponentFactory.eINSTANCE.createNameValue();
+ nv.setName(lnv.getName());
+ nv.setValue(lnv.getValue());
+ updated.getConfigurationData().add(nv);
}
- if (updated != null
- && !updated.getConfigurationData().isEmpty()) {
- boolean result = configuration
- .set_configuration_set_values(SDOUtil
- .createSdoConfigurationSet(updated));
- if (!result) {
- return false;
- }
+ boolean result = configuration.set_configuration_set_values(SDOUtil.createSdoConfigurationSet(updated));
+ if (!result) {
+ return false;
}
}
if (localActiveConfigurationSet != null) {
- boolean result = configuration
- .activate_configuration_set(localActiveConfigurationSet
- .getId());
+ boolean result = configuration.activate_configuration_set(localActiveConfigurationSet.getId());
if (!result) {
return false;
}
More information about the openrtm-commit
mailing list