Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-10-25 12:43:39 -0400
committerRyan D. Brooks2010-10-25 12:43:39 -0400
commit5bf18d4d9c90de49d584e843e2057bffecd039d5 (patch)
tree9dc44b13437f7f37a394ab2acf3a7a4255058ee3 /plugins/org.eclipse.osee.coverage
parent07a3c6445a0c8003896487e04e2ba3b600598c38 (diff)
downloadorg.eclipse.osee-5bf18d4d9c90de49d584e843e2057bffecd039d5.tar.gz
org.eclipse.osee-5bf18d4d9c90de49d584e843e2057bffecd039d5.tar.xz
org.eclipse.osee-5bf18d4d9c90de49d584e843e2057bffecd039d5.zip
bug[ats_R54KZ]: Fix work-product-task column not showing up as default on coverage table
Diffstat (limited to 'plugins/org.eclipse.osee.coverage')
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewerFactory.java12
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xmerge/CoverageMergeXViewerFactory.java36
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xmerge/CoverageMergeXViewerFactoryPackage.java25
3 files changed, 38 insertions, 35 deletions
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewerFactory.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewerFactory.java
index c7c343533c7..92855fe429d 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewerFactory.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xcover/CoverageXViewerFactory.java
@@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.coverage.editor.xcover;
+import java.util.Arrays;
+import java.util.List;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn.SortDataType;
import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewerFactory;
@@ -55,15 +57,19 @@ public class CoverageXViewerFactory extends SkynetXViewerFactory {
public static XViewerColumn Guid = new XViewerColumn(NAMESPACE + ".guid", "Guid", 80, SWT.LEFT, true,
SortDataType.String, false, "");
+ public static List<XViewerColumn> columns = Arrays.asList(Name, Method_Number, Execution_Number, Namespace,
+ Coverage_Percent, Coverage_Method, Work_Product_Task, Coverage_Rationale, Coverage_Test_Units, Assignees_Col,
+ Notes_Col, Parent_Coverage_Unit, Line_Number, Location, Full_Path, Guid);
+
public CoverageXViewerFactory() {
super(NAMESPACE);
registerColumns();
}
public void registerColumns() {
- registerColumns(Name, Method_Number, Execution_Number, Namespace, Coverage_Percent, Coverage_Method,
- Work_Product_Task, Coverage_Rationale, Coverage_Test_Units, Assignees_Col, Notes_Col, Parent_Coverage_Unit,
- Line_Number, Location, Full_Path, Guid);
+ for (XViewerColumn xCol : columns) {
+ registerColumns(xCol);
+ }
}
@Override
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xmerge/CoverageMergeXViewerFactory.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xmerge/CoverageMergeXViewerFactory.java
index e79be1cb452..7f0ea58d498 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xmerge/CoverageMergeXViewerFactory.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xmerge/CoverageMergeXViewerFactory.java
@@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.osee.coverage.editor.xmerge;
+import java.util.Arrays;
import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
import org.eclipse.osee.coverage.editor.xcover.CoverageXViewerFactory;
@@ -22,13 +23,34 @@ public abstract class CoverageMergeXViewerFactory extends CoverageXViewerFactory
super();
}
- public void registerMergeColumns() {
- registerColumns();
- for (XViewerColumn xCol : getColumns()) {
- overrideShowDefault(
- xCol.getId(),
- xCol.equals(CoverageXViewerFactory.Name) || xCol.equals(CoverageXViewerFactory.Notes_Col) || xCol.equals(CoverageXViewerFactory.Namespace) || xCol.equals(CoverageXViewerFactory.Coverage_Method));
+ /**
+ * This view needs it's own column objects so it can show/hide accordingly.
+ */
+ @Override
+ public void registerColumns() {
+ for (XViewerColumn xCol : Arrays.asList(Name, Method_Number, Execution_Number, Namespace, Coverage_Percent,
+ Coverage_Method, Work_Product_Task, Coverage_Rationale, Coverage_Test_Units, Assignees_Col, Notes_Col,
+ Parent_Coverage_Unit, Line_Number, Location, Full_Path, Guid)) {
+ XViewerColumn newXCol = xCol.copy();
+ if (xCol.equals(CoverageXViewerFactory.Coverage_Rationale) ||
+ //
+ xCol.equals(CoverageXViewerFactory.Method_Number) ||
+ //
+ xCol.equals(CoverageXViewerFactory.Execution_Number) ||
+ //
+ xCol.equals(CoverageXViewerFactory.Coverage_Method) ||
+ //
+ xCol.equals(CoverageXViewerFactory.Coverage_Percent) ||
+ //
+ xCol.equals(CoverageXViewerFactory.Assignees_Col) ||
+ //
+ xCol.equals(CoverageXViewerFactory.Notes_Col)) {
+ newXCol.setShow(true);
+ }
+ if (xCol.equals(CoverageXViewerFactory.Work_Product_Task)) {
+ newXCol.setShow(false);
+ }
+ registerColumns(newXCol);
}
}
-
}
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xmerge/CoverageMergeXViewerFactoryPackage.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xmerge/CoverageMergeXViewerFactoryPackage.java
index c8b583979ca..a3d79dcfaca 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xmerge/CoverageMergeXViewerFactoryPackage.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/xmerge/CoverageMergeXViewerFactoryPackage.java
@@ -10,8 +10,6 @@
*******************************************************************************/
package org.eclipse.osee.coverage.editor.xmerge;
-import org.eclipse.nebula.widgets.xviewer.XViewerColumn;
-import org.eclipse.osee.coverage.editor.xcover.CoverageXViewerFactory;
/**
* @author Donald G. Dunne
@@ -22,29 +20,6 @@ public class CoverageMergeXViewerFactoryPackage extends CoverageMergeXViewerFact
public CoverageMergeXViewerFactoryPackage() {
super();
- clearColumnRegistration();
- registerMergeColumns();
- }
-
- @Override
- public void registerMergeColumns() {
- super.registerMergeColumns();
- for (XViewerColumn xCol : getColumns()) {
- if (xCol.equals(CoverageXViewerFactory.Coverage_Rationale) ||
- //
- xCol.equals(CoverageXViewerFactory.Method_Number) ||
- //
- xCol.equals(CoverageXViewerFactory.Execution_Number) ||
- //
- //
- xCol.equals(CoverageXViewerFactory.Coverage_Percent) ||
- //
- xCol.equals(CoverageXViewerFactory.Assignees_Col) ||
- //
- xCol.equals(CoverageXViewerFactory.Notes_Col)) {
- overrideShowDefault(xCol.getId(), true);
- }
- }
}
}

Back to the top