Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjmisinco2014-04-11 17:24:25 +0000
committerJohn Misinco2014-04-12 02:51:39 +0000
commit62c144f2bb561e870fee87979d13762c7e0306e2 (patch)
tree10c75f956b17b6cd72342527cc87755e26b3d763 /plugins/org.eclipse.osee.define
parent39c49272b5f0e802734df69237580686bb8552b0 (diff)
downloadorg.eclipse.osee-62c144f2bb561e870fee87979d13762c7e0306e2.tar.gz
org.eclipse.osee-62c144f2bb561e870fee87979d13762c7e0306e2.tar.xz
org.eclipse.osee-62c144f2bb561e870fee87979d13762c7e0306e2.zip
bug[ats_CKV26]: Column elements being included twice
The commit to streamline the ExcelXmlWriter changed how column elements are being written such that they are always written. Prior to that change, they were not. Since all the ISimpleTable classes include their own column definitions, we need to remove those being put in from the ExcelXmlWriter. Change-Id: Ie505cb4236ef1ee3cfebd2f8b6b796b2dd057fe6
Diffstat (limited to 'plugins/org.eclipse.osee.define')
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityTable.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityTable.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityTable.java
index a993d55a697..79879c815e3 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityTable.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityTable.java
@@ -24,6 +24,7 @@ import org.eclipse.osee.framework.jdk.core.util.io.xml.ISheetWriter;
*/
public class TraceabilityTable {
private static final Pattern TABLE_START_PATTERN = Pattern.compile("(<Table.*?>)");
+ private static final Pattern COLUMN_PATTERN = Pattern.compile("(\\s*<Column.*?/>\\s*)");
private static final Pattern STYLE_PATTERN = Pattern.compile("<Styles>.*</Styles>\\s*", Pattern.DOTALL);
private CharSequence result;
@@ -61,6 +62,7 @@ public class TraceabilityTable {
ChangeSet changeSet = new ChangeSet(source);
Matcher styleMatcher = STYLE_PATTERN.matcher(source);
Matcher tableMatcher = TABLE_START_PATTERN.matcher(source);
+ Matcher columnMatcher = COLUMN_PATTERN.matcher(source);
// if more than one style present, this will only apply once, so first style's header is applied
if (styleMatcher.find()) {
@@ -72,6 +74,10 @@ public class TraceabilityTable {
changeSet.insertBefore(tableMatcher.end(), style.getHeader());
}
}
+
+ while (columnMatcher.find()) {
+ changeSet.delete(columnMatcher.start(), columnMatcher.end());
+ }
result = changeSet.applyChangesToSelf();
}

Back to the top