Kaynağa Gözat

refactor extrapolation cost as it belongs to input port instances only

Claudio Gomes 5 yıl önce
ebeveyn
işleme
2471b1da7a

+ 1 - 0
HintConfiguration.edit/plugin.properties

@@ -100,3 +100,4 @@ _UI_InputPortInstance_internalValueTo_feature = Internal Value To
 _UI_OutputPortInstance_internalValueFrom_feature = Internal Value From
 _UI_RollbackInterpolationAdaptation_type = Rollback Interpolation Adaptation
 _UI_PortInstance_extrapolationCost_feature = Extrapolation Cost
+_UI_InputPortInstance_extrapolationCost_feature = Extrapolation Cost

+ 32 - 0
HintConfiguration.edit/src/ua/ansymo/hintco/provider/InputPortInstanceItemProvider.java

@@ -12,7 +12,10 @@ import org.eclipse.emf.common.notify.Notification;
 import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
 import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
 
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
 import ua.ansymo.hintco.HintcoPackage;
+import ua.ansymo.hintco.InputPortInstance;
 import ua.ansymo.hintco.PortInstance;
 
 /**
@@ -43,12 +46,35 @@ public class InputPortInstanceItemProvider extends PortInstanceItemProvider {
 		if (itemPropertyDescriptors == null) {
 			super.getPropertyDescriptors(object);
 
+			addExtrapolationCostPropertyDescriptor(object);
 			addInternalValueToPropertyDescriptor(object);
 			addValueFromPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
 
+	/**
+	 * This adds a property descriptor for the Extrapolation Cost feature.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	protected void addExtrapolationCostPropertyDescriptor(Object object) {
+		itemPropertyDescriptors.add
+			(createItemPropertyDescriptor
+				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+				 getResourceLocator(),
+				 getString("_UI_InputPortInstance_extrapolationCost_feature"),
+				 getString("_UI_PropertyDescriptor_description", "_UI_InputPortInstance_extrapolationCost_feature", "_UI_InputPortInstance_type"),
+				 HintcoPackage.Literals.INPUT_PORT_INSTANCE__EXTRAPOLATION_COST,
+				 true,
+				 false,
+				 false,
+				 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
+				 null,
+				 null));
+	}
+
 	/**
 	 * This adds a property descriptor for the Internal Value To feature.
 	 * <!-- begin-user-doc -->
@@ -129,6 +155,12 @@ public class InputPortInstanceItemProvider extends PortInstanceItemProvider {
 	@Override
 	public void notifyChanged(Notification notification) {
 		updateChildren(notification);
+
+		switch (notification.getFeatureID(InputPortInstance.class)) {
+			case HintcoPackage.INPUT_PORT_INSTANCE__EXTRAPOLATION_COST:
+				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+				return;
+		}
 		super.notifyChanged(notification);
 	}
 

+ 0 - 24
HintConfiguration.edit/src/ua/ansymo/hintco/provider/PortInstanceItemProvider.java

@@ -50,7 +50,6 @@ public class PortInstanceItemProvider extends PrecendenceNodeItemProvider {
 
 			addIdentifierPropertyDescriptor(object);
 			addUnitPropertyDescriptor(object);
-			addExtrapolationCostPropertyDescriptor(object);
 		}
 		return itemPropertyDescriptors;
 	}
@@ -99,28 +98,6 @@ public class PortInstanceItemProvider extends PrecendenceNodeItemProvider {
 				 null));
 	}
 
-	/**
-	 * This adds a property descriptor for the Extrapolation Cost feature.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	protected void addExtrapolationCostPropertyDescriptor(Object object) {
-		itemPropertyDescriptors.add
-			(createItemPropertyDescriptor
-				(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
-				 getResourceLocator(),
-				 getString("_UI_PortInstance_extrapolationCost_feature"),
-				 getString("_UI_PropertyDescriptor_description", "_UI_PortInstance_extrapolationCost_feature", "_UI_PortInstance_type"),
-				 HintcoPackage.Literals.PORT_INSTANCE__EXTRAPOLATION_COST,
-				 true,
-				 false,
-				 false,
-				 ItemPropertyDescriptor.REAL_VALUE_IMAGE,
-				 null,
-				 null));
-	}
-
 	/**
 	 * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
 	 * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
@@ -179,7 +156,6 @@ public class PortInstanceItemProvider extends PrecendenceNodeItemProvider {
 
 		switch (notification.getFeatureID(PortInstance.class)) {
 			case HintcoPackage.PORT_INSTANCE__IDENTIFIER:
-			case HintcoPackage.PORT_INSTANCE__EXTRAPOLATION_COST:
 				fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
 				return;
 			case HintcoPackage.PORT_INSTANCE__ADAPTATION:

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1 - 1
HintConfiguration/model/HintConfiguration.genmodel


+ 1 - 1
HintConfiguration/model/HintConfiguration.xcore

@@ -110,7 +110,6 @@ class CosimUnitInstance extends UnitInstance {
 
 abstract class PortInstance extends PrecendenceNode,IDed {
 	refers UnitInstance unit opposite ports
-	float extrapolationCost = "1.0"
 	contains PortAdaptation adaptation opposite port
 	
 	op PortAdaptation[] selectedAdaptations() {
@@ -174,6 +173,7 @@ class HierarchicalUnitPort extends InputPortInstance,OutputPortInstance{
 }
 
 class InputPortInstance extends PortInstance {
+	float extrapolationCost = "1.0"
 	refers OutputPortInstance[] internalValueTo opposite internalValueFrom
 	refers OutputPortInstance valueFrom opposite valueTo
 	// Recursively ignore HierarchicalUnitPort and get the OutputPortInstance that generates this value

+ 3 - 3
HintConfiguration/model/hintco.ecore

@@ -127,9 +127,6 @@
     </eOperations>
     <eStructuralFeatures xsi:type="ecore:EReference" name="unit" eType="#//UnitInstance"
         eOpposite="#//UnitInstance/ports"/>
-    <eStructuralFeatures xsi:type="ecore:EAttribute" name="extrapolationCost" unique="false"
-        eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EFloat"
-        defaultValueLiteral="1.0"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="adaptation" eType="#//PortAdaptation"
         containment="true" resolveProxies="false" eOpposite="#//PortAdaptation/port"/>
   </eClassifiers>
@@ -162,6 +159,9 @@
         <details key="body" value="return true;"/>
       </eAnnotations>
     </eOperations>
+    <eStructuralFeatures xsi:type="ecore:EAttribute" name="extrapolationCost" unique="false"
+        eType="ecore:EDataType ../../org.eclipse.emf.ecore/model/Ecore.ecore#//EFloat"
+        defaultValueLiteral="1.0"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="internalValueTo" upperBound="-1"
         eType="#//OutputPortInstance" eOpposite="#//OutputPortInstance/internalValueFrom"/>
     <eStructuralFeatures xsi:type="ecore:EReference" name="valueFrom" eType="#//OutputPortInstance"

+ 32 - 50
HintConfiguration/src-gen/ua/ansymo/hintco/HintcoPackage.java

@@ -1006,15 +1006,6 @@ public interface HintcoPackage extends EPackage {
 	 */
 	int PORT_INSTANCE__UNIT = PRECENDENCE_NODE_FEATURE_COUNT + 1;
 
