Fixing bug where unified column was added more than once.
diff --git a/org.eclipse.rmf.reqif10.pror.edit/src/org/eclipse/rmf/reqif10/pror/util/ConfigurationUtil.java b/org.eclipse.rmf.reqif10.pror.edit/src/org/eclipse/rmf/reqif10/pror/util/ConfigurationUtil.java
index 4911cf1..1f813a0 100644
--- a/org.eclipse.rmf.reqif10.pror.edit/src/org/eclipse/rmf/reqif10/pror/util/ConfigurationUtil.java
+++ b/org.eclipse.rmf.reqif10.pror.edit/src/org/eclipse/rmf/reqif10/pror/util/ConfigurationUtil.java
@@ -323,11 +323,11 @@
}
- // Collect all names from the types
+ // Collect all names from the types. We use a list to maintain order.
final List<String> colNames = new ArrayList<String>();
for (SpecType type : types) {
for (AttributeDefinition ad : type.getSpecAttributes()) {
- // Duplicates will disappear due to HashSet
+
String colName = ad.getLongName();
if (colName != null && !colNames.contains(colName)) {
colNames.add(ad.getLongName());
@@ -346,6 +346,7 @@
if (unifiedColumn) continue;
column = ConfigurationFactory.eINSTANCE.createUnifiedColumn();
colName = "Main";
+ unifiedColumn = true;
}
column.setWidth(100);