'''
}
- static def dispatch String getRichTextValue(CompareCellContent content) {
+ static def dispatch String getRichTextValue(
+ CompareStateCellContent content) {
val result = formatCompareContent(
- content.oldValue,
- content.newValue,
+ content.oldValue.stringValueIterable,
+ content.newValue.stringValueIterable,
[WARNING_MARK_YELLOW],
[WARNING_MARK_BLACK],
[WARNING_MARK_RED],
@@ -184,8 +187,9 @@ class CellContentExtensions {
return content.value.iterableToString(content.separator)
}
- static def dispatch String getPlainStringValue(CompareCellContent content) {
- return '''«content.oldValue»/«content.newValue»'''
+ static def dispatch String getPlainStringValue(
+ CompareStateCellContent content) {
+ return '''«content.oldValue.stringValueIterable»/«content.newValue.stringValueIterable»'''
}
static def dispatch String getPlainStringValue(
@@ -217,6 +221,10 @@ class CellContentExtensions {
return content.value
}
+ static def List getStringValueList(CellContent content) {
+ return content.stringValueIterable.toList
+ }
+
/**
* @param text the text
*
@@ -311,9 +319,10 @@ class CellContentExtensions {
content.value.filterNull.toSet.toList.map [
postFormatter.apply(it, commonFormatter.apply(it))
]
- CompareCellContent:
- formatCompareContent(content.oldValue, content.newValue,
- oldFormatter, commonFormatter, newFormatter, postFormatter)
+ CompareStateCellContent:
+ formatCompareContent(content.oldValue.stringValueIterable,
+ content.newValue.stringValueIterable, oldFormatter,
+ commonFormatter, newFormatter, postFormatter)
CompareTableCellContent:
formatCompareContent(content.mainPlanCellContent, oldFormatter,
commonFormatter, newFormatter, postFormatter)
@@ -430,4 +439,15 @@ class CellContentExtensions {
def static boolean isEqual(CellContent content, CellContent other) {
return content.plainStringValue.equals(other.plainStringValue)
}
+
+ def static StringCellContent createStringCellContent(String value) {
+ return createStringCellContent(#[value])
+ }
+
+ def static StringCellContent createStringCellContent(
+ Iterable value) {
+ val cellContent = TablemodelFactory.eINSTANCE.createStringCellContent
+ cellContent.value.addAll(value)
+ return cellContent
+ }
}
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/model/tablemodel.ecore b/java/bundles/org.eclipse.set.model.tablemodel/model/tablemodel.ecore
index 03148d0b6e..d2ceb384bb 100644
--- a/java/bundles/org.eclipse.set.model.tablemodel/model/tablemodel.ecore
+++ b/java/bundles/org.eclipse.set.model.tablemodel/model/tablemodel.ecore
@@ -154,22 +154,14 @@
-
+
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/model/tablemodel.genmodel b/java/bundles/org.eclipse.set.model.tablemodel/model/tablemodel.genmodel
index 5903ab4377..55db599a75 100644
--- a/java/bundles/org.eclipse.set.model.tablemodel/model/tablemodel.genmodel
+++ b/java/bundles/org.eclipse.set.model.tablemodel/model/tablemodel.genmodel
@@ -63,9 +63,9 @@
-
-
-
+
+
+
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/CompareCellContent.java b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/CompareCellContent.java
deleted file mode 100644
index 70861e00c9..0000000000
--- a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/CompareCellContent.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/**
- * Copyright (c) 2022 DB Netz AG and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v2.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v20.html
- */
-package org.eclipse.set.model.tablemodel;
-
-import org.eclipse.emf.common.util.EList;
-
-/**
- * A representation of the model object 'Compare
- * Cell Content'.
- *
- * Result of a compare operation between two cells.
- *
- *
- *
- * The following features are supported:
- *
- *
- *
{@link org.eclipse.set.model.tablemodel.CompareCellContent#getOldValue
- * Old Value}
- *
{@link org.eclipse.set.model.tablemodel.CompareCellContent#getNewValue
- * New Value}
- *
- *
- * @see org.eclipse.set.model.tablemodel.TablemodelPackage#getCompareCellContent()
- * @model
- * @generated
- */
-public interface CompareCellContent extends CellContent {
- /**
- * Returns the value of the 'Old Value' attribute list. The
- * list contents are of type {@link java.lang.String}. The old value
- *
- * @return the value of the 'Old Value' attribute list.
- * @see org.eclipse.set.model.tablemodel.TablemodelPackage#getCompareCellContent_OldValue()
- * @model
- * @generated
- */
- EList getOldValue();
-
- /**
- * Returns the value of the 'New Value' attribute list. The
- * list contents are of type {@link java.lang.String}. The new value
- *
- * @return the value of the 'New Value' attribute list.
- * @see org.eclipse.set.model.tablemodel.TablemodelPackage#getCompareCellContent_NewValue()
- * @model
- * @generated
- */
- EList getNewValue();
-
-} // CompareCellContent
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/CompareStateCellContent.java b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/CompareStateCellContent.java
new file mode 100644
index 0000000000..6216ae66d6
--- /dev/null
+++ b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/CompareStateCellContent.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright (c) 2022 DB Netz AG and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ */
+package org.eclipse.set.model.tablemodel;
+
+/**
+ * A representation of the model object 'Compare
+ * State Cell Content'.
+ *
+ * Result of a compare operation between two cells.
+ *
+ *
+ *
+ * The following features are supported:
+ *
+ *
+ *
{@link org.eclipse.set.model.tablemodel.CompareStateCellContent#getOldValue
+ * Old Value}
+ *
{@link org.eclipse.set.model.tablemodel.CompareStateCellContent#getNewValue
+ * New Value}
+ *
+ *
+ * @see org.eclipse.set.model.tablemodel.TablemodelPackage#getCompareStateCellContent()
+ * @model
+ * @generated
+ */
+public interface CompareStateCellContent extends CellContent {
+ /**
+ * Returns the value of the 'Old Value' containment
+ * reference.
+ *
+ * @return the value of the 'Old Value' containment reference.
+ * @see #setOldValue(CellContent)
+ * @see org.eclipse.set.model.tablemodel.TablemodelPackage#getCompareStateCellContent_OldValue()
+ * @model containment="true"
+ * @generated
+ */
+ CellContent getOldValue();
+
+ /**
+ * Sets the value of the
+ * '{@link org.eclipse.set.model.tablemodel.CompareStateCellContent#getOldValue
+ * Old Value}' containment reference.
+ *
+ * @param value
+ * the new value of the 'Old Value' containment
+ * reference.
+ * @see #getOldValue()
+ * @generated
+ */
+ void setOldValue(CellContent value);
+
+ /**
+ * Returns the value of the 'New Value' containment
+ * reference.
+ *
+ * @return the value of the 'New Value' containment reference.
+ * @see #setNewValue(CellContent)
+ * @see org.eclipse.set.model.tablemodel.TablemodelPackage#getCompareStateCellContent_NewValue()
+ * @model containment="true"
+ * @generated
+ */
+ CellContent getNewValue();
+
+ /**
+ * Sets the value of the
+ * '{@link org.eclipse.set.model.tablemodel.CompareStateCellContent#getNewValue
+ * New Value}' containment reference.
+ *
+ * @param value
+ * the new value of the 'New Value' containment
+ * reference.
+ * @see #getNewValue()
+ * @generated
+ */
+ void setNewValue(CellContent value);
+
+} // CompareStateCellContent
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/TablemodelFactory.java b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/TablemodelFactory.java
index 4e06d84410..837e2cbcc1 100644
--- a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/TablemodelFactory.java
+++ b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/TablemodelFactory.java
@@ -91,13 +91,13 @@ public interface TablemodelFactory extends EFactory {
StringCellContent createStringCellContent();
/**
- * Returns a new object of class 'Compare Cell Content'.
*
- * @return a new object of class 'Compare Cell Content'.
+ * @return a new object of class 'Compare State Cell Content'.
* @generated
*/
- CompareCellContent createCompareCellContent();
+ CompareStateCellContent createCompareStateCellContent();
/**
* Returns a new object of class 'Cell Annotation'.
*
- * @see org.eclipse.set.model.tablemodel.impl.CompareCellContentImpl
- * @see org.eclipse.set.model.tablemodel.impl.TablemodelPackageImpl#getCompareCellContent()
+ * @see org.eclipse.set.model.tablemodel.impl.CompareStateCellContentImpl
+ * @see org.eclipse.set.model.tablemodel.impl.TablemodelPackageImpl#getCompareStateCellContent()
* @generated
*/
- int COMPARE_CELL_CONTENT = 8;
+ int COMPARE_STATE_CELL_CONTENT = 8;
/**
* The feature id for the 'Separator' attribute.
+ * The feature id for the 'Old Value' containment reference.
+ *
*
* @generated
* @ordered
*/
- int COMPARE_CELL_CONTENT__OLD_VALUE = CELL_CONTENT_FEATURE_COUNT + 0;
+ int COMPARE_STATE_CELL_CONTENT__OLD_VALUE = CELL_CONTENT_FEATURE_COUNT + 0;
/**
- * The feature id for the 'New Value' attribute list.
+ * The feature id for the 'New Value' containment reference.
+ *
*
* @generated
* @ordered
*/
- int COMPARE_CELL_CONTENT__NEW_VALUE = CELL_CONTENT_FEATURE_COUNT + 1;
+ int COMPARE_STATE_CELL_CONTENT__NEW_VALUE = CELL_CONTENT_FEATURE_COUNT + 1;
/**
- * The number of structural features of the 'Compare Cell Content'
- * class.
+ * The number of structural features of the 'Compare State Cell
+ * Content' class.
*
* @generated
* @ordered
*/
- int COMPARE_CELL_CONTENT_FEATURE_COUNT = CELL_CONTENT_FEATURE_COUNT + 2;
+ int COMPARE_STATE_CELL_CONTENT_FEATURE_COUNT = CELL_CONTENT_FEATURE_COUNT
+ + 2;
/**
- * The number of operations of the 'Compare Cell Content' class.
- *
+ * The number of operations of the 'Compare State Cell Content'
+ * class.
*
* @generated
* @ordered
*/
- int COMPARE_CELL_CONTENT_OPERATION_COUNT = CELL_CONTENT_OPERATION_COUNT + 0;
+ int COMPARE_STATE_CELL_CONTENT_OPERATION_COUNT = CELL_CONTENT_OPERATION_COUNT
+ + 0;
/**
* The meta object id for the
@@ -1448,38 +1450,41 @@ public interface TablemodelPackage extends EPackage {
/**
* Returns the meta object for class
- * '{@link org.eclipse.set.model.tablemodel.CompareCellContent Compare
- * Cell Content}'.
+ * '{@link org.eclipse.set.model.tablemodel.CompareStateCellContent
+ * Compare State Cell Content}'.
*
- * @return the meta object for class 'Compare Cell Content'.
- * @see org.eclipse.set.model.tablemodel.CompareCellContent
+ * @return the meta object for class 'Compare State Cell Content'.
+ * @see org.eclipse.set.model.tablemodel.CompareStateCellContent
* @generated
*/
- EClass getCompareCellContent();
+ EClass getCompareStateCellContent();
/**
- * Returns the meta object for the attribute list
- * '{@link org.eclipse.set.model.tablemodel.CompareCellContent#getOldValue
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.set.model.tablemodel.CompareStateCellContent#getOldValue
* Old Value}'.
*
- * @return the meta object for the attribute list 'Old Value'.
- * @see org.eclipse.set.model.tablemodel.CompareCellContent#getOldValue()
- * @see #getCompareCellContent()
+ * @return the meta object for the containment reference 'Old
+ * Value'.
+ * @see org.eclipse.set.model.tablemodel.CompareStateCellContent#getOldValue()
+ * @see #getCompareStateCellContent()
* @generated
*/
- EAttribute getCompareCellContent_OldValue();
+ EReference getCompareStateCellContent_OldValue();
/**
- * Returns the meta object for the attribute list
- * '{@link org.eclipse.set.model.tablemodel.CompareCellContent#getNewValue
+ * Returns the meta object for the containment reference
+ * '{@link org.eclipse.set.model.tablemodel.CompareStateCellContent#getNewValue
* New Value}'.
*
- * @return the meta object for the attribute list 'New Value'.
- * @see org.eclipse.set.model.tablemodel.CompareCellContent#getNewValue()
- * @see #getCompareCellContent()
+ * @return the meta object for the containment reference 'New
+ * Value'.
+ * @see org.eclipse.set.model.tablemodel.CompareStateCellContent#getNewValue()
+ * @see #getCompareStateCellContent()
* @generated
*/
- EAttribute getCompareCellContent_NewValue();
+ EReference getCompareStateCellContent_NewValue();
/**
* Returns the meta object for class
@@ -2121,33 +2126,36 @@ interface Literals {
/**
* The meta object literal for the
- * '{@link org.eclipse.set.model.tablemodel.impl.CompareCellContentImpl
- * Compare Cell Content}' class.
+ * '{@link org.eclipse.set.model.tablemodel.impl.CompareStateCellContentImpl
+ * Compare State Cell Content}' class.
+ *
*
- * @see org.eclipse.set.model.tablemodel.impl.CompareCellContentImpl
- * @see org.eclipse.set.model.tablemodel.impl.TablemodelPackageImpl#getCompareCellContent()
+ * @see org.eclipse.set.model.tablemodel.impl.CompareStateCellContentImpl
+ * @see org.eclipse.set.model.tablemodel.impl.TablemodelPackageImpl#getCompareStateCellContent()
* @generated
*/
- EClass COMPARE_CELL_CONTENT = eINSTANCE.getCompareCellContent();
+ EClass COMPARE_STATE_CELL_CONTENT = eINSTANCE
+ .getCompareStateCellContent();
/**
- * The meta object literal for the 'Old Value' attribute
- * list feature.
+ * The meta object literal for the 'Old Value'
+ * containment reference feature.
*
* @generated
*/
- EAttribute COMPARE_CELL_CONTENT__OLD_VALUE = eINSTANCE
- .getCompareCellContent_OldValue();
+ EReference COMPARE_STATE_CELL_CONTENT__OLD_VALUE = eINSTANCE
+ .getCompareStateCellContent_OldValue();
/**
- * The meta object literal for the 'New Value' attribute
- * list feature.
+ * The meta object literal for the 'New Value'
+ * containment reference feature.
*
* @generated
*/
- EAttribute COMPARE_CELL_CONTENT__NEW_VALUE = eINSTANCE
- .getCompareCellContent_NewValue();
+ EReference COMPARE_STATE_CELL_CONTENT__NEW_VALUE = eINSTANCE
+ .getCompareStateCellContent_NewValue();
/**
* The meta object literal for the
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/CompareCellContentImpl.java b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/CompareCellContentImpl.java
deleted file mode 100644
index 7328d8c8f1..0000000000
--- a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/CompareCellContentImpl.java
+++ /dev/null
@@ -1,192 +0,0 @@
-/**
- * Copyright (c) 2022 DB Netz AG and others.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v2.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v20.html
- */
-package org.eclipse.set.model.tablemodel.impl;
-
-import java.util.Collection;
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.util.EDataTypeUniqueEList;
-import org.eclipse.set.model.tablemodel.CompareCellContent;
-import org.eclipse.set.model.tablemodel.TablemodelPackage;
-
-/**
- * An implementation of the model object 'Compare
- * Cell Content'.
- *
- * The following features are implemented:
- *
- *
- *
{@link org.eclipse.set.model.tablemodel.impl.CompareCellContentImpl#getOldValue
- * Old Value}
- *
{@link org.eclipse.set.model.tablemodel.impl.CompareCellContentImpl#getNewValue
- * New Value}
- *
- *
- * @generated
- */
-public class CompareCellContentImpl extends CellContentImpl
- implements CompareCellContent {
- /**
- * The cached value of the '{@link #getOldValue() Old Value}'
- * attribute list.
- *
- * @see #getOldValue()
- * @generated
- * @ordered
- */
- protected EList oldValue;
-
- /**
- * The cached value of the '{@link #getNewValue() New Value}'
- * attribute list.
- *
- * @see #getNewValue()
- * @generated
- * @ordered
- */
- protected EList newValue;
-
- /**
- *
- *
- * @generated
- */
- protected CompareCellContentImpl() {
- super();
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return TablemodelPackage.Literals.COMPARE_CELL_CONTENT;
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public EList getOldValue() {
- if (oldValue == null) {
- oldValue = new EDataTypeUniqueEList(String.class, this,
- TablemodelPackage.COMPARE_CELL_CONTENT__OLD_VALUE);
- }
- return oldValue;
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public EList getNewValue() {
- if (newValue == null) {
- newValue = new EDataTypeUniqueEList(String.class, this,
- TablemodelPackage.COMPARE_CELL_CONTENT__NEW_VALUE);
- }
- return newValue;
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case TablemodelPackage.COMPARE_CELL_CONTENT__OLD_VALUE:
- return getOldValue();
- case TablemodelPackage.COMPARE_CELL_CONTENT__NEW_VALUE:
- return getNewValue();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- *
- *
- * @generated
- */
- @SuppressWarnings("unchecked")
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case TablemodelPackage.COMPARE_CELL_CONTENT__OLD_VALUE:
- getOldValue().clear();
- getOldValue().addAll((Collection extends String>) newValue);
- return;
- case TablemodelPackage.COMPARE_CELL_CONTENT__NEW_VALUE:
- getNewValue().clear();
- getNewValue().addAll((Collection extends String>) newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case TablemodelPackage.COMPARE_CELL_CONTENT__OLD_VALUE:
- getOldValue().clear();
- return;
- case TablemodelPackage.COMPARE_CELL_CONTENT__NEW_VALUE:
- getNewValue().clear();
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case TablemodelPackage.COMPARE_CELL_CONTENT__OLD_VALUE:
- return oldValue != null && !oldValue.isEmpty();
- case TablemodelPackage.COMPARE_CELL_CONTENT__NEW_VALUE:
- return newValue != null && !newValue.isEmpty();
- }
- return super.eIsSet(featureID);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy())
- return super.toString();
-
- StringBuilder result = new StringBuilder(super.toString());
- result.append(" (oldValue: ");
- result.append(oldValue);
- result.append(", newValue: ");
- result.append(newValue);
- result.append(')');
- return result.toString();
- }
-
-} // CompareCellContentImpl
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/CompareStateCellContentImpl.java b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/CompareStateCellContentImpl.java
new file mode 100644
index 0000000000..fcaa5bea05
--- /dev/null
+++ b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/CompareStateCellContentImpl.java
@@ -0,0 +1,284 @@
+/**
+ * Copyright (c) 2022 DB Netz AG and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v2.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v20.html
+ */
+package org.eclipse.set.model.tablemodel.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+import org.eclipse.set.model.tablemodel.CellContent;
+import org.eclipse.set.model.tablemodel.CompareStateCellContent;
+import org.eclipse.set.model.tablemodel.TablemodelPackage;
+
+/**
+ * An implementation of the model object 'Compare
+ * State Cell Content'.
+ *
+ * The following features are implemented:
+ *
+ *
+ *
{@link org.eclipse.set.model.tablemodel.impl.CompareStateCellContentImpl#getOldValue
+ * Old Value}
+ *
{@link org.eclipse.set.model.tablemodel.impl.CompareStateCellContentImpl#getNewValue
+ * New Value}
+ *
+ *
+ * @generated
+ */
+public class CompareStateCellContentImpl extends CellContentImpl
+ implements CompareStateCellContent {
+ /**
+ * The cached value of the '{@link #getOldValue() Old Value}'
+ * containment reference.
+ *
+ * @see #getOldValue()
+ * @generated
+ * @ordered
+ */
+ protected CellContent oldValue;
+
+ /**
+ * The cached value of the '{@link #getNewValue() New Value}'
+ * containment reference.
+ *
+ * @see #getNewValue()
+ * @generated
+ * @ordered
+ */
+ protected CellContent newValue;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected CompareStateCellContentImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return TablemodelPackage.Literals.COMPARE_STATE_CELL_CONTENT;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public CellContent getOldValue() {
+ return oldValue;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public NotificationChain basicSetOldValue(CellContent newOldValue,
+ NotificationChain msgs) {
+ CellContent oldOldValue = oldValue;
+ oldValue = newOldValue;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this,
+ Notification.SET,
+ TablemodelPackage.COMPARE_STATE_CELL_CONTENT__OLD_VALUE,
+ oldOldValue, newOldValue);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setOldValue(CellContent newOldValue) {
+ if (newOldValue != oldValue) {
+ NotificationChain msgs = null;
+ if (oldValue != null)
+ msgs = ((InternalEObject) oldValue).eInverseRemove(this,
+ EOPPOSITE_FEATURE_BASE
+ - TablemodelPackage.COMPARE_STATE_CELL_CONTENT__OLD_VALUE,
+ null, msgs);
+ if (newOldValue != null)
+ msgs = ((InternalEObject) newOldValue).eInverseAdd(this,
+ EOPPOSITE_FEATURE_BASE
+ - TablemodelPackage.COMPARE_STATE_CELL_CONTENT__OLD_VALUE,
+ null, msgs);
+ msgs = basicSetOldValue(newOldValue, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ TablemodelPackage.COMPARE_STATE_CELL_CONTENT__OLD_VALUE,
+ newOldValue, newOldValue));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public CellContent getNewValue() {
+ return newValue;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public NotificationChain basicSetNewValue(CellContent newNewValue,
+ NotificationChain msgs) {
+ CellContent oldNewValue = newValue;
+ newValue = newNewValue;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this,
+ Notification.SET,
+ TablemodelPackage.COMPARE_STATE_CELL_CONTENT__NEW_VALUE,
+ oldNewValue, newNewValue);
+ if (msgs == null)
+ msgs = notification;
+ else
+ msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setNewValue(CellContent newNewValue) {
+ if (newNewValue != newValue) {
+ NotificationChain msgs = null;
+ if (newValue != null)
+ msgs = ((InternalEObject) newValue).eInverseRemove(this,
+ EOPPOSITE_FEATURE_BASE
+ - TablemodelPackage.COMPARE_STATE_CELL_CONTENT__NEW_VALUE,
+ null, msgs);
+ if (newNewValue != null)
+ msgs = ((InternalEObject) newNewValue).eInverseAdd(this,
+ EOPPOSITE_FEATURE_BASE
+ - TablemodelPackage.COMPARE_STATE_CELL_CONTENT__NEW_VALUE,
+ null, msgs);
+ msgs = basicSetNewValue(newNewValue, msgs);
+ if (msgs != null)
+ msgs.dispatch();
+ } else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET,
+ TablemodelPackage.COMPARE_STATE_CELL_CONTENT__NEW_VALUE,
+ newNewValue, newNewValue));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd,
+ int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT__OLD_VALUE:
+ return basicSetOldValue(null, msgs);
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT__NEW_VALUE:
+ return basicSetNewValue(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT__OLD_VALUE:
+ return getOldValue();
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT__NEW_VALUE:
+ return getNewValue();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT__OLD_VALUE:
+ setOldValue((CellContent) newValue);
+ return;
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT__NEW_VALUE:
+ setNewValue((CellContent) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT__OLD_VALUE:
+ setOldValue((CellContent) null);
+ return;
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT__NEW_VALUE:
+ setNewValue((CellContent) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT__OLD_VALUE:
+ return oldValue != null;
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT__NEW_VALUE:
+ return newValue != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} // CompareStateCellContentImpl
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/TablemodelFactoryImpl.java b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/TablemodelFactoryImpl.java
index 5884444a05..437c2b1cb4 100644
--- a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/TablemodelFactoryImpl.java
+++ b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/TablemodelFactoryImpl.java
@@ -78,8 +78,8 @@ public EObject create(EClass eClass) {
return createTableCell();
case TablemodelPackage.STRING_CELL_CONTENT:
return createStringCellContent();
- case TablemodelPackage.COMPARE_CELL_CONTENT:
- return createCompareCellContent();
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT:
+ return createCompareStateCellContent();
case TablemodelPackage.CELL_ANNOTATION:
return createCellAnnotation();
case TablemodelPackage.MULTI_COLOR_CELL_CONTENT:
@@ -227,9 +227,9 @@ public StringCellContent createStringCellContent() {
* @generated
*/
@Override
- public CompareCellContent createCompareCellContent() {
- CompareCellContentImpl compareCellContent = new CompareCellContentImpl();
- return compareCellContent;
+ public CompareStateCellContent createCompareStateCellContent() {
+ CompareStateCellContentImpl compareStateCellContent = new CompareStateCellContentImpl();
+ return compareStateCellContent;
}
/**
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/TablemodelPackageImpl.java b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/TablemodelPackageImpl.java
index 37e0965751..3b6e398821 100644
--- a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/TablemodelPackageImpl.java
+++ b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/impl/TablemodelPackageImpl.java
@@ -22,8 +22,8 @@
import org.eclipse.set.model.tablemodel.CellContent;
import org.eclipse.set.model.tablemodel.ColumnDescriptor;
import org.eclipse.set.model.tablemodel.ColumnWidthMode;
-import org.eclipse.set.model.tablemodel.CompareCellContent;
import org.eclipse.set.model.tablemodel.CompareFootnoteContainer;
+import org.eclipse.set.model.tablemodel.CompareStateCellContent;
import org.eclipse.set.model.tablemodel.CompareTableCellContent;
import org.eclipse.set.model.tablemodel.CompareTableFootnoteContainer;
import org.eclipse.set.model.tablemodel.FootnoteContainer;
@@ -137,7 +137,7 @@ public class TablemodelPackageImpl extends EPackageImpl
*
* @generated
*/
- private EClass compareCellContentEClass = null;
+ private EClass compareStateCellContentEClass = null;
/**
*
@@ -660,8 +660,8 @@ public EAttribute getStringCellContent_Value() {
* @generated
*/
@Override
- public EClass getCompareCellContent() {
- return compareCellContentEClass;
+ public EClass getCompareStateCellContent() {
+ return compareStateCellContentEClass;
}
/**
@@ -670,8 +670,9 @@ public EClass getCompareCellContent() {
* @generated
*/
@Override
- public EAttribute getCompareCellContent_OldValue() {
- return (EAttribute) compareCellContentEClass.getEStructuralFeatures()
+ public EReference getCompareStateCellContent_OldValue() {
+ return (EReference) compareStateCellContentEClass
+ .getEStructuralFeatures()
.get(0);
}
@@ -681,8 +682,9 @@ public EAttribute getCompareCellContent_OldValue() {
* @generated
*/
@Override
- public EAttribute getCompareCellContent_NewValue() {
- return (EAttribute) compareCellContentEClass.getEStructuralFeatures()
+ public EReference getCompareStateCellContent_NewValue() {
+ return (EReference) compareStateCellContentEClass
+ .getEStructuralFeatures()
.get(1);
}
@@ -1029,11 +1031,12 @@ public void createPackageContents() {
stringCellContentEClass = createEClass(STRING_CELL_CONTENT);
createEAttribute(stringCellContentEClass, STRING_CELL_CONTENT__VALUE);
- compareCellContentEClass = createEClass(COMPARE_CELL_CONTENT);
- createEAttribute(compareCellContentEClass,
- COMPARE_CELL_CONTENT__OLD_VALUE);
- createEAttribute(compareCellContentEClass,
- COMPARE_CELL_CONTENT__NEW_VALUE);
+ compareStateCellContentEClass = createEClass(
+ COMPARE_STATE_CELL_CONTENT);
+ createEReference(compareStateCellContentEClass,
+ COMPARE_STATE_CELL_CONTENT__OLD_VALUE);
+ createEReference(compareStateCellContentEClass,
+ COMPARE_STATE_CELL_CONTENT__NEW_VALUE);
cellAnnotationEClass = createEClass(CELL_ANNOTATION);
@@ -1123,7 +1126,8 @@ public void initializePackageContents() {
// Add supertypes to classes
stringCellContentEClass.getESuperTypes().add(this.getCellContent());
- compareCellContentEClass.getESuperTypes().add(this.getCellContent());
+ compareStateCellContentEClass.getESuperTypes()
+ .add(this.getCellContent());
multiColorCellContentEClass.getESuperTypes().add(this.getCellContent());
compareFootnoteContainerEClass.getESuperTypes()
.add(this.getFootnoteContainer());
@@ -1268,19 +1272,19 @@ public void initializePackageContents() {
!IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE,
!IS_DERIVED, IS_ORDERED);
- initEClass(compareCellContentEClass, CompareCellContent.class,
- "CompareCellContent", !IS_ABSTRACT, !IS_INTERFACE,
+ initEClass(compareStateCellContentEClass, CompareStateCellContent.class,
+ "CompareStateCellContent", !IS_ABSTRACT, !IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getCompareCellContent_OldValue(),
- ecorePackage.getEString(), "oldValue", null, 0, -1,
- CompareCellContent.class, !IS_TRANSIENT, !IS_VOLATILE,
- IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
- initEAttribute(getCompareCellContent_NewValue(),
- ecorePackage.getEString(), "newValue", null, 0, -1,
- CompareCellContent.class, !IS_TRANSIENT, !IS_VOLATILE,
- IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED,
- IS_ORDERED);
+ initEReference(getCompareStateCellContent_OldValue(),
+ this.getCellContent(), null, "oldValue", null, 0, 1,
+ CompareStateCellContent.class, !IS_TRANSIENT, !IS_VOLATILE,
+ IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getCompareStateCellContent_NewValue(),
+ this.getCellContent(), null, "newValue", null, 0, 1,
+ CompareStateCellContent.class, !IS_TRANSIENT, !IS_VOLATILE,
+ IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(cellAnnotationEClass, CellAnnotation.class, "CellAnnotation",
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/util/TablemodelAdapterFactory.java b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/util/TablemodelAdapterFactory.java
index 2f623acc1b..13dd464f93 100644
--- a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/util/TablemodelAdapterFactory.java
+++ b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/util/TablemodelAdapterFactory.java
@@ -113,8 +113,9 @@ public Adapter caseStringCellContent(StringCellContent object) {
}
@Override
- public Adapter caseCompareCellContent(CompareCellContent object) {
- return createCompareCellContentAdapter();
+ public Adapter caseCompareStateCellContent(
+ CompareStateCellContent object) {
+ return createCompareStateCellContentAdapter();
}
@Override
@@ -312,17 +313,17 @@ public Adapter createStringCellContentAdapter() {
/**
* Creates a new adapter for an object of class
- * '{@link org.eclipse.set.model.tablemodel.CompareCellContent Compare
- * Cell Content}'. This default implementation
- * returns null so that we can easily ignore cases; it's useful to ignore a
- * case when inheritance will catch all the cases anyway.
+ * '{@link org.eclipse.set.model.tablemodel.CompareStateCellContent
+ * Compare State Cell Content}'. This
+ * default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases
+ * anyway.
*
* @return the new adapter.
- * @see org.eclipse.set.model.tablemodel.CompareCellContent
+ * @see org.eclipse.set.model.tablemodel.CompareStateCellContent
* @generated
*/
- public Adapter createCompareCellContentAdapter() {
+ public Adapter createCompareStateCellContentAdapter() {
return null;
}
diff --git a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/util/TablemodelSwitch.java b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/util/TablemodelSwitch.java
index 45dbf8f717..09cdbf68aa 100644
--- a/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/util/TablemodelSwitch.java
+++ b/java/bundles/org.eclipse.set.model.tablemodel/src/org/eclipse/set/model/tablemodel/util/TablemodelSwitch.java
@@ -130,11 +130,11 @@ protected T doSwitch(int classifierID, EObject theEObject) {
result = defaultCase(theEObject);
return result;
}
- case TablemodelPackage.COMPARE_CELL_CONTENT: {
- CompareCellContent compareCellContent = (CompareCellContent) theEObject;
- T result = caseCompareCellContent(compareCellContent);
+ case TablemodelPackage.COMPARE_STATE_CELL_CONTENT: {
+ CompareStateCellContent compareStateCellContent = (CompareStateCellContent) theEObject;
+ T result = caseCompareStateCellContent(compareStateCellContent);
if (result == null)
- result = caseCellContent(compareCellContent);
+ result = caseCellContent(compareStateCellContent);
if (result == null)
result = defaultCase(theEObject);
return result;
@@ -360,18 +360,18 @@ public T caseStringCellContent(StringCellContent object) {
/**
* Returns the result of interpreting the object as an instance of
- * 'Compare Cell Content'. This
+ * 'Compare State Cell Content'. This
* implementation returns null; returning a non-null result will terminate
* the switch.
*
* @param object
* the target of the switch.
* @return the result of interpreting the object as an instance of
- * 'Compare Cell Content'.
+ * 'Compare State Cell Content'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseCompareCellContent(CompareCellContent object) {
+ public T caseCompareStateCellContent(CompareStateCellContent object) {
return null;
}
diff --git a/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/BedienBezirkExtensions.xtend b/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/BedienBezirkExtensions.xtend
index 2061efaf85..ef06b576ab 100644
--- a/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/BedienBezirkExtensions.xtend
+++ b/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/BedienBezirkExtensions.xtend
@@ -13,6 +13,7 @@ import org.eclipse.set.model.planpro.Bedienung.Bedien_Bezirk
import org.eclipse.set.model.planpro.Bedienung.Bedien_Zentrale
import static extension org.eclipse.set.ppmodel.extensions.ESTW_ZentraleinheitExtensions.*
+import static extension org.eclipse.set.ppmodel.extensions.StellBereichExtensions.*
/**
* Extensions for {@link Bedien_Bezirk}.
@@ -34,6 +35,6 @@ class BedienBezirkExtensions extends BasisObjektExtensions {
return bedienBezirk.container.ESTWZentraleinheit.filterNull.filter [
bedienBezirkVirtuell === bedienBezirk ||
bedienBezirkZentral === bedienBezirk
- ].exists[StellBereichExtensions.isInControlArea(controlArea, it)]
+ ].exists[isInControlArea(controlArea, it)]
}
}
diff --git a/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/MultiContainer_AttributeGroupExtensions.xtend b/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/MultiContainer_AttributeGroupExtensions.xtend
index 6d5edd300f..9a5419d002 100644
--- a/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/MultiContainer_AttributeGroupExtensions.xtend
+++ b/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/MultiContainer_AttributeGroupExtensions.xtend
@@ -81,7 +81,7 @@ class MultiContainer_AttributeGroupExtensions {
throw new IllegalArgumentException('''PlanProSchinttStelle not contains LST_Zustand: «lstZustand.identitaet.wert»''')
}
-
+
def static PlanPro_Schnittstelle getPlanProSchnittstelle(
MultiContainer_AttributeGroup container) {
val lstZustand = container.firstLSTZustand
diff --git a/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/SchlossExtensions.xtend b/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/SchlossExtensions.xtend
index 7f1894a4f2..08902b9e97 100644
--- a/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/SchlossExtensions.xtend
+++ b/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/SchlossExtensions.xtend
@@ -14,6 +14,11 @@ import org.eclipse.set.model.planpro.Schluesselabhaengigkeiten.Schlosskombinatio
import org.eclipse.set.model.planpro.Schluesselabhaengigkeiten.Schluessel
import org.eclipse.set.model.planpro.Schluesselabhaengigkeiten.Schluesselsperre
import org.eclipse.set.model.planpro.Weichen_und_Gleissperren.W_Kr_Gsp_Element
+import org.eclipse.set.model.planpro.Ansteuerung_Element.Stell_Bereich
+
+import static extension org.eclipse.set.ppmodel.extensions.SchluesselExtensions.*
+import static extension org.eclipse.set.ppmodel.extensions.SchlosskombinationExtensions.*
+import static extension org.eclipse.set.ppmodel.extensions.StellBereichExtensions.*
/**
* Extensions for {@link Schloss}.
@@ -82,4 +87,44 @@ class SchlossExtensions extends BasisObjektExtensions {
def static W_Kr_Gsp_Element getSonderanlage(Schloss schloss) {
return schloss?.schlossSonderanlage?.IDSonderanlage?.value
}
+
+ def static Iterable filterObjectsIsBelongToControlArea(Iterable schlosses, Stell_Bereich controlArea) {
+ if (controlArea === null || schlosses.nullOrEmpty) {
+ return schlosses;
+ }
+
+ val result = newHashSet
+ val container = schlosses?.head?.container
+ // 1. Condition
+ // IMPROVE: Not completely, because the requirements for this case aren't clear
+ val stellelements = container.stellelement.map[IDInformation?.value].
+ filterNull.filter[AussenelementansteuerungExtensions.isBelongToControlArea(it, controlArea)]
+ val ssp = container.schluesselsperre.filter [ ssp |
+ stellelements.exists[it === ssp.IDStellelement.value]
+ ]
+ val schluessels = schlosses.filter [ schloss |
+ ssp.exists[it === schloss.schlossSsp.IDSchluesselsperre.value]
+ ].map[schluesel].filterNull
+ result.addAll(schluessels.flatMap[schloesser])
+
+ // 2.Condition
+ result.filter[schlossSk?.hauptschloss.wert].flatMap [ schloss |
+ schloss.schlossSk.IDSchlosskombination?.value.schloesser.filter [
+ it.schlossSk !== null && !it.schlossSk.hauptschloss.wert
+ ]
+ ].filterNull.map[schluesel].flatMap[schloesser].forEach[result.add(it)]
+
+ // 3. Condition
+ schlosses.filter [ schloss |
+ controlArea.wkrGspElement.exists [ gspElement |
+ schloss.schlossW?.IDWKrElement?.value === gspElement ||
+ schloss.schlossGsp?.IDGspElement?.value === gspElement ||
+ schloss.schlossSonderanlage?.IDSonderanlage?.value ==
+ gspElement
+ ]
+ ].map[schluesel].flatMap[schloesser].toSet.filter [
+ technischBerechtigter?.wert
+ ].forEach[result.add(it)]
+ return result
+ }
}
diff --git a/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/StellBereichExtensions.java b/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/StellBereichExtensions.java
index f4ca87f94a..e202802410 100644
--- a/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/StellBereichExtensions.java
+++ b/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/StellBereichExtensions.java
@@ -30,8 +30,8 @@
import org.eclipse.set.model.planpro.Ansteuerung_Element.Uebertragungsweg;
import org.eclipse.set.model.planpro.Bahnuebergang.BUE_Anlage;
import org.eclipse.set.model.planpro.Bahnuebergang.BUE_Kante;
-import org.eclipse.set.model.planpro.Basisobjekte.Basis_Objekt;
import org.eclipse.set.model.planpro.Basisobjekte.Bereich_Objekt;
+import org.eclipse.set.model.planpro.Basisobjekte.Ur_Objekt;
import org.eclipse.set.model.planpro.Bedienung.Bedien_Bezirk;
import org.eclipse.set.model.planpro.Bedienung.Bedien_Einrichtung_Oertlich;
import org.eclipse.set.model.planpro.Bedienung.Bedien_Standort;
@@ -206,7 +206,7 @@ public static List getWkrGspElement(
* @return true, if the element belong to the area
*/
public static boolean isInControlArea(final Stell_Bereich area,
- final Basis_Objekt object) {
+ final Ur_Objekt object) {
if (object == null) {
return false;
}
diff --git a/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/UrObjectExtensions.xtend b/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/UrObjectExtensions.xtend
index 3c55891539..636157e1b3 100644
--- a/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/UrObjectExtensions.xtend
+++ b/java/bundles/org.eclipse.set.ppmodel.extensions/src/org/eclipse/set/ppmodel/extensions/UrObjectExtensions.xtend
@@ -10,15 +10,16 @@ package org.eclipse.set.ppmodel.extensions
import org.eclipse.emf.ecore.EObject
import org.eclipse.set.basis.cache.Cache
+import org.eclipse.set.basis.constants.ContainerType
import org.eclipse.set.core.services.Services
import org.eclipse.set.model.planpro.Ansteuerung_Element.Stell_Bereich
-import org.eclipse.set.model.planpro.Basisobjekte.Basis_Objekt
import org.eclipse.set.model.planpro.Basisobjekte.Ur_Objekt
import org.eclipse.set.model.planpro.PlanPro.LST_Zustand
import org.eclipse.set.model.planpro.PlanPro.PlanPro_Schnittstelle
+import org.eclipse.set.utils.ToolboxConfiguration
+import static extension org.eclipse.set.ppmodel.extensions.MultiContainer_AttributeGroupExtensions.*
import static extension org.eclipse.set.ppmodel.extensions.StellBereichExtensions.*
-import org.eclipse.set.utils.ToolboxConfiguration
/**
* Diese Klasse erweitert {@link Ur_Objekt}.
@@ -36,15 +37,17 @@ class UrObjectExtensions extends BasisAttributExtensions {
}
def static Cache getCache(Ur_Objekt object, String cacheKey) {
- val service = ToolboxConfiguration.isDevelopmentMode ? Services.
- noCacheService : Services.cacheService
+ val service = ToolboxConfiguration.isDevelopmentMode
+ ? Services.noCacheService
+ : Services.cacheService
return service.getCache(object.planProSchnittstelle, cacheKey)
}
def static Cache getCache(Ur_Objekt object, String containerIdCacheId,
String cacheKey) {
- val service = ToolboxConfiguration.isDevelopmentMode ? Services.
- noCacheService : Services.cacheService
+ val service = ToolboxConfiguration.isDevelopmentMode
+ ? Services.noCacheService
+ : Services.cacheService
return service.getCache(object.planProSchnittstelle, cacheKey,
containerIdCacheId)
}
@@ -97,7 +100,7 @@ class UrObjectExtensions extends BasisAttributExtensions {
return planData.exists[wert == guid]
}
- def static Iterable filterObjectsInControlArea(
+ def static Iterable filterObjectsInControlArea(
Iterable objects, Stell_Bereich area) {
if (area === null) {
return objects
@@ -105,4 +108,8 @@ class UrObjectExtensions extends BasisAttributExtensions {
return objects.filter[area.isInControlArea(it)]
}
+
+ def static ContainerType getContainerType(Ur_Objekt obj) {
+ return obj.container.containerType
+ }
}
diff --git a/java/bundles/org.eclipse.set.services/src/org/eclipse/set/services/table/TableService.java b/java/bundles/org.eclipse.set.services/src/org/eclipse/set/services/table/TableService.java
index 741b42163e..fc8d2845bb 100644
--- a/java/bundles/org.eclipse.set.services/src/org/eclipse/set/services/table/TableService.java
+++ b/java/bundles/org.eclipse.set.services/src/org/eclipse/set/services/table/TableService.java
@@ -206,12 +206,10 @@ Table createDiffTable(TableInfo tableInfo, TableType tableType,
*
* @param table
* the table
- * @param tableType
- * the {@link TableType}
* @param tableInfo
* the {@link TableInfo}
*/
- void sortTable(Table table, TableType tableType, TableInfo tableInfo);
+ void sortTable(Table table, TableInfo tableInfo);
/**
* @param tableInfo
diff --git a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/AbstractTableModelTransformator.xtend b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/AbstractTableModelTransformator.xtend
index b8e8a936e5..1f1ea64bb5 100644
--- a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/AbstractTableModelTransformator.xtend
+++ b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/AbstractTableModelTransformator.xtend
@@ -24,6 +24,8 @@ import org.slf4j.LoggerFactory
import static extension com.google.common.base.Throwables.*
import static extension org.eclipse.set.model.tablemodel.extensions.TableRowExtensions.*
+import static extension org.eclipse.set.ppmodel.extensions.BasisAttributExtensions.*
+import static extension org.eclipse.set.ppmodel.extensions.MultiContainer_AttributeGroupExtensions.*
import static extension org.eclipse.set.ppmodel.extensions.utils.Debug.*
/**
@@ -223,10 +225,9 @@ abstract class AbstractTableModelTransformator implements TableModelTransform
fill(row, column, object, [content.get(0)])
} else {
fillIterable(row, column, object, [content],
- switchCase.comparator, [it],
- switchCase.seperator ===
- null ? ITERABLE_FILLING_SEPARATOR : switchCase.
- seperator)
+ switchCase.comparator, [it], switchCase.seperator === null
+ ? ITERABLE_FILLING_SEPARATOR
+ : switchCase.seperator)
}
} catch (Exception e) {
handleFillingException(e, row, column)
@@ -473,8 +474,6 @@ abstract class AbstractTableModelTransformator implements TableModelTransform
}
}
-
-
def static String fillRegelzeichnung(Regelzeichnung regelzeichnung) {
val bild = regelzeichnung?.regelzeichnungAllg?.bild
var rzNummer = regelzeichnung?.regelzeichnungAllg?.RZNummer?.wert
@@ -548,14 +547,19 @@ abstract class AbstractTableModelTransformator implements TableModelTransform
TableRow row,
ColumnDescriptor column
) {
- var guid = row.group.leadingObject?.identitaet?.wert
- var leadingObject = getLeadingObjectIdentifier(row, guid)
+ var leadingObject = row.group.leadingObject
+ var errorIdentiefer = getLeadingObjectIdentifier(row,
+ leadingObject?.identitaet?.wert)
var errorMsg = e.createErrorMsg(row)
-
- tableErrors.add(new TableError(guid, leadingObject, "", errorMsg, row))
+ val container = row.group.leadingObject.container
+ val tableType = container.containerType.defaultTableType
+ val error = new TableError(leadingObject, errorIdentiefer, "", errorMsg,
+ row)
+ error.tableType = tableType
+ tableErrors.add(error)
row.set(column, '''«ERROR_PREFIX»«errorMsg»''')
logger.
- error('''«e.class.simpleName» in column "«column.debugString»" for leading object "«leadingObject»" («guid»). «e.message»«System.lineSeparator»«e.stackTraceAsString»''')
+ error('''«e.class.simpleName» in column "«column.debugString»" for leading object "«leadingObject»" («leadingObject?.identitaet?.wert»). «e.message»«System.lineSeparator»«e.stackTraceAsString»''')
}
def String createErrorMsg(
diff --git a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/AbstractTableTransformationService.java b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/AbstractTableTransformationService.java
index 4d0647350b..4de9b04d9c 100644
--- a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/AbstractTableTransformationService.java
+++ b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/AbstractTableTransformationService.java
@@ -18,7 +18,6 @@
import java.util.Comparator;
import java.util.List;
-import org.eclipse.set.model.planpro.Ansteuerung_Element.Stell_Bereich;
import org.eclipse.set.model.tablemodel.ColumnDescriptor;
import org.eclipse.set.model.tablemodel.RowGroup;
import org.eclipse.set.model.tablemodel.Table;
@@ -92,14 +91,25 @@ public Comparator getRowGroupComparator() {
.build();
}
+ // @Override
+ // public Table transform(final T model, final Stell_Bereich controlArea) {
+ // final Table table = TablemodelFactory.eINSTANCE.createTable();
+ // buildHeading(table);
+ // transformator = createTransformator();
+ // transformator.transformTableContent(model, new TMFactory(table),
+ // controlArea);
+ // // Fill blank value to cell
+ //
+ // setColumnTextAlignment(table);
+ // return table;
+ // }
+
@Override
- public Table transform(final T model, final Stell_Bereich controlArea) {
+ public Table transform(final T model) {
final Table table = TablemodelFactory.eINSTANCE.createTable();
buildHeading(table);
transformator = createTransformator();
- transformator.transformTableContent(model, new TMFactory(table),
- controlArea);
- // Fill blank value to cell
+ transformator.transformTableContent(model, new TMFactory(table));
TableExtensions.getTableRows(table).forEach(row -> {
for (int i = 0; i < row.getCells().size(); i++) {
if (row.getCells().get(i).getContent() == null) {
@@ -111,16 +121,6 @@ public Table transform(final T model, final Stell_Bereich controlArea) {
return table;
}
- @Override
- public Table transform(final T model) {
- final Table table = TablemodelFactory.eINSTANCE.createTable();
- buildHeading(table);
- transformator = createTransformator();
- transformator.transformTableContent(model, new TMFactory(table));
- setColumnTextAlignment(table);
- return table;
- }
-
@Override
public Collection getTableErrors() {
if (transformator != null) {
diff --git a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableError.java b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableError.java
index 878d571ff3..0bb3fe8d00 100644
--- a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableError.java
+++ b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableError.java
@@ -9,9 +9,11 @@
package org.eclipse.set.utils.table;
import org.eclipse.set.basis.constants.TableType;
+import org.eclipse.set.model.planpro.Basisobjekte.Ur_Objekt;
import org.eclipse.set.model.planpro.Basisobjekte.impl.Ur_ObjektImpl;
import org.eclipse.set.model.tablemodel.TableRow;
import org.eclipse.set.model.tablemodel.extensions.TableRowExtensions;
+import org.eclipse.set.ppmodel.extensions.EObjectExtensions;
/**
* Errors that occurred during table transformation
@@ -20,17 +22,17 @@
*
*/
public class TableError extends Ur_ObjektImpl {
- private final String guid;
- private final String leadingObject;
+ private final Ur_Objekt leadingObject;
+ private final String errorIdentifier;
private String source;
private TableType tableType;
private final String message;
private final TableRow row;
/**
- * @param guid
- * the guid of the affected leading object
* @param leadingObject
+ * the guid of the affected leading object
+ * @param errorIdentifier
* the affected leading object
* @param source
* the source table
@@ -39,10 +41,11 @@ public class TableError extends Ur_ObjektImpl {
* @param row
* the row where the error occurred
*/
- public TableError(final String guid, final String leadingObject,
- final String source, final String message, final TableRow row) {
- this.guid = guid;
+ public TableError(final Ur_Objekt leadingObject,
+ final String errorIdentifier, final String source,
+ final String message, final TableRow row) {
this.leadingObject = leadingObject;
+ this.errorIdentifier = errorIdentifier;
this.source = source;
this.message = message;
this.row = row;
@@ -52,13 +55,23 @@ public TableError(final String guid, final String leadingObject,
* @return the guid of the affected leading object
*/
public String getGuid() {
- return guid;
+ return EObjectExtensions
+ .getNullableObject(leadingObject,
+ obj -> obj.getIdentitaet().getWert())
+ .orElse(""); //$NON-NLS-1$
+ }
+
+ /**
+ * @return the error identifier string
+ */
+ public String getErrorIdentifier() {
+ return errorIdentifier;
}
/**
- * @return the affected leading object
+ * @return the leading object
*/
- public String getLeadingObject() {
+ public Ur_Objekt getLeadingObject() {
return leadingObject;
}
diff --git a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableModelInstanceBodyDataProvider.java b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableModelInstanceBodyDataProvider.java
index 3133a9596e..27a0f48eb2 100644
--- a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableModelInstanceBodyDataProvider.java
+++ b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableModelInstanceBodyDataProvider.java
@@ -28,7 +28,7 @@
import org.eclipse.set.core.services.session.SessionService;
import org.eclipse.set.model.planpro.PlanPro.PlanPro_Schnittstelle;
import org.eclipse.set.model.tablemodel.CellContent;
-import org.eclipse.set.model.tablemodel.CompareCellContent;
+import org.eclipse.set.model.tablemodel.CompareStateCellContent;
import org.eclipse.set.model.tablemodel.CompareTableCellContent;
import org.eclipse.set.model.tablemodel.StringCellContent;
import org.eclipse.set.model.tablemodel.TableCell;
@@ -36,6 +36,7 @@
import org.eclipse.set.model.tablemodel.TablemodelFactory;
import org.eclipse.set.model.tablemodel.extensions.CellContentExtensions;
import org.eclipse.set.model.tablemodel.extensions.TableRowExtensions;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -177,7 +178,7 @@ private CellContent getNewContent(final CellContent oldContent,
return switch (oldContent) {
case final StringCellContent stringContent -> getNewContent(
stringContent, properties);
- case final CompareCellContent compareContent -> getNewContent(
+ case final CompareStateCellContent compareContent -> getNewContent(
compareContent, properties);
case final CompareTableCellContent compareTableContent -> getNewContent(
compareTableContent, properties);
@@ -212,24 +213,27 @@ private static CellContent getNewContent(final StringCellContent oldContent,
}
private static CellContent getNewContent(
- final CompareCellContent oldContent,
+ final CompareStateCellContent oldContent,
final Pt1TableChangeProperties properties) {
final ContainerType containerType = properties.getContainerType();
+ final List oldValues = IterableExtensions
+ .toList(CellContentExtensions
+ .getStringValueIterable(oldContent.getOldValue()));
+ final List newValues = IterableExtensions
+ .toList(CellContentExtensions
+ .getStringValueIterable(oldContent.getNewValue()));
switch (containerType) {
case FINAL:
- if (!equalsValues(oldContent.getNewValue(),
- properties.getNewValues())) {
- return createCompareCellContent(oldContent.getOldValue(),
+ if (!equalsValues(newValues, properties.getNewValues())) {
+ return createCompareCellContent(oldValues,
properties.getNewValues(),
oldContent.getSeparator());
}
break;
case INITIAL:
- if (!equalsValues(oldContent.getOldValue(),
- properties.getNewValues())) {
+ if (!equalsValues(newValues, properties.getNewValues())) {
return createCompareCellContent(properties.getNewValues(),
- oldContent.getNewValue(),
- oldContent.getSeparator());
+ newValues, oldContent.getSeparator());
}
break;
default:
@@ -286,13 +290,15 @@ private CellContent getNewContent(final CompareTableCellContent oldContent,
: clone;
}
- private static CompareCellContent createCompareCellContent(
+ private static CompareStateCellContent createCompareCellContent(
final List oldValues, final List newValues,
final String separator) {
- final CompareCellContent compareContent = TablemodelFactory.eINSTANCE
- .createCompareCellContent();
- compareContent.getOldValue().addAll(oldValues);
- compareContent.getNewValue().addAll(newValues);
+ final CompareStateCellContent compareContent = TablemodelFactory.eINSTANCE
+ .createCompareStateCellContent();
+ compareContent.setOldValue(
+ CellContentExtensions.createStringCellContent(oldValues));
+ compareContent.setNewValue(
+ CellContentExtensions.createStringCellContent(newValues));
compareContent.setSeparator(separator);
return compareContent;
}
diff --git a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableModelTransformator.java b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableModelTransformator.java
index 8df5b457f8..49731d78eb 100644
--- a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableModelTransformator.java
+++ b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableModelTransformator.java
@@ -10,7 +10,6 @@
import java.util.Collection;
-import org.eclipse.set.model.planpro.Ansteuerung_Element.Stell_Bereich;
import org.eclipse.set.model.tablemodel.Table;
/**
@@ -34,21 +33,6 @@ public interface TableModelTransformator {
*/
public Table transformTableContent(T model, TMFactory factory);
- /**
- * Transforms the given container and control area of a PlanPro model to a
- * particular table of the table model.
- *
- * @param model
- * the model
- * @param factory
- * factory to create new rows of the table model
- * @param controlArea
- * the {@link Stell_Bereich}
- * @return the table model
- */
- public Table transformTableContent(T model, TMFactory factory,
- Stell_Bereich controlArea);
-
/**
* Errors that occurred during transformation
*
diff --git a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableSpanUtils.java b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableSpanUtils.java
index 1ce2d4ea77..3b699cfdc3 100644
--- a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableSpanUtils.java
+++ b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableSpanUtils.java
@@ -8,17 +8,21 @@
*/
package org.eclipse.set.utils.table;
+import static org.eclipse.set.model.tablemodel.extensions.CellContentExtensions.getStringValueIterable;
+
import java.util.List;
import org.eclipse.set.model.tablemodel.CellContent;
import org.eclipse.set.model.tablemodel.ColumnDescriptor;
-import org.eclipse.set.model.tablemodel.CompareCellContent;
+import org.eclipse.set.model.tablemodel.CompareStateCellContent;
import org.eclipse.set.model.tablemodel.RowMergeMode;
import org.eclipse.set.model.tablemodel.StringCellContent;
import org.eclipse.set.model.tablemodel.TableRow;
import org.eclipse.set.model.tablemodel.extensions.CellContentExtensions;
import org.eclipse.set.model.tablemodel.extensions.TableRowExtensions;
+import com.google.common.collect.Streams;
+
/**
* Helper class to calculate table spans
*
@@ -100,7 +104,7 @@ private static boolean isEqual(final CellContent cellContentA,
return switch (cellContentA) {
case final StringCellContent stringCellContentA -> isEqual(
stringCellContentA, cellContentB);
- case final CompareCellContent compareCellContentA -> isEqual(
+ case final CompareStateCellContent compareCellContentA -> isEqual(
compareCellContentA, cellContentB);
default -> CellContentExtensions.isEqual(cellContentA,
cellContentB);
@@ -115,16 +119,16 @@ private static boolean isEqual(final StringCellContent stringCellContentA,
// compare cell content with the another cell. Because when the row
// in Final was removed/added will be COmpareCellContent and by
// normal compare the row can't be merged
- case final CompareCellContent compareCellContentB -> {
- final List oldValuesB = compareCellContentB
- .getOldValue()
- .stream()
+ case final CompareStateCellContent compareCellContentB -> {
+ final List oldValuesB = Streams
+ .stream(getStringValueIterable(
+ compareCellContentB.getOldValue()))
.map(String::trim)
.filter(v -> !v.isEmpty() && !v.isBlank())
.toList();
- final List newValuesB = compareCellContentB
- .getNewValue()
- .stream()
+ final List newValuesB = Streams
+ .stream(getStringValueIterable(
+ compareCellContentB.getNewValue()))
.map(String::trim)
.filter(v -> !v.isEmpty() && !v.isBlank())
.toList();
@@ -139,7 +143,8 @@ private static boolean isEqual(final StringCellContent stringCellContentA,
};
}
- private static boolean isEqual(final CompareCellContent compareCellContentA,
+ private static boolean isEqual(
+ final CompareStateCellContent compareCellContentA,
final CellContent cellContentB) {
return switch (cellContentB) {
case final StringCellContent stringCellContentB -> isEqual(
diff --git a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableTransformationService.java b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableTransformationService.java
index 45287513bf..810cf2937c 100644
--- a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableTransformationService.java
+++ b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/TableTransformationService.java
@@ -11,7 +11,6 @@
import java.util.Collection;
import java.util.Comparator;
-import org.eclipse.set.model.planpro.Ansteuerung_Element.Stell_Bereich;
import org.eclipse.set.model.tablemodel.RowGroup;
import org.eclipse.set.model.tablemodel.Table;
@@ -48,17 +47,6 @@ public interface TableTransformationService {
*/
Table transform(T model);
- /**
- * Transforms a model within control area to a table model.
- *
- * @param model
- * the model to be used
- * @param controlArea
- * the {@link Stell_Bereich}
- * @return the transformed table
- */
- Table transform(T model, Stell_Bereich controlArea);
-
/**
* Errors that occurred during transformation
*
diff --git a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/sorting/AbstractCellComparator.xtend b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/sorting/AbstractCellComparator.xtend
index 89737e4f9c..8d76063f78 100644
--- a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/sorting/AbstractCellComparator.xtend
+++ b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/sorting/AbstractCellComparator.xtend
@@ -12,7 +12,7 @@ import java.util.Comparator
import java.util.List
import org.eclipse.nebula.widgets.nattable.sort.SortDirectionEnum
import org.eclipse.set.model.tablemodel.CellContent
-import org.eclipse.set.model.tablemodel.CompareCellContent
+import org.eclipse.set.model.tablemodel.CompareStateCellContent
import org.eclipse.set.model.tablemodel.StringCellContent
import org.eclipse.set.model.tablemodel.TableCell
@@ -61,8 +61,8 @@ package abstract class AbstractCellComparator implements Comparator {
}
private def dispatch int compareDispatch(
- CompareCellContent c1,
- CompareCellContent c2
+ CompareStateCellContent c1,
+ CompareStateCellContent c2
) {
// To avoid compare error, the compare cell shouldn't separate compare new/old value
return c1.compareCellContentString.compareCell(
@@ -79,13 +79,13 @@ package abstract class AbstractCellComparator implements Comparator {
private def dispatch int compareDispatch(
StringCellContent c1,
- CompareCellContent c2
+ CompareStateCellContent c2
) {
return c1.value.compareCell(c2.compareCellContentString)
}
private def dispatch int compareDispatch(
- CompareCellContent c1,
+ CompareStateCellContent c1,
StringCellContent c2
) {
return c1.compareCellContentString.compareCell(c2.value)
@@ -107,8 +107,9 @@ package abstract class AbstractCellComparator implements Comparator {
}
private def Iterable compareCellContentString(
- CompareCellContent content) {
- return #[content.newValue, content.oldValue].flatten.toSet
+ CompareStateCellContent content) {
+ return #[content.newValue.stringValueIterable,
+ content.oldValue.stringValueIterable].flatten.toSet
}
private def boolean isInteger(String text) {
diff --git a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/tree/AbstractValidationProblemTransformator.xtend b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/tree/AbstractValidationProblemTransformator.xtend
index 4438e3657b..971ac1b40e 100644
--- a/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/tree/AbstractValidationProblemTransformator.xtend
+++ b/java/bundles/org.eclipse.set.utils.table/src/org/eclipse/set/utils/table/tree/AbstractValidationProblemTransformator.xtend
@@ -11,7 +11,6 @@ package org.eclipse.set.utils.table.tree
import java.util.Comparator
import java.util.List
import java.util.Set
-import org.eclipse.set.model.planpro.Ansteuerung_Element.Stell_Bereich
import org.eclipse.set.model.tablemodel.ColumnDescriptor
import org.eclipse.set.model.tablemodel.TableRow
import org.eclipse.set.model.validationreport.ValidationProblem
@@ -40,10 +39,6 @@ abstract class AbstractValidationProblemTransformator extends AbstractTableMo
return factory.table
}
- override transformTableContent(T model, TMFactory factory, Stell_Bereich controlArea) {
- throw new UnsupportedOperationException()
- }
-
abstract def List getProblems(T report)
protected def void transformProblem(TMFactory factory,