-	/**
-	 * The feature id for the '<em><b>Extrapolation Cost</b></em>' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 * @ordered
-	 */
-	int PORT_INSTANCE__EXTRAPOLATION_COST = PRECENDENCE_NODE_FEATURE_COUNT + 2;
-
 	/**
 	 * The feature id for the '<em><b>Adaptation</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
@@ -1022,7 +1013,7 @@ public interface HintcoPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int PORT_INSTANCE__ADAPTATION = PRECENDENCE_NODE_FEATURE_COUNT + 3;
+	int PORT_INSTANCE__ADAPTATION = PRECENDENCE_NODE_FEATURE_COUNT + 2;
 
 	/**
 	 * The number of structural features of the '<em>Port Instance</em>' class.
@@ -1031,7 +1022,7 @@ public interface HintcoPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int PORT_INSTANCE_FEATURE_COUNT = PRECENDENCE_NODE_FEATURE_COUNT + 4;
+	int PORT_INSTANCE_FEATURE_COUNT = PRECENDENCE_NODE_FEATURE_COUNT + 3;
 
 	/**
 	 * The operation id for the '<em>Selected Adaptations</em>' operation.
@@ -1143,22 +1134,22 @@ public interface HintcoPackage extends EPackage {
 	int INPUT_PORT_INSTANCE__UNIT = PORT_INSTANCE__UNIT;
 
 	/**
-	 * The feature id for the '<em><b>Extrapolation Cost</b></em>' attribute.
+	 * The feature id for the '<em><b>Adaptation</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int INPUT_PORT_INSTANCE__EXTRAPOLATION_COST = PORT_INSTANCE__EXTRAPOLATION_COST;
+	int INPUT_PORT_INSTANCE__ADAPTATION = PORT_INSTANCE__ADAPTATION;
 
 	/**
-	 * The feature id for the '<em><b>Adaptation</b></em>' containment reference.
+	 * The feature id for the '<em><b>Extrapolation Cost</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int INPUT_PORT_INSTANCE__ADAPTATION = PORT_INSTANCE__ADAPTATION;
+	int INPUT_PORT_INSTANCE__EXTRAPOLATION_COST = PORT_INSTANCE_FEATURE_COUNT + 0;
 
 	/**
 	 * The feature id for the '<em><b>Internal Value To</b></em>' reference list.
@@ -1167,7 +1158,7 @@ public interface HintcoPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int INPUT_PORT_INSTANCE__INTERNAL_VALUE_TO = PORT_INSTANCE_FEATURE_COUNT + 0;
+	int INPUT_PORT_INSTANCE__INTERNAL_VALUE_TO = PORT_INSTANCE_FEATURE_COUNT + 1;
 
 	/**
 	 * The feature id for the '<em><b>Value From</b></em>' reference.
@@ -1176,7 +1167,7 @@ public interface HintcoPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int INPUT_PORT_INSTANCE__VALUE_FROM = PORT_INSTANCE_FEATURE_COUNT + 1;
+	int INPUT_PORT_INSTANCE__VALUE_FROM = PORT_INSTANCE_FEATURE_COUNT + 2;
 
 	/**
 	 * The number of structural features of the '<em>Input Port Instance</em>' class.
@@ -1185,7 +1176,7 @@ public interface HintcoPackage extends EPackage {
 	 * @generated
 	 * @ordered
 	 */
