[openrtm-commit:00117] r180 - in trunk/rtmtools: jp.go.aist.rtm.systemeditor/test/jp/go/aist/rtm/systemeditor/ui/views/configurationview/mock jp.go.aist.rtm.toolscommon jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/adapterfactory jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter jp.go.aist.rtm.toolscommon/text
openrtm @ openrtm.org
openrtm @ openrtm.org
2011年 5月 27日 (金) 18:35:28 JST
Author: ta
Date: 2011-05-27 18:35:28 +0900 (Fri, 27 May 2011)
New Revision: 180
Added:
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PropertyMapPropertySource.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PropertyMapWorkbenchAdapter.java
Removed:
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/IPropertyMapUtil.java
Modified:
trunk/rtmtools/jp.go.aist.rtm.systemeditor/test/jp/go/aist/rtm/systemeditor/ui/views/configurationview/mock/ComponentMock.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/plugin.xml
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/adapterfactory/WorkbenchAdapterFactory.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component.ecore
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/ComponentPackage.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/IPropertyMap.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentImpl.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentPackageImpl.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentSpecificationImpl.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ConnectorProfileImpl.java
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/CorbaConnectorProfileImpl.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaObserverImpl.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaPortSynchronizerImpl.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ExecutionContextImpl.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/PortSynchronizerImpl.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/SystemDiagramImpl.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/ComponentSwitch.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/CorbaPropertyMap.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/PropertyMap.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/ComponentPropertySource.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/ComponentSpecificationPropertySource.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/CorbaObserverPropertySource.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PortConnectorPropertySource.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PortPropertySource.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/SystemDiagramPropertySource.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/ComponentWorkbenchAdapter.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/CorbaObserverWorkbenchAdapter.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/ExecutionContextWorkbenchAdapter.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PortConnectorWorkbenchAdapter.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PortWorkbenchAdapter.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/SystemDiagramWorkbenchAdapter.java
trunk/rtmtools/jp.go.aist.rtm.toolscommon/text/description.txt
Log:
change display properties on propertyview.
Modified: trunk/rtmtools/jp.go.aist.rtm.systemeditor/test/jp/go/aist/rtm/systemeditor/ui/views/configurationview/mock/ComponentMock.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.systemeditor/test/jp/go/aist/rtm/systemeditor/ui/views/configurationview/mock/ComponentMock.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.systemeditor/test/jp/go/aist/rtm/systemeditor/ui/views/configurationview/mock/ComponentMock.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -7,6 +7,7 @@
import jp.go.aist.rtm.toolscommon.model.component.ConfigurationSet;
import jp.go.aist.rtm.toolscommon.model.component.ContextHandler;
import jp.go.aist.rtm.toolscommon.model.component.ExecutionContext;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.InPort;
import jp.go.aist.rtm.toolscommon.model.component.NameValue;
import jp.go.aist.rtm.toolscommon.model.component.OutPort;
@@ -598,4 +599,10 @@
// TODO Auto-generated method stub
}
+ @Override
+ public IPropertyMap getPropertyMap() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/plugin.xml
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/plugin.xml 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/plugin.xml 2011-05-27 09:35:28 UTC (rev 180)
@@ -82,6 +82,11 @@
</factory>
<factory
class="jp.go.aist.rtm.toolscommon.adapterfactory.WorkbenchAdapterFactory"
+ adaptableType="jp.go.aist.rtm.toolscommon.model.component.IPropertyMap">
+ <adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
+ </factory>
+ <factory
+ class="jp.go.aist.rtm.toolscommon.adapterfactory.WorkbenchAdapterFactory"
adaptableType="jp.go.aist.rtm.toolscommon.model.component.CorbaObserver">
<adapter type="org.eclipse.ui.model.IWorkbenchAdapter"/>
</factory>
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/adapterfactory/WorkbenchAdapterFactory.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/adapterfactory/WorkbenchAdapterFactory.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/adapterfactory/WorkbenchAdapterFactory.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -4,6 +4,7 @@
import jp.go.aist.rtm.toolscommon.model.component.ContextHandler;
import jp.go.aist.rtm.toolscommon.model.component.CorbaObserver;
import jp.go.aist.rtm.toolscommon.model.component.ExecutionContext;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.InPort;
import jp.go.aist.rtm.toolscommon.model.component.OutPort;
import jp.go.aist.rtm.toolscommon.model.component.PortConnector;
@@ -19,6 +20,7 @@
import jp.go.aist.rtm.toolscommon.ui.workbenchadapter.OutPortWorkbenchAdapter;
import jp.go.aist.rtm.toolscommon.ui.workbenchadapter.PortConnectorWorkbenchAdapter;
import jp.go.aist.rtm.toolscommon.ui.workbenchadapter.PortInterfaceProfileWorkbenchAdapter;
+import jp.go.aist.rtm.toolscommon.ui.workbenchadapter.PropertyMapWorkbenchAdapter;
import jp.go.aist.rtm.toolscommon.ui.workbenchadapter.RTCManagerWorkbenchAdapter;
import jp.go.aist.rtm.toolscommon.ui.workbenchadapter.ServicePortWorkbenchAdapter;
import jp.go.aist.rtm.toolscommon.ui.workbenchadapter.SystemDiagramWorkbenchAdapter;
@@ -54,6 +56,8 @@
return new CorbaObserverWorkbenchAdapter();
} else if (adaptable instanceof SystemDiagram) {
return new SystemDiagramWorkbenchAdapter();
+ } else if (adaptable instanceof IPropertyMap) {
+ return new PropertyMapWorkbenchAdapter();
} else if (adaptable instanceof RTCManager) {
return new RTCManagerWorkbenchAdapter();
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/ComponentPackage.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/ComponentPackage.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/ComponentPackage.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -1480,7 +1480,7 @@
* @generated
* @ordered
*/
- int IPROPERTY_MAP_FEATURE_COUNT = 0;
+ int IPROPERTY_MAP_FEATURE_COUNT = CorePackage.IADAPTABLE_FEATURE_COUNT + 0;
/**
* The meta object id for the '{@link jp.go.aist.rtm.toolscommon.model.component.impl.EIntegerObjectToPointMapEntryImpl <em>EInteger Object To Point Map Entry</em>}' class.
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/IPropertyMap.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/IPropertyMap.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/IPropertyMap.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -6,6 +6,7 @@
*/
package jp.go.aist.rtm.toolscommon.model.component;
+import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
@@ -17,10 +18,10 @@
*
*
* @see jp.go.aist.rtm.toolscommon.model.component.ComponentPackage#getIPropertyMap()
- * @model interface="true" abstract="true"
+ * @model interface="true" abstract="true" superTypes="jp.go.aist.rtm.toolscommon.model.core.IAdaptable"
* @generated
*/
-public interface IPropertyMap extends EObject {
+public interface IPropertyMap extends EObject, IAdaptable {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -53,4 +54,12 @@
*/
EList<String> getPropertyKeys();
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ IPropertyMap getPropertyMap();
+
} // IPropertyMap
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentImpl.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -17,6 +17,7 @@
import jp.go.aist.rtm.toolscommon.model.component.ConfigurationSet;
import jp.go.aist.rtm.toolscommon.model.component.ContextHandler;
import jp.go.aist.rtm.toolscommon.model.component.ExecutionContext;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.CorbaComponent;
import jp.go.aist.rtm.toolscommon.model.component.InPort;
import jp.go.aist.rtm.toolscommon.model.component.NameValue;
@@ -1139,6 +1140,17 @@
* <!-- end-user-doc -->
* @generated
*/
+ public IPropertyMap getPropertyMap() {
+ // TODO: implement this method
+ // Ensure that you remove @generated or mark it @generated NOT
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentPackageImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentPackageImpl.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentPackageImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -1992,6 +1992,7 @@
portConnectorEClass.getESuperTypes().add(theCorePackage.getWrapperObject());
connectorProfileEClass.getESuperTypes().add(theCorePackage.getWrapperObject());
connectorProfileEClass.getESuperTypes().add(this.getIPropertyMap());
+ iPropertyMapEClass.getESuperTypes().add(theCorePackage.getIAdaptable());
corbaComponentEClass.getESuperTypes().add(this.getComponent());
corbaComponentEClass.getESuperTypes().add(theCorePackage.getCorbaWrapperObject());
corbaPortSynchronizerEClass.getESuperTypes().add(theCorePackage.getCorbaWrapperObject());
@@ -2241,6 +2242,8 @@
addEOperation(iPropertyMapEClass, ecorePackage.getEString(), "getPropertyKeys", 0, -1, IS_UNIQUE, IS_ORDERED);
+ addEOperation(iPropertyMapEClass, this.getIPropertyMap(), "getPropertyMap", 0, 1, IS_UNIQUE, IS_ORDERED);
+
initEClass(corbaComponentEClass, CorbaComponent.class, "CorbaComponent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getCorbaComponent_ExecutionContextState(), ecorePackage.getEInt(), "executionContextState", "0", 0, 1, CorbaComponent.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getCorbaComponent_ComponentState(), ecorePackage.getEInt(), "componentState", "1", 0, 1, CorbaComponent.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentSpecificationImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentSpecificationImpl.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ComponentSpecificationImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -16,8 +16,8 @@
import jp.go.aist.rtm.toolscommon.model.component.ComponentSpecification;
import jp.go.aist.rtm.toolscommon.model.component.ConfigurationSet;
import jp.go.aist.rtm.toolscommon.model.component.ExecutionContext;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.Port;
-import jp.go.aist.rtm.toolscommon.model.component.util.IPropertyMapUtil;
import jp.go.aist.rtm.toolscommon.model.component.util.PropertyMap;
import jp.go.aist.rtm.toolscommon.synchronizationframework.LocalObject;
import jp.go.aist.rtm.toolscommon.synchronizationframework.mapping.AttributeMapping;
@@ -112,7 +112,7 @@
*/
protected String rtcType = RTC_TYPE_EDEFAULT;
- IPropertyMapUtil properties;
+ IPropertyMap properties;
/**
* <!-- begin-user-doc -->
@@ -475,6 +475,11 @@
return properties.getPropertyKeys();
}
+ @Override
+ public IPropertyMap getPropertyMap() {
+ return properties;
+ }
+
/** Grouping複合RTC用のマッピングルール */
public static final MappingRule MAPPING_RULE = new MappingRule(null,
new ClassMapping(ComponentSpecificationImpl.class,
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ConnectorProfileImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ConnectorProfileImpl.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ConnectorProfileImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -8,7 +8,7 @@
import jp.go.aist.rtm.toolscommon.model.component.ComponentPackage;
import jp.go.aist.rtm.toolscommon.model.component.ConnectorProfile;
-import jp.go.aist.rtm.toolscommon.model.component.util.IPropertyMapUtil;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.util.PropertyMap;
import jp.go.aist.rtm.toolscommon.model.core.impl.WrapperObjectImpl;
@@ -505,7 +505,7 @@
*/
protected Double inportBufferReadTimeout = INPORT_BUFFER_READ_TIMEOUT_EDEFAULT;
- IPropertyMapUtil properties;
+ IPropertyMap properties;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
@@ -1053,6 +1053,15 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public IPropertyMap getPropertyMap() {
+ return properties;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
@Override
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 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaComponentImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -25,13 +25,13 @@
import jp.go.aist.rtm.toolscommon.model.component.CorbaPortSynchronizer;
import jp.go.aist.rtm.toolscommon.model.component.CorbaStatusObserver;
import jp.go.aist.rtm.toolscommon.model.component.ExecutionContext;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.NameValue;
import jp.go.aist.rtm.toolscommon.model.component.Port;
import jp.go.aist.rtm.toolscommon.model.component.SystemDiagram;
import jp.go.aist.rtm.toolscommon.model.component.util.CorbaObjectStore;
import jp.go.aist.rtm.toolscommon.model.component.util.CorbaObserverStore;
import jp.go.aist.rtm.toolscommon.model.component.util.CorbaPropertyMap;
-import jp.go.aist.rtm.toolscommon.model.component.util.IPropertyMapUtil;
import jp.go.aist.rtm.toolscommon.model.core.CorbaWrapperObject;
import jp.go.aist.rtm.toolscommon.model.core.CorePackage;
import jp.go.aist.rtm.toolscommon.synchronizationframework.LocalObject;
@@ -283,7 +283,7 @@
*/
protected CorbaLogObserver logObserver;
- protected IPropertyMapUtil properties;
+ protected IPropertyMap properties;
/**
* <!-- begin-user-doc -->
@@ -1354,6 +1354,11 @@
return properties.getPropertyKeys();
}
+ @Override
+ public IPropertyMap getPropertyMap() {
+ return properties;
+ }
+
// Mapping Rule
public static final MappingRule MAPPING_RULE = new MappingRule(
null,
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaConnectorProfileImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaConnectorProfileImpl.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaConnectorProfileImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -11,6 +11,7 @@
import jp.go.aist.rtm.toolscommon.model.component.ComponentPackage;
import jp.go.aist.rtm.toolscommon.model.component.CorbaConnectorProfile;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.util.CorbaPropertyMap;
import jp.go.aist.rtm.toolscommon.synchronizationframework.mapping.AttributeMapping;
import jp.go.aist.rtm.toolscommon.synchronizationframework.mapping.ClassMapping;
@@ -529,6 +530,11 @@
return properties.getPropertyKeys();
}
+ @Override
+ public IPropertyMap getPropertyMap() {
+ return properties;
+ }
+
// Mapping Rule
public static final MappingRule MAPPING_RULE = new MappingRule(
null,
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaObserverImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaObserverImpl.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaObserverImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -15,8 +15,8 @@
import jp.go.aist.rtm.toolscommon.model.component.ComponentPackage;
import jp.go.aist.rtm.toolscommon.model.component.CorbaComponent;
import jp.go.aist.rtm.toolscommon.model.component.CorbaObserver;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.util.CorbaPropertyMap;
-import jp.go.aist.rtm.toolscommon.model.component.util.IPropertyMapUtil;
import jp.go.aist.rtm.toolscommon.ui.propertysource.CorbaObserverPropertySource;
import org.eclipse.emf.common.util.EList;
@@ -90,7 +90,7 @@
static Logger log = ToolsCommonPlugin.getLogger();
- protected IPropertyMapUtil properties;
+ protected IPropertyMap properties;
static ORB orb = null;
static POA rootpoa = null;
@@ -312,6 +312,15 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public IPropertyMap getPropertyMap() {
+ return properties;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
@Override
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaPortSynchronizerImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaPortSynchronizerImpl.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/CorbaPortSynchronizerImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -21,7 +21,6 @@
import jp.go.aist.rtm.toolscommon.model.component.SystemDiagram;
import jp.go.aist.rtm.toolscommon.model.component.ConnectorProfile.PROP;
import jp.go.aist.rtm.toolscommon.model.component.util.CorbaPropertyMap;
-import jp.go.aist.rtm.toolscommon.model.component.util.IPropertyMapUtil;
import jp.go.aist.rtm.toolscommon.model.core.impl.CorbaWrapperObjectImpl;
import jp.go.aist.rtm.toolscommon.synchronizationframework.LocalObject;
import jp.go.aist.rtm.toolscommon.synchronizationframework.mapping.AttributeMapping;
@@ -106,7 +105,7 @@
@SuppressWarnings("unused")
private SystemDiagram currentDiagram;
- protected IPropertyMapUtil properties;
+ protected IPropertyMap properties;
/**
* <!-- begin-user-doc -->
@@ -539,7 +538,17 @@
return properties.getPropertyKeys();
}
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
@Override
+ public IPropertyMap getPropertyMap() {
+ return properties;
+ }
+
+ @Override
public void setCurrentDiagram(SystemDiagram currentDiagram) {
this.currentDiagram = currentDiagram;
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ExecutionContextImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ExecutionContextImpl.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/ExecutionContextImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -11,7 +11,7 @@
import jp.go.aist.rtm.toolscommon.model.component.ComponentPackage;
import jp.go.aist.rtm.toolscommon.model.component.ExecutionContext;
-import jp.go.aist.rtm.toolscommon.model.component.util.IPropertyMapUtil;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.util.PropertyMap;
import jp.go.aist.rtm.toolscommon.model.core.impl.WrapperObjectImpl;
@@ -123,7 +123,7 @@
*/
protected EList<Component> participants;
- protected IPropertyMapUtil properties;
+ protected IPropertyMap properties;
/**
* <!-- begin-user-doc -->
@@ -343,6 +343,7 @@
* <!-- end-user-doc -->
* @generated NOT
*/
+ @Override
public String getProperty(String key) {
return properties.getProperty(key);
}
@@ -352,6 +353,7 @@
* <!-- end-user-doc -->
* @generated NOT
*/
+ @Override
public void setProperty(String key, String value) {
properties.setProperty(key, value);
}
@@ -361,6 +363,7 @@
* <!-- end-user-doc -->
* @generated NOT
*/
+ @Override
public String removeProperty(String key) {
return properties.removeProperty(key);
}
@@ -370,6 +373,7 @@
* <!-- end-user-doc -->
* @generated NOT
*/
+ @Override
public EList<String> getPropertyKeys() {
return properties.getPropertyKeys();
}
@@ -377,6 +381,16 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public IPropertyMap getPropertyMap() {
+ return properties;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
@Override
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/PortSynchronizerImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/PortSynchronizerImpl.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/PortSynchronizerImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -11,13 +11,13 @@
import jp.go.aist.rtm.toolscommon.model.component.ComponentFactory;
import jp.go.aist.rtm.toolscommon.model.component.ComponentPackage;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.ConnectorProfile;
import jp.go.aist.rtm.toolscommon.model.component.NameValue;
import jp.go.aist.rtm.toolscommon.model.component.Port;
import jp.go.aist.rtm.toolscommon.model.component.PortConnector;
import jp.go.aist.rtm.toolscommon.model.component.PortSynchronizer;
import jp.go.aist.rtm.toolscommon.model.component.SystemDiagram;
-import jp.go.aist.rtm.toolscommon.model.component.util.IPropertyMapUtil;
import jp.go.aist.rtm.toolscommon.model.component.util.PortConnectorFactory;
import jp.go.aist.rtm.toolscommon.model.component.util.PropertyMap;
@@ -61,7 +61,7 @@
protected String originalPortString = ORIGINAL_PORT_STRING_EDEFAULT;
private SystemDiagram currentDiagram;
- IPropertyMapUtil properties;
+ IPropertyMap properties;
/**
* <!-- begin-user-doc -->
@@ -199,22 +199,22 @@
return result.toString();
}
-// @Override
+ @Override
public String getDataflowType() {
return null;
}
-// @Override
+ @Override
public String getDataType() {
return null;
}
-// @Override
+ @Override
public String getInterfaceType() {
return null;
}
-// @Override
+ @Override
public String getSubscriptionType() {
return null;
}
@@ -238,6 +238,7 @@
* <!-- end-user-doc -->
* @generated NOT
*/
+ @Override
public String getProperty(String key) {
return properties.getProperty(key);
}
@@ -247,6 +248,7 @@
* <!-- end-user-doc -->
* @generated NOT
*/
+ @Override
public void setProperty(String key, String value) {
properties.setProperty(key, value);
}
@@ -256,6 +258,7 @@
* <!-- end-user-doc -->
* @generated NOT
*/
+ @Override
public String removeProperty(String key) {
return properties.removeProperty(key);
}
@@ -265,14 +268,30 @@
* <!-- end-user-doc -->
* @generated NOT
*/
+ @Override
public EList<String> getPropertyKeys() {
return properties.getPropertyKeys();
}
- // @Override
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public IPropertyMap getPropertyMap() {
+ return properties;
+ }
+
+ @Override
public void setCurrentDiagram(SystemDiagram currentDiagram) {
this.currentDiagram = currentDiagram;
}
+ @SuppressWarnings("unchecked")
+ @Override
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
} //PortSynchronizerImpl
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/SystemDiagramImpl.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/SystemDiagramImpl.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/impl/SystemDiagramImpl.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -17,12 +17,12 @@
import jp.go.aist.rtm.toolscommon.model.component.Component;
import jp.go.aist.rtm.toolscommon.model.component.ComponentFactory;
import jp.go.aist.rtm.toolscommon.model.component.ComponentPackage;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
import jp.go.aist.rtm.toolscommon.model.component.CorbaStatusObserver;
import jp.go.aist.rtm.toolscommon.model.component.PortConnector;
import jp.go.aist.rtm.toolscommon.model.component.SystemDiagram;
import jp.go.aist.rtm.toolscommon.model.component.SystemDiagramKind;
import jp.go.aist.rtm.toolscommon.model.component.util.CorbaObserverStore;
-import jp.go.aist.rtm.toolscommon.model.component.util.IPropertyMapUtil;
import jp.go.aist.rtm.toolscommon.model.component.util.PropertyMap;
import jp.go.aist.rtm.toolscommon.model.core.impl.ModelElementImpl;
import jp.go.aist.rtm.toolscommon.synchronizationframework.LocalObject;
@@ -93,7 +93,7 @@
*/
protected SystemDiagramKind kind = KIND_EDEFAULT;
- protected IPropertyMapUtil properties;
+ protected IPropertyMap properties;
/**
* <!-- begin-user-doc -->
@@ -624,6 +624,16 @@
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @generated NOT
+ */
+ @Override
+ public IPropertyMap getPropertyMap() {
+ return properties;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
@Override
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/ComponentSwitch.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/ComponentSwitch.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/ComponentSwitch.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -230,6 +230,7 @@
PortSynchronizer portSynchronizer = (PortSynchronizer)theEObject;
T result = casePortSynchronizer(portSynchronizer);
if (result == null) result = caseIPropertyMap(portSynchronizer);
+ if (result == null) result = caseIAdaptable(portSynchronizer);
if (result == null) result = defaultCase(theEObject);
return result;
}
@@ -263,6 +264,7 @@
case ComponentPackage.IPROPERTY_MAP: {
IPropertyMap iPropertyMap = (IPropertyMap)theEObject;
T result = caseIPropertyMap(iPropertyMap);
+ if (result == null) result = caseIAdaptable(iPropertyMap);
if (result == null) result = defaultCase(theEObject);
return result;
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/CorbaPropertyMap.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/CorbaPropertyMap.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/CorbaPropertyMap.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -1,13 +1,18 @@
package jp.go.aist.rtm.toolscommon.model.component.util;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
+import jp.go.aist.rtm.toolscommon.ui.propertysource.PropertyMapPropertySource;
import jp.go.aist.rtm.toolscommon.util.SDOUtil;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.ui.views.properties.IPropertySource;
import _SDOPackage.NameValue;
-public abstract class CorbaPropertyMap implements IPropertyMapUtil {
+public abstract class CorbaPropertyMap extends EObjectImpl implements
+ IPropertyMap {
public abstract NameValue[] getNameValues();
@@ -43,4 +48,19 @@
return result;
}
+ @Override
+ public IPropertyMap getPropertyMap() {
+ return this;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public java.lang.Object getAdapter(Class adapter) {
+ java.lang.Object result = null;
+ if (IPropertySource.class.equals(adapter)) {
+ result = new PropertyMapPropertySource(this);
+ }
+ return result;
+ }
+
}
Deleted: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/IPropertyMapUtil.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/IPropertyMapUtil.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/IPropertyMapUtil.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -1,15 +0,0 @@
-package jp.go.aist.rtm.toolscommon.model.component.util;
-
-import org.eclipse.emf.common.util.EList;
-
-public interface IPropertyMapUtil {
-
- String getProperty(String key);
-
- void setProperty(String key, String value);
-
- String removeProperty(String key);
-
- EList<String> getPropertyKeys();
-
-}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/PropertyMap.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/PropertyMap.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component/util/PropertyMap.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -1,12 +1,18 @@
package jp.go.aist.rtm.toolscommon.model.component.util;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
+import jp.go.aist.rtm.toolscommon.ui.propertysource.PropertyMapPropertySource;
+
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.ui.views.properties.IPropertySource;
-public class PropertyMap implements IPropertyMapUtil {
+public class PropertyMap extends EObjectImpl implements IPropertyMap {
Map<String, String> properties;
@@ -38,7 +44,23 @@
for (String key : properties.keySet()) {
result.add(key);
}
+ Collections.sort(result);
return result;
}
+ @Override
+ public IPropertyMap getPropertyMap() {
+ return this;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public java.lang.Object getAdapter(Class adapter) {
+ java.lang.Object result = null;
+ if (IPropertySource.class.equals(adapter)) {
+ result = new PropertyMapPropertySource(this);
+ }
+ return result;
+ }
+
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component.ecore
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component.ecore 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/model/component.ecore 2011-05-27 09:35:28 UTC (rev 180)
@@ -255,7 +255,8 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="key" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" eType="ecore:EDataType core.ecore#//Point"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="IPropertyMap" abstract="true" interface="true">
+ <eClassifiers xsi:type="ecore:EClass" name="IPropertyMap" abstract="true" interface="true"
+ eSuperTypes="core.ecore#//IAdaptable">
<eOperations name="getProperty" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eParameters name="key" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eOperations>
@@ -267,6 +268,7 @@
<eParameters name="key" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eOperations>
<eOperations name="getPropertyKeys" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <eOperations name="getPropertyMap" eType="#//IPropertyMap"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EDataType" name="SDOConfiguration" instanceClassName="_SDOPackage.Configuration"/>
<eClassifiers xsi:type="ecore:EDataType" name="SDOConfigurationSet" instanceClassName="_SDOPackage.ConfigurationSet"/>
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/ComponentPropertySource.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/ComponentPropertySource.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/ComponentPropertySource.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -69,9 +69,6 @@
result.add(new TextPropertyDescriptor(Component.VENDER, DISP_VENDOR));
result.add(new TextPropertyDescriptor(Component.CATEGORY, DISP_CATEGORY));
result.add(new TextPropertyDescriptor(Component.STATE, DISP_STATE));
- for (String key : component.getPropertyKeys()) {
- result.add(new TextPropertyDescriptor(new DynamicID("PROPERTIES", key), key));
- }
return (IPropertyDescriptor[]) result
.toArray(new IPropertyDescriptor[result.size()]);
}
@@ -108,16 +105,10 @@
return STATE_ERROR_VIEWSTRING;
}
}
- } else if (id instanceof DynamicID) {
- DynamicID dynamicId = (DynamicID) id;
- if ("PROPERTIES".equals(dynamicId.categoryId)) {
- return component.getProperty(dynamicId.subId);
- }
}
} catch (Exception e) {
return UNKNOWN;
}
-
return UNKNOWN;
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/ComponentSpecificationPropertySource.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/ComponentSpecificationPropertySource.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/ComponentSpecificationPropertySource.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -55,9 +55,6 @@
if (component.getRtcType() != null) {
result.add(new TextPropertyDescriptor("RTC_TYPE", "RTC Type"));
}
- for (String key : component.getPropertyKeys()) {
- result.add(new TextPropertyDescriptor(new DynamicID("PROPERTIES", key), key));
- }
return (IPropertyDescriptor[]) result
.toArray(new IPropertyDescriptor[result.size()]);
}
@@ -82,20 +79,13 @@
result = component.getVersionL();
} else if ("RTC_TYPE".equals(id)) {
result = component.getRtcType();
- } else if (id instanceof DynamicID) {
- DynamicID dynamicId = (DynamicID) id;
- if ("PROPERTIES".equals(dynamicId.categoryId)) {
- return component.getProperty(dynamicId.subId);
- }
}
} catch (Exception e) {
// void
}
-
if (result == null) {
result = UNKNOWN;
}
-
return result;
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/CorbaObserverPropertySource.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/CorbaObserverPropertySource.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/CorbaObserverPropertySource.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -40,10 +40,6 @@
result.add(new TextPropertyDescriptor(INTERFACE_TYPE,
DISP_INTERFACE_TYPE));
result.add(new TextPropertyDescriptor(SERVICE, DISP_SERVICE));
- for (String key : observer.getPropertyKeys()) {
- result.add(new TextPropertyDescriptor(new DynamicID("PROPERTIES",
- key), key));
- }
return (IPropertyDescriptor[]) result
.toArray(new IPropertyDescriptor[result.size()]);
}
@@ -57,11 +53,6 @@
result = observer.getServiceProfile().interface_type;
} else if (SERVICE.equals(id)) {
result = observer.getServiceProfile().service.toString();
- } else if (id instanceof DynamicID) {
- DynamicID dynamicId = (DynamicID) id;
- if ("PROPERTIES".equals(dynamicId.categoryId)) {
- return observer.getProperty(dynamicId.subId);
- }
}
return result;
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PortConnectorPropertySource.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PortConnectorPropertySource.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PortConnectorPropertySource.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -7,7 +7,6 @@
import jp.go.aist.rtm.toolscommon.model.component.OutPort;
import jp.go.aist.rtm.toolscommon.model.component.PortConnector;
import jp.go.aist.rtm.toolscommon.model.component.ConnectorProfile;
-import jp.go.aist.rtm.toolscommon.model.component.ServicePort;
import jp.go.aist.rtm.toolscommon.model.component.ConnectorProfile.PROP;
import org.eclipse.ui.views.properties.IPropertyDescriptor;
@@ -117,39 +116,7 @@
descriptors.add(new TextPropertyDescriptor(PROP.INPORT_EMPTY_POLICY, DISP_INPORT_EMPTY_POLICY));
descriptors.add(new TextPropertyDescriptor(PROP.INPORT_READ_TIMEOUT, DISP_INPORT_READ_TIMEOUT));
}
- } else if (portConnector.getSource() instanceof ServicePort) {
- for (String key : profile.getPropertyKeys()) {
- if (!ConnectorProfile.InterfaceId.isValid(key)) {
- continue;
- }
- descriptors.add(new TextPropertyDescriptor(key, key));
- }
}
-
- for (String key : profile.getPropertyKeys()) {
- if (PROP.DATA_TYPE.equals(key) || PROP.INTERFACE_TYPE.equals(key)
- || PROP.DATAFLOW_TYPE.equals(key)
- || PROP.SUBSCRIPTION_TYPE.equals(key)
- || PROP.PUSH_RATE.equals(key)
- || PROP.PUSH_POLICY.equals(key)
- || PROP.SKIP_COUNT.equals(key)
- || PROP.OUTPORT_BUFF_LENGTH.equals(key)
- || PROP.OUTPORT_FULL_POLICY.equals(key)
- || PROP.OUTPORT_WRITE_TIMEOUT.equals(key)
- || PROP.OUTPORT_EMPTY_POLICY.equals(key)
- || PROP.OUTPORT_READ_TIMEOUT.equals(key)
- || PROP.INPORT_BUFF_LENGTH.equals(key)
- || PROP.INPORT_FULL_POLICY.equals(key)
- || PROP.INPORT_WRITE_TIMEOUT.equals(key)
- || PROP.INPORT_EMPTY_POLICY.equals(key)
- || PROP.INPORT_READ_TIMEOUT.equals(key)
- || ConnectorProfile.InterfaceId.isValid(key)) {
- continue;
- }
- descriptors.add(new TextPropertyDescriptor(new DynamicID(
- "PROPERTIES", key), key));
- }
-
return descriptors.toArray(new TextPropertyDescriptor []{});
}
@@ -199,18 +166,6 @@
} else if (PROP.INPORT_READ_TIMEOUT.equals(id)) {
result = profile.getInportBufferReadTimeout().toString();
}
- //
- if (id instanceof String
- && ConnectorProfile.InterfaceId.isValid((String) id)) {
- result = profile.getProperty((String) id);
- }
- //
- else if (id instanceof DynamicID) {
- DynamicID dynamicId = (DynamicID) id;
- if ("PROPERTIES".equals(dynamicId.categoryId)) {
- return profile.getProperty(dynamicId.subId);
- }
- }
} catch (Exception e) {
// void
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PortPropertySource.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PortPropertySource.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PortPropertySource.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -3,7 +3,6 @@
import java.util.ArrayList;
import java.util.List;
-import jp.go.aist.rtm.toolscommon.model.component.NameValue;
import jp.go.aist.rtm.toolscommon.model.component.Port;
import jp.go.aist.rtm.toolscommon.util.ConnectorUtil;
@@ -68,12 +67,6 @@
addPropertyDescriptor(result, port.getSubscriptionType(),
new TextPropertyDescriptor(PORT_SUBSCRIPTION_TYPE,
DISP_PORT_SUBSCRIPTION_TYPE));
- for (NameValue entry : port.getProperties()) {
- result.add(new TextPropertyDescriptor(new DynamicID(
- PROPERTIES_DYNAMICID_CATEGORY, entry.getName()), entry
- .getName()));
- }
-
return (IPropertyDescriptor[]) result
.toArray(new IPropertyDescriptor[result.size()]);
}
@@ -98,16 +91,10 @@
return sortValues(port.getInterfaceTypes());
} else if (PORT_SUBSCRIPTION_TYPE.equals(id)) {
return sortValues(port.getSubscriptionTypes());
- } else if (id instanceof DynamicID) {
- DynamicID dynamicId = (DynamicID) id;
- if (PROPERTIES_DYNAMICID_CATEGORY.equals(dynamicId.categoryId)) {
- return port.getProperty(dynamicId.subId);
- }
}
} catch (Exception e) {
return UNKNOWN;
}
-
return UNKNOWN;
}
Added: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PropertyMapPropertySource.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PropertyMapPropertySource.java (rev 0)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/PropertyMapPropertySource.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -0,0 +1,47 @@
+package jp.go.aist.rtm.toolscommon.ui.propertysource;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.ui.views.properties.IPropertyDescriptor;
+import org.eclipse.ui.views.properties.TextPropertyDescriptor;
+
+import jp.go.aist.rtm.toolscommon.model.component.IPropertyMap;
+
+public class PropertyMapPropertySource extends AbstractPropertySource {
+
+ static final String UNKNOWN = "<unknown>";
+
+ IPropertyMap propertyMap;
+
+ public PropertyMapPropertySource(IPropertyMap propertyMap) {
+ this.propertyMap = propertyMap;
+ }
+
+ @Override
+ public IPropertyDescriptor[] getPropertyDescriptors() {
+ List<IPropertyDescriptor> result = new ArrayList<IPropertyDescriptor>();
+ for (String key : propertyMap.getPropertyKeys()) {
+ result.add(new TextPropertyDescriptor(new DynamicID("PROPERTIES",
+ key), key));
+ }
+ return (IPropertyDescriptor[]) result
+ .toArray(new IPropertyDescriptor[result.size()]);
+ }
+
+ @Override
+ public java.lang.Object getPropertyValue(java.lang.Object id) {
+ try {
+ if (id instanceof DynamicID) {
+ DynamicID dynamicId = (DynamicID) id;
+ if ("PROPERTIES".equals(dynamicId.categoryId)) {
+ return propertyMap.getProperty(dynamicId.subId);
+ }
+ }
+ } catch (Exception e) {
+ return UNKNOWN;
+ }
+ return UNKNOWN;
+ }
+
+}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/SystemDiagramPropertySource.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/SystemDiagramPropertySource.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/propertysource/SystemDiagramPropertySource.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -45,10 +45,6 @@
result.add(new TextPropertyDescriptor(CREATE_DATE, DISP_CREATE_DATE));
result.add(new TextPropertyDescriptor(UPDATE_DATE, DISP_UPDATE_DATE));
result.add(new TextPropertyDescriptor(COMPOSITE, DISP_COMPOSITE));
- for (String key : diagram.getPropertyKeys()) {
- result.add(new TextPropertyDescriptor(new DynamicID("PROPERTIES",
- key), key));
- }
return (IPropertyDescriptor[]) result
.toArray(new IPropertyDescriptor[result.size()]);
}
@@ -72,11 +68,6 @@
} else {
result = comp.getInstanceNameL();
}
- } else if (id instanceof DynamicID) {
- DynamicID dynamicId = (DynamicID) id;
- if ("PROPERTIES".equals(dynamicId.categoryId)) {
- return diagram.getProperty(dynamicId.subId);
- }
}
} catch (Exception e) {
// void
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/ComponentWorkbenchAdapter.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/ComponentWorkbenchAdapter.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/ComponentWorkbenchAdapter.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -28,6 +28,9 @@
public Object[] getChildren(Object o) {
List<Object> result = new ArrayList<Object>();
Component c = (Component) o;
+ if (!c.getPropertyKeys().isEmpty()) {
+ result.add(c.getPropertyMap());
+ }
if (!c.getExecutionContextHandler().getOwnerContexts().isEmpty()) {
result.add(c.getExecutionContextHandler());
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/CorbaObserverWorkbenchAdapter.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/CorbaObserverWorkbenchAdapter.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/CorbaObserverWorkbenchAdapter.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -1,6 +1,10 @@
package jp.go.aist.rtm.toolscommon.ui.workbenchadapter;
+import java.util.ArrayList;
+import java.util.List;
+
import jp.go.aist.rtm.toolscommon.model.component.CorbaLogObserver;
+import jp.go.aist.rtm.toolscommon.model.component.CorbaObserver;
import jp.go.aist.rtm.toolscommon.model.component.CorbaStatusObserver;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -23,7 +27,12 @@
@Override
public Object[] getChildren(Object o) {
- return null;
+ List<Object> result = new ArrayList<Object>();
+ CorbaObserver c = (CorbaObserver) o;
+ if (!c.getPropertyKeys().isEmpty()) {
+ result.add(c.getPropertyMap());
+ }
+ return result.toArray();
}
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/ExecutionContextWorkbenchAdapter.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/ExecutionContextWorkbenchAdapter.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/ExecutionContextWorkbenchAdapter.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -1,6 +1,10 @@
package jp.go.aist.rtm.toolscommon.ui.workbenchadapter;
+import java.util.ArrayList;
+import java.util.List;
+
import jp.go.aist.rtm.toolscommon.ToolsCommonPlugin;
+import jp.go.aist.rtm.toolscommon.model.component.ExecutionContext;
import jp.go.aist.rtm.toolscommon.nl.Messages;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -19,9 +23,15 @@
public String getLabel(Object o) {
return Messages.getString("ExecutionContextWorkbenchAdapter.label");
}
-
+
@Override
public Object[] getChildren(Object o) {
- return null;
+ List<Object> result = new ArrayList<Object>();
+ ExecutionContext c = (ExecutionContext) o;
+ if (!c.getPropertyKeys().isEmpty()) {
+ result.add(c.getPropertyMap());
+ }
+ return result.toArray();
}
+
}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PortConnectorWorkbenchAdapter.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PortConnectorWorkbenchAdapter.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PortConnectorWorkbenchAdapter.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -1,5 +1,8 @@
package jp.go.aist.rtm.toolscommon.ui.workbenchadapter;
+import java.util.ArrayList;
+import java.util.List;
+
import jp.go.aist.rtm.toolscommon.ToolsCommonPlugin;
import jp.go.aist.rtm.toolscommon.model.component.PortConnector;
import jp.go.aist.rtm.toolscommon.nl.Messages;
@@ -10,8 +13,16 @@
@Override
public Object[] getChildren(Object o) {
+ List<Object> result = new ArrayList<Object>();
PortConnector c = (PortConnector) o;
- return new Object[] { c.getSource(), c.getTarget() };
+ if (c.getConnectorProfile() != null) {
+ if (!c.getConnectorProfile().getPropertyKeys().isEmpty()) {
+ result.add(c.getConnectorProfile().getPropertyMap());
+ }
+ }
+ result.add(c.getSource());
+ result.add(c.getTarget());
+ return result.toArray();
}
@Override
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PortWorkbenchAdapter.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PortWorkbenchAdapter.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PortWorkbenchAdapter.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -1,13 +1,26 @@
package jp.go.aist.rtm.toolscommon.ui.workbenchadapter;
+import java.util.ArrayList;
+import java.util.List;
+
import jp.go.aist.rtm.toolscommon.model.component.Port;
/**
* PortのWorkbenchAdapter
*/
public abstract class PortWorkbenchAdapter extends ModelElementWorkbenchAdapter {
+
@Override
public Object[] getChildren(Object o) {
- return ((Port) o).getInterfaces().toArray();
+ List<Object> result = new ArrayList<Object>();
+ Port c = (Port) o;
+ if (c.getSynchronizer() != null) {
+ if (!c.getSynchronizer().getPropertyKeys().isEmpty()) {
+ result.add(c.getSynchronizer().getPropertyMap());
+ }
+ }
+ result.addAll(c.getInterfaces());
+ return result.toArray();
}
+
}
Added: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PropertyMapWorkbenchAdapter.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PropertyMapWorkbenchAdapter.java (rev 0)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/PropertyMapWorkbenchAdapter.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -0,0 +1,21 @@
+package jp.go.aist.rtm.toolscommon.ui.workbenchadapter;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+
+public class PropertyMapWorkbenchAdapter extends ModelElementWorkbenchAdapter {
+ @Override
+ public ImageDescriptor getImageDescriptor(Object o) {
+ return null;
+ }
+
+ @Override
+ public String getLabel(Object o) {
+ return "properties";
+ }
+
+ @Override
+ public Object[] getChildren(Object o) {
+ return null;
+ }
+
+}
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/SystemDiagramWorkbenchAdapter.java
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/SystemDiagramWorkbenchAdapter.java 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/src/jp/go/aist/rtm/toolscommon/ui/workbenchadapter/SystemDiagramWorkbenchAdapter.java 2011-05-27 09:35:28 UTC (rev 180)
@@ -1,6 +1,10 @@
package jp.go.aist.rtm.toolscommon.ui.workbenchadapter;
+import java.util.ArrayList;
+import java.util.List;
+
import jp.go.aist.rtm.toolscommon.ToolsCommonPlugin;
+import jp.go.aist.rtm.toolscommon.model.component.SystemDiagram;
import jp.go.aist.rtm.toolscommon.nl.Messages;
import org.eclipse.jface.resource.ImageDescriptor;
@@ -9,7 +13,12 @@
@Override
public Object[] getChildren(Object o) {
- return null;
+ List<Object> result = new ArrayList<Object>();
+ SystemDiagram c = (SystemDiagram) o;
+ if (!c.getPropertyKeys().isEmpty()) {
+ result.add(c.getPropertyMap());
+ }
+ return result.toArray();
}
@Override
Modified: trunk/rtmtools/jp.go.aist.rtm.toolscommon/text/description.txt
===================================================================
--- trunk/rtmtools/jp.go.aist.rtm.toolscommon/text/description.txt 2011-05-23 14:57:05 UTC (rev 179)
+++ trunk/rtmtools/jp.go.aist.rtm.toolscommon/text/description.txt 2011-05-27 09:35:28 UTC (rev 180)
@@ -227,11 +227,12 @@
Attribute key : EIntegerObject
Attribute value : Point
- Class IPropertyMap
+ Class IPropertyMap -> IAdaptable
Operation getProperty(EString) : EString
Operation setProperty(EString, EString) : void
Operation removeProperty(EString) : EString
Operation getPropertyKeys() : EString<<0..*>>
+ Operation getPropertyMap() : IPropertyMap
Class CorbaComponent -> Component, CorbaWrapperObject
Attribute executionContextState : EInt
openrtm-commit メーリングリストの案内