-	int INPUT_PORT_INSTANCE_FEATURE_COUNT = PORT_INSTANCE_FEATURE_COUNT + 2;
+	int INPUT_PORT_INSTANCE_FEATURE_COUNT = PORT_INSTANCE_FEATURE_COUNT + 3;
 
 	/**
 	 * The operation id for the '<em>Selected Adaptations</em>' operation.
@@ -1306,22 +1297,22 @@ public interface HintcoPackage extends EPackage {
 	int HIERARCHICAL_UNIT_PORT__UNIT = INPUT_PORT_INSTANCE__UNIT;
 
 	/**
-	 * The feature id for the '<em><b>Extrapolation Cost</b></em>' attribute.
+	 * The feature id for the '<em><b>Adaptation</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int HIERARCHICAL_UNIT_PORT__EXTRAPOLATION_COST = INPUT_PORT_INSTANCE__EXTRAPOLATION_COST;
+	int HIERARCHICAL_UNIT_PORT__ADAPTATION = INPUT_PORT_INSTANCE__ADAPTATION;
 
 	/**
-	 * The feature id for the '<em><b>Adaptation</b></em>' containment reference.
+	 * The feature id for the '<em><b>Extrapolation Cost</b></em>' attribute.
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 * @ordered
 	 */
-	int HIERARCHICAL_UNIT_PORT__ADAPTATION = INPUT_PORT_INSTANCE__ADAPTATION;
+	int HIERARCHICAL_UNIT_PORT__EXTRAPOLATION_COST = INPUT_PORT_INSTANCE__EXTRAPOLATION_COST;
 
 	/**
 	 * The feature id for the '<em><b>Internal Value To</b></em>' reference list.
@@ -1495,15 +1486,6 @@ public interface HintcoPackage extends EPackage {
 	 */
 	int OUTPUT_PORT_INSTANCE__UNIT = PORT_INSTANCE__UNIT;
 
-	/**
-	 * The feature id for the '<em><b>Extrapolation Cost</b></em>' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 * @ordered
-	 */
-	int OUTPUT_PORT_INSTANCE__EXTRAPOLATION_COST = PORT_INSTANCE__EXTRAPOLATION_COST;
-
 	/**
 	 * The feature id for the '<em><b>Adaptation</b></em>' containment reference.
 	 * <!-- begin-user-doc -->
@@ -3367,17 +3349,6 @@ public interface HintcoPackage extends EPackage {
 	 */
 	EReference getPortInstance_Unit();
 
-	/**
-	 * Returns the meta object for the attribute '{@link ua.ansymo.hintco.PortInstance#getExtrapolationCost <em>Extrapolation Cost</em>}'.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @return the meta object for the attribute '<em>Extrapolation Cost</em>'.
-	 * @see ua.ansymo.hintco.PortInstance#getExtrapolationCost()
-	 * @see #getPortInstance()
-	 * @generated
-	 */
-	EAttribute getPortInstance_ExtrapolationCost();
-
 	/**
 	 * Returns the meta object for the containment reference '{@link ua.ansymo.hintco.PortInstance#getAdaptation <em>Adaptation</em>}'.
 	 * <!-- begin-user-doc -->
@@ -3469,6 +3440,17 @@ public interface HintcoPackage extends EPackage {
 	 */
 	EClass getInputPortInstance();
 
+	/**
+	 * Returns the meta object for the attribute '{@link ua.ansymo.hintco.InputPortInstance#getExtrapolationCost <em>Extrapolation Cost</em>}'.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @return the meta object for the attribute '<em>Extrapolation Cost</em>'.
+	 * @see ua.ansymo.hintco.InputPortInstance#getExtrapolationCost()
+	 * @see #getInputPortInstance()
+	 * @generated
+	 */
+	EAttribute getInputPortInstance_ExtrapolationCost();
+
 	/**
 	 * Returns the meta object for the reference list '{@link ua.ansymo.hintco.InputPortInstance#getInternalValueTo <em>Internal Value To</em>}'.
 	 * <!-- begin-user-doc -->
@@ -4367,14 +4349,6 @@ public interface HintcoPackage extends EPackage {
 		 */
 		EReference PORT_INSTANCE__UNIT = eINSTANCE.getPortInstance_Unit();
 
-		/**
-		 * The meta object literal for the '<em><b>Extrapolation Cost</b></em>' attribute feature.
-		 * <!-- begin-user-doc -->
-		 * <!-- end-user-doc -->
-		 * @generated
-		 */
-		EAttribute PORT_INSTANCE__EXTRAPOLATION_COST = eINSTANCE.getPortInstance_ExtrapolationCost();
-
 		/**
 		 * The meta object literal for the '<em><b>Adaptation</b></em>' containment reference feature.
 		 * <!-- begin-user-doc -->
@@ -4451,6 +4425,14 @@ public interface HintcoPackage extends EPackage {
 		 */
 		EClass INPUT_PORT_INSTANCE = eINSTANCE.getInputPortInstance();
 
+		/**
+		 * The meta object literal for the '<em><b>Extrapolation Cost</b></em>' attribute feature.
+		 * <!-- begin-user-doc -->
+		 * <!-- end-user-doc -->
+		 * @generated
+		 */
+		EAttribute INPUT_PORT_INSTANCE__EXTRAPOLATION_COST = eINSTANCE.getInputPortInstance_ExtrapolationCost();
+
 		/**
 		 * The meta object literal for the '<em><b>Internal Value To</b></em>' reference list feature.
 		 * <!-- begin-user-doc -->

+ 28 - 0
HintConfiguration/src-gen/ua/ansymo/hintco/InputPortInstance.java

@@ -13,6 +13,7 @@ import org.eclipse.emf.common.util.EList;
  * The following features are supported:
  * </p>
  * <ul>
+ *   <li>{@link ua.ansymo.hintco.InputPortInstance#getExtrapolationCost <em>Extrapolation Cost</em>}</li>
  *   <li>{@link ua.ansymo.hintco.InputPortInstance#getInternalValueTo <em>Internal Value To</em>}</li>
  *   <li>{@link ua.ansymo.hintco.InputPortInstance#getValueFrom <em>Value From</em>}</li>
  * </ul>
@@ -22,6 +23,33 @@ import org.eclipse.emf.common.util.EList;
  * @generated
  */
 public interface InputPortInstance extends PortInstance {
+	/**
+	 * Returns the value of the '<em><b>Extrapolation Cost</b></em>' attribute.
+	 * The default value is <code>"1.0"</code>.
+	 * <!-- begin-user-doc -->
+	 * <p>
+	 * If the meaning of the '<em>Extrapolation Cost</em>' attribute isn't clear,
+	 * there really should be more of a description here...
+	 * </p>
+	 * <!-- end-user-doc -->
+	 * @return the value of the '<em>Extrapolation Cost</em>' attribute.
+	 * @see #setExtrapolationCost(float)
+	 * @see ua.ansymo.hintco.HintcoPackage#getInputPortInstance_ExtrapolationCost()
+	 * @model default="1.0" unique="false"
+	 * @generated
+	 */
+	float getExtrapolationCost();
+
+	/**
+	 * Sets the value of the '{@link ua.ansymo.hintco.InputPortInstance#getExtrapolationCost <em>Extrapolation Cost</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @param value the new value of the '<em>Extrapolation Cost</em>' attribute.
+	 * @see #getExtrapolationCost()
+	 * @generated
+	 */
+	void setExtrapolationCost(float value);
+
 	/**
 	 * Returns the value of the '<em><b>Internal Value To</b></em>' reference list.
 	 * The list contents are of type {@link ua.ansymo.hintco.OutputPortInstance}.

+ 0 - 28
HintConfiguration/src-gen/ua/ansymo/hintco/PortInstance.java

@@ -14,7 +14,6 @@ import org.eclipse.emf.common.util.EList;
  * </p>
  * <ul>
  *   <li>{@link ua.ansymo.hintco.PortInstance#getUnit <em>Unit</em>}</li>
- *   <li>{@link ua.ansymo.hintco.PortInstance#getExtrapolationCost <em>Extrapolation Cost</em>}</li>
  *   <li>{@link ua.ansymo.hintco.PortInstance#getAdaptation <em>Adaptation</em>}</li>
  * </ul>
  *
@@ -51,33 +50,6 @@ public interface PortInstance extends PrecendenceNode, IDed {
 	 */
 	void setUnit(UnitInstance value);
 
-	/**
-	 * Returns the value of the '<em><b>Extrapolation Cost</b></em>' attribute.
-	 * The default value is <code>"1.0"</code>.
-	 * <!-- begin-user-doc -->
-	 * <p>
-	 * If the meaning of the '<em>Extrapolation Cost</em>' attribute isn't clear,
-	 * there really should be more of a description here...
-	 * </p>
-	 * <!-- end-user-doc -->
-	 * @return the value of the '<em>Extrapolation Cost</em>' attribute.
-	 * @see #setExtrapolationCost(float)
-	 * @see ua.ansymo.hintco.HintcoPackage#getPortInstance_ExtrapolationCost()
-	 * @model default="1.0" unique="false"
-	 * @generated
-	 */
-	float getExtrapolationCost();
-
-	/**
-	 * Sets the value of the '{@link ua.ansymo.hintco.PortInstance#getExtrapolationCost <em>Extrapolation Cost</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @param value the new value of the '<em>Extrapolation Cost</em>' attribute.
-	 * @see #getExtrapolationCost()
-	 * @generated
-	 */
-	void setExtrapolationCost(float value);
-
 	/**
 	 * Returns the value of the '<em><b>Adaptation</b></em>' containment reference.
 	 * It is bidirectional and its opposite is '{@link ua.ansymo.hintco.PortAdaptation#getPort <em>Port</em>}'.

+ 14 - 14
HintConfiguration/src-gen/ua/ansymo/hintco/impl/HintcoPackageImpl.java

@@ -686,22 +686,13 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 		return (EReference)portInstanceEClass.getEStructuralFeatures().get(0);
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public EAttribute getPortInstance_ExtrapolationCost() {
-		return (EAttribute)portInstanceEClass.getEStructuralFeatures().get(1);
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
 	public EReference getPortInstance_Adaptation() {
-		return (EReference)portInstanceEClass.getEStructuralFeatures().get(2);
+		return (EReference)portInstanceEClass.getEStructuralFeatures().get(1);
 	}
 
 	/**
@@ -776,13 +767,22 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 		return inputPortInstanceEClass;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public EAttribute getInputPortInstance_ExtrapolationCost() {
+		return (EAttribute)inputPortInstanceEClass.getEStructuralFeatures().get(0);
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
 	 * @generated
 	 */
 	public EReference getInputPortInstance_InternalValueTo() {
-		return (EReference)inputPortInstanceEClass.getEStructuralFeatures().get(0);
+		return (EReference)inputPortInstanceEClass.getEStructuralFeatures().get(1);
 	}
 
 	/**
@@ -791,7 +791,7 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 	 * @generated
 	 */
 	public EReference getInputPortInstance_ValueFrom() {
-		return (EReference)inputPortInstanceEClass.getEStructuralFeatures().get(1);
+		return (EReference)inputPortInstanceEClass.getEStructuralFeatures().get(2);
 	}
 
 	/**
@@ -1305,7 +1305,6 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 
 		portInstanceEClass = createEClass(PORT_INSTANCE);
 		createEReference(portInstanceEClass, PORT_INSTANCE__UNIT);
-		createEAttribute(portInstanceEClass, PORT_INSTANCE__EXTRAPOLATION_COST);
 		createEReference(portInstanceEClass, PORT_INSTANCE__ADAPTATION);
 		createEOperation(portInstanceEClass, PORT_INSTANCE___SELECTED_ADAPTATIONS);
 		createEOperation(portInstanceEClass, PORT_INSTANCE___IS_INPUT);
@@ -1317,6 +1316,7 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 		createEOperation(hierarchicalUnitPortEClass, HIERARCHICAL_UNIT_PORT___ALT_IS_INPUT);
 
 		inputPortInstanceEClass = createEClass(INPUT_PORT_INSTANCE);
+		createEAttribute(inputPortInstanceEClass, INPUT_PORT_INSTANCE__EXTRAPOLATION_COST);
 		createEReference(inputPortInstanceEClass, INPUT_PORT_INSTANCE__INTERNAL_VALUE_TO);
 		createEReference(inputPortInstanceEClass, INPUT_PORT_INSTANCE__VALUE_FROM);
 		createEOperation(inputPortInstanceEClass, INPUT_PORT_INSTANCE___GET_REAL_VALUE_FROM);
@@ -1505,7 +1505,6 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 
 		initEClass(portInstanceEClass, PortInstance.class, "PortInstance", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
 		initEReference(getPortInstance_Unit(), this.getUnitInstance(), this.getUnitInstance_Ports(), "unit", null, 0, 1, PortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
-		initEAttribute(getPortInstance_ExtrapolationCost(), theEcorePackage.getEFloat(), "extrapolationCost", "1.0", 0, 1, PortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getPortInstance_Adaptation(), this.getPortAdaptation(), this.getPortAdaptation_Port(), "adaptation", null, 0, 1, PortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 
 		initEOperation(getPortInstance__SelectedAdaptations(), this.getPortAdaptation(), "selectedAdaptations", 0, -1, !IS_UNIQUE, IS_ORDERED);
@@ -1524,6 +1523,7 @@ public class HintcoPackageImpl extends EPackageImpl implements HintcoPackage {
 		initEOperation(getHierarchicalUnitPort__AltIsInput(), theEcorePackage.getEBoolean(), "altIsInput", 0, 1, !IS_UNIQUE, IS_ORDERED);
 
 		initEClass(inputPortInstanceEClass, InputPortInstance.class, "InputPortInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+		initEAttribute(getInputPortInstance_ExtrapolationCost(), theEcorePackage.getEFloat(), "extrapolationCost", "1.0", 0, 1, InputPortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getInputPortInstance_InternalValueTo(), this.getOutputPortInstance(), this.getOutputPortInstance_InternalValueFrom(), "internalValueTo", null, 0, -1, InputPortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 		initEReference(getInputPortInstance_ValueFrom(), this.getOutputPortInstance(), this.getOutputPortInstance_ValueTo(), "valueFrom", null, 0, 1, InputPortInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
 

+ 68 - 0
HintConfiguration/src-gen/ua/ansymo/hintco/impl/InputPortInstanceImpl.java

@@ -33,6 +33,7 @@ import ua.ansymo.hintco.PortInstance;
  * The following features are implemented:
  * </p>
  * <ul>
+ *   <li>{@link ua.ansymo.hintco.impl.InputPortInstanceImpl#getExtrapolationCost <em>Extrapolation Cost</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.InputPortInstanceImpl#getInternalValueTo <em>Internal Value To</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.InputPortInstanceImpl#getValueFrom <em>Value From</em>}</li>
  * </ul>
@@ -40,6 +41,26 @@ import ua.ansymo.hintco.PortInstance;
  * @generated
  */
 public class InputPortInstanceImpl extends PortInstanceImpl implements InputPortInstance {
+	/**
+	 * The default value of the '{@link #getExtrapolationCost() <em>Extrapolation Cost</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getExtrapolationCost()
+	 * @generated
+	 * @ordered
+	 */
+	protected static final float EXTRAPOLATION_COST_EDEFAULT = 1.0F;
+
+	/**
+	 * The cached value of the '{@link #getExtrapolationCost() <em>Extrapolation Cost</em>}' attribute.
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @see #getExtrapolationCost()
+	 * @generated
+	 * @ordered
+	 */
+	protected float extrapolationCost = EXTRAPOLATION_COST_EDEFAULT;
+
 	/**
 	 * The cached value of the '{@link #getInternalValueTo() <em>Internal Value To</em>}' reference list.
 	 * <!-- begin-user-doc -->
@@ -79,6 +100,27 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 		return HintcoPackage.Literals.INPUT_PORT_INSTANCE;
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public float getExtrapolationCost() {
+		return extrapolationCost;
+	}
+
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	public void setExtrapolationCost(float newExtrapolationCost) {
+		float oldExtrapolationCost = extrapolationCost;
+		extrapolationCost = newExtrapolationCost;
+		if (eNotificationRequired())
+			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.INPUT_PORT_INSTANCE__EXTRAPOLATION_COST, oldExtrapolationCost, extrapolationCost));
+	}
+
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -244,6 +286,8 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 	@Override
 	public Object eGet(int featureID, boolean resolve, boolean coreType) {
 		switch (featureID) {
+			case HintcoPackage.INPUT_PORT_INSTANCE__EXTRAPOLATION_COST:
+				return getExtrapolationCost();
 			case HintcoPackage.INPUT_PORT_INSTANCE__INTERNAL_VALUE_TO:
 				return getInternalValueTo();
 			case HintcoPackage.INPUT_PORT_INSTANCE__VALUE_FROM:
@@ -262,6 +306,9 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 	@Override
 	public void eSet(int featureID, Object newValue) {
 		switch (featureID) {
+			case HintcoPackage.INPUT_PORT_INSTANCE__EXTRAPOLATION_COST:
+				setExtrapolationCost((Float)newValue);
+				return;
 			case HintcoPackage.INPUT_PORT_INSTANCE__INTERNAL_VALUE_TO:
 				getInternalValueTo().clear();
 				getInternalValueTo().addAll((Collection<? extends OutputPortInstance>)newValue);
@@ -281,6 +328,9 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 	@Override
 	public void eUnset(int featureID) {
 		switch (featureID) {
+			case HintcoPackage.INPUT_PORT_INSTANCE__EXTRAPOLATION_COST:
+				setExtrapolationCost(EXTRAPOLATION_COST_EDEFAULT);
+				return;
 			case HintcoPackage.INPUT_PORT_INSTANCE__INTERNAL_VALUE_TO:
 				getInternalValueTo().clear();
 				return;
@@ -299,6 +349,8 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 	@Override
 	public boolean eIsSet(int featureID) {
 		switch (featureID) {
+			case HintcoPackage.INPUT_PORT_INSTANCE__EXTRAPOLATION_COST:
+				return extrapolationCost != EXTRAPOLATION_COST_EDEFAULT;
 			case HintcoPackage.INPUT_PORT_INSTANCE__INTERNAL_VALUE_TO:
 				return internalValueTo != null && !internalValueTo.isEmpty();
 			case HintcoPackage.INPUT_PORT_INSTANCE__VALUE_FROM:
@@ -342,4 +394,20 @@ public class InputPortInstanceImpl extends PortInstanceImpl implements InputPort
 		return super.eInvoke(operationID, arguments);
 	}
 
+	/**
+	 * <!-- begin-user-doc -->
+	 * <!-- end-user-doc -->
+	 * @generated
+	 */
+	@Override
+	public String toString() {
+		if (eIsProxy()) return super.toString();
+
+		StringBuilder result = new StringBuilder(super.toString());
+		result.append(" (extrapolationCost: ");
+		result.append(extrapolationCost);
+		result.append(')');
+		return result.toString();
+	}
+
 } //InputPortInstanceImpl

+ 0 - 52
HintConfiguration/src-gen/ua/ansymo/hintco/impl/PortInstanceImpl.java

@@ -34,7 +34,6 @@ import ua.ansymo.hintco.UnitInstance;
  * <ul>
  *   <li>{@link ua.ansymo.hintco.impl.PortInstanceImpl#getIdentifier <em>Identifier</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.PortInstanceImpl#getUnit <em>Unit</em>}</li>
- *   <li>{@link ua.ansymo.hintco.impl.PortInstanceImpl#getExtrapolationCost <em>Extrapolation Cost</em>}</li>
  *   <li>{@link ua.ansymo.hintco.impl.PortInstanceImpl#getAdaptation <em>Adaptation</em>}</li>
  * </ul>
  *
@@ -61,26 +60,6 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 	 */
 	protected String identifier = IDENTIFIER_EDEFAULT;
 
-	/**
-	 * The default value of the '{@link #getExtrapolationCost() <em>Extrapolation Cost</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getExtrapolationCost()
-	 * @generated
-	 * @ordered
-	 */
-	protected static final float EXTRAPOLATION_COST_EDEFAULT = 1.0F;
-
-	/**
-	 * The cached value of the '{@link #getExtrapolationCost() <em>Extrapolation Cost</em>}' attribute.
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @see #getExtrapolationCost()
-	 * @generated
-	 * @ordered
-	 */
-	protected float extrapolationCost = EXTRAPOLATION_COST_EDEFAULT;
-
 	/**
 	 * The cached value of the '{@link #getAdaptation() <em>Adaptation</em>}' containment reference.
 	 * <!-- begin-user-doc -->
@@ -182,27 +161,6 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.PORT_INSTANCE__UNIT, newUnit, newUnit));
 	}
 
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public float getExtrapolationCost() {
-		return extrapolationCost;
-	}
-
-	/**
-	 * <!-- begin-user-doc -->
-	 * <!-- end-user-doc -->
-	 * @generated
-	 */
-	public void setExtrapolationCost(float newExtrapolationCost) {
-		float oldExtrapolationCost = extrapolationCost;
-		extrapolationCost = newExtrapolationCost;
-		if (eNotificationRequired())
-			eNotify(new ENotificationImpl(this, Notification.SET, HintcoPackage.PORT_INSTANCE__EXTRAPOLATION_COST, oldExtrapolationCost, extrapolationCost));
-	}
-
 	/**
 	 * <!-- begin-user-doc -->
 	 * <!-- end-user-doc -->
@@ -363,8 +321,6 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 			case HintcoPackage.PORT_INSTANCE__UNIT:
 				if (resolve) return getUnit();
 				return basicGetUnit();
-			case HintcoPackage.PORT_INSTANCE__EXTRAPOLATION_COST:
-				return getExtrapolationCost();
 			case HintcoPackage.PORT_INSTANCE__ADAPTATION:
 				return getAdaptation();
 		}
@@ -385,9 +341,6 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 			case HintcoPackage.PORT_INSTANCE__UNIT:
 				setUnit((UnitInstance)newValue);
 				return;
-			case HintcoPackage.PORT_INSTANCE__EXTRAPOLATION_COST:
-				setExtrapolationCost((Float)newValue);
-				return;
 			case HintcoPackage.PORT_INSTANCE__ADAPTATION:
 				setAdaptation((PortAdaptation)newValue);
 				return;
@@ -409,9 +362,6 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 			case HintcoPackage.PORT_INSTANCE__UNIT:
 				setUnit((UnitInstance)null);
 				return;
-			case HintcoPackage.PORT_INSTANCE__EXTRAPOLATION_COST:
-				setExtrapolationCost(EXTRAPOLATION_COST_EDEFAULT);
-				return;
 			case HintcoPackage.PORT_INSTANCE__ADAPTATION:
 				setAdaptation((PortAdaptation)null);
 				return;
@@ -431,8 +381,6 @@ public abstract class PortInstanceImpl extends PrecendenceNodeImpl implements Po
 				return IDENTIFIER_EDEFAULT == null ? identifier != null : !IDENTIFIER_EDEFAULT.equals(identifier);
 			case HintcoPackage.PORT_INSTANCE__UNIT:
 				return basicGetUnit() != null;
-			case HintcoPackage.PORT_INSTANCE__EXTRAPOLATION_COST:
-				return extrapolationCost != EXTRAPOLATION_COST_EDEFAULT;
 			case HintcoPackage.PORT_INSTANCE__ADAPTATION:
 				return adaptation != null;
 